From dd4e2322a94233218851159adde73470e9bd045c Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 27 Feb 2025 06:40:36 +0000 Subject: [PATCH 1/8] Generated v7.0.0 --- CHANGELOG.md | 56 + README.md | 89 +- docs/Api/AclEntryApi.md | 2 +- docs/Api/AclsInComputeApi.md | 4 +- docs/Api/BackendApi.md | 8 +- docs/Api/BillingUsageMetricsApi.md | 16 +- docs/Api/EnabledProductsApi.md | 209 -- docs/Api/KvStoreApi.md | 58 +- docs/Api/KvStoreItemApi.md | 106 +- docs/Api/LegacyWafConfigurationSetsApi.md | 124 - docs/Api/LegacyWafFirewallApi.md | 334 -- docs/Api/LegacyWafOwaspApi.md | 135 - docs/Api/LegacyWafRuleApi.md | 178 - docs/Api/LegacyWafRuleStatusApi.md | 196 -- docs/Api/LegacyWafRulesetApi.md | 133 - docs/Api/LegacyWafTagApi.md | 61 - docs/Api/LegacyWafUpdateStatusApi.md | 102 - docs/Api/ProductAiAcceleratorApi.md | 116 + docs/Api/ProductBotManagementApi.md | 125 + docs/Api/ProductBrotliCompressionApi.md | 125 + docs/Api/ProductDdosProtectionApi.md | 197 ++ docs/Api/ProductDomainInspectorApi.md | 125 + docs/Api/ProductFanoutApi.md | 125 + docs/Api/ProductImageOptimizerApi.md | 125 + docs/Api/ProductLogExplorerInsightsApi.md | 125 + docs/Api/ProductNgwafApi.md | 199 ++ docs/Api/ProductObjectStorageApi.md | 116 + docs/Api/ProductOriginInspectorApi.md | 125 + docs/Api/ProductWebsocketsApi.md | 125 + docs/Api/SnippetApi.md | 30 +- docs/Model/AiAcceleratorResponseBodyEnable.md | 12 + docs/Model/AiAcceleratorResponseCustomer.md | 10 + .../AiAcceleratorResponseCustomerCustomer.md | 11 + docs/Model/AiAcceleratorResponseLinks.md | 10 + docs/Model/AiAcceleratorResponseLinksLinks.md | 10 + docs/Model/AiAcceleratorResponseProduct.md | 10 + .../AiAcceleratorResponseProductProduct.md | 11 + docs/Model/Backend.md | 2 +- docs/Model/BackendResponse.md | 2 +- docs/Model/BatchErrors.md | 13 - docs/Model/BotManagementResponseBodyEnable.md | 12 + docs/Model/BotManagementResponseLinks.md | 10 + docs/Model/BotManagementResponseLinksLinks.md | 11 + docs/Model/BotManagementResponseProduct.md | 10 + .../BotManagementResponseProductProduct.md | 11 + docs/Model/BotManagementResponseService.md | 10 + ...=> BotManagementResponseServiceService.md} | 2 +- .../BrotliCompressionResponseBodyEnable.md | 12 + docs/Model/BrotliCompressionResponseLinks.md | 10 + .../BrotliCompressionResponseLinksLinks.md | 11 + .../Model/BrotliCompressionResponseProduct.md | 10 + ...BrotliCompressionResponseProductProduct.md | 11 + .../Model/BrotliCompressionResponseService.md | 10 + docs/Model/ComputeAclList.md | 11 + ...OnlyServiceId.md => ComputeAclListMeta.md} | 3 +- docs/Model/ComputeAclLookup.md | 3 +- docs/Model/ConfiguredProductResponse.md | 13 - ...osProtectionRequestUpdateConfiguration.md} | 5 +- .../DdosProtectionResponseConfiguration.md | 10 + ...tionResponseConfigurationConfiguration.md} | 4 +- docs/Model/DdosProtectionResponseConfigure.md | 13 + docs/Model/DdosProtectionResponseEnable.md | 12 + ...Meta.md => DdosProtectionResponseLinks.md} | 5 +- .../Model/DdosProtectionResponseLinksLinks.md | 11 + docs/Model/DdosProtectionResponseProduct.md | 10 + .../DdosProtectionResponseProductProduct.md | 11 + docs/Model/DdosProtectionResponseService.md | 10 + docs/Model/DomainInspectorMeasurements.md | 2 + .../DomainInspectorResponseBodyEnable.md | 12 + docs/Model/DomainInspectorResponseLinks.md | 10 + .../DomainInspectorResponseLinksLinks.md | 11 + docs/Model/DomainInspectorResponseProduct.md | 10 + .../DomainInspectorResponseProductProduct.md | 11 + docs/Model/DomainInspectorResponseService.md | 10 + docs/Model/EnabledProductResponse.md | 12 - docs/Model/FanoutResponseBodyEnable.md | 12 + docs/Model/FanoutResponseLinks.md | 10 + ...seLinks.md => FanoutResponseLinksLinks.md} | 2 +- docs/Model/FanoutResponseProduct.md | 10 + ...uct.md => FanoutResponseProductProduct.md} | 2 +- docs/Model/FanoutResponseService.md | 10 + .../Model/ImageOptimizerResponseBodyEnable.md | 12 + docs/Model/ImageOptimizerResponseLinks.md | 10 + .../Model/ImageOptimizerResponseLinksLinks.md | 11 + docs/Model/ImageOptimizerResponseProduct.md | 10 + .../ImageOptimizerResponseProductProduct.md | 11 + docs/Model/ImageOptimizerResponseService.md | 10 + docs/Model/InlineResponse2003.md | 4 +- docs/Model/InlineResponse2004.md | 2 +- .../{Batch.md => KvStoreBatchResponse.md} | 4 +- docs/Model/KvStoreBatchResponseErrors.md | 13 + .../{StoreResponse.md => KvStoreDetails.md} | 4 +- docs/Model/KvStoreRequestCreate.md | 10 + docs/Model/KvStoreUpsertBatch.md | 14 + docs/Model/LegacyWafConfigurationSet.md | 11 - docs/Model/LegacyWafFirewall.md | 18 - docs/Model/LegacyWafOwasp.md | 38 - docs/Model/LegacyWafRule.md | 14 - docs/Model/LegacyWafRuleStatus.md | 12 - docs/Model/LegacyWafUpdateStatus.md | 15 - .../LogExplorerInsightsResponseBodyEnable.md | 12 + .../Model/LogExplorerInsightsResponseLinks.md | 10 + .../LogExplorerInsightsResponseLinksLinks.md | 11 + .../LogExplorerInsightsResponseProduct.md | 10 + ...gExplorerInsightsResponseProductProduct.md | 11 + .../LogExplorerInsightsResponseService.md | 10 + ...{LegacyWafTag.md => NgwafRequestEnable.md} | 4 +- docs/Model/NgwafRequestUpdateConfiguration.md | 11 + ...leset.md => NgwafResponseConfiguration.md} | 5 +- ...gwafResponseConfigurationConfiguration.md} | 4 +- docs/Model/NgwafResponseConfigure.md | 13 + docs/Model/NgwafResponseEnable.md | 12 + ...adOnlyVersion.md => NgwafResponseLinks.md} | 3 +- ...nseLinks.md => NgwafResponseLinksLinks.md} | 2 +- docs/Model/NgwafResponseProduct.md | 10 + ...duct.md => NgwafResponseProductProduct.md} | 2 +- docs/Model/NgwafResponseService.md | 10 + docs/Model/ObjectStorageResponseBodyEnable.md | 12 + docs/Model/ObjectStorageResponseCustomer.md | 10 + docs/Model/ObjectStorageResponseLinks.md | 10 + docs/Model/ObjectStorageResponseLinksLinks.md | 10 + docs/Model/ObjectStorageResponseProduct.md | 10 + .../ObjectStorageResponseProductProduct.md | 11 + docs/Model/OriginInspectorMeasurements.md | 4 + .../OriginInspectorResponseBodyEnable.md | 12 + docs/Model/OriginInspectorResponseLinks.md | 10 + .../OriginInspectorResponseLinksLinks.md | 11 + docs/Model/OriginInspectorResponseProduct.md | 10 + .../OriginInspectorResponseProductProduct.md | 11 + docs/Model/OriginInspectorResponseService.md | 10 + docs/Model/OriginInspectorValues.md | 4 + docs/Model/RealtimeEntryAggregated.md | 21 +- docs/Model/RealtimeMeasurements.md | 21 +- docs/Model/Results.md | 21 +- docs/Model/SetConfiguration.md | 12 - docs/Model/SetWorkspaceId.md | 10 - docs/Model/Values.md | 2 + docs/Model/WebsocketsResponseBodyEnable.md | 12 + docs/Model/WebsocketsResponseLinks.md | 10 + docs/Model/WebsocketsResponseLinksLinks.md | 11 + docs/Model/WebsocketsResponseProduct.md | 10 + .../Model/WebsocketsResponseProductProduct.md | 11 + docs/Model/WebsocketsResponseService.md | 10 + lib/Api/AclsInComputeApi.php | 14 +- lib/Api/BackendApi.php | 20 +- lib/Api/BillingApi.php | 15 + lib/Api/BillingUsageMetricsApi.php | 68 +- lib/Api/KvStoreApi.php | 174 +- lib/Api/KvStoreItemApi.php | 566 ++- lib/Api/LegacyWafFirewallApi.php | 3044 ----------------- lib/Api/LegacyWafRuleStatusApi.php | 1759 ---------- lib/Api/LegacyWafTagApi.php | 512 --- lib/Api/ProductAiAcceleratorApi.php | 991 ++++++ ...setApi.php => ProductBotManagementApi.php} | 332 +- ...pi.php => ProductBrotliCompressionApi.php} | 340 +- ...leApi.php => ProductDdosProtectionApi.php} | 823 +++-- lib/Api/ProductDomainInspectorApi.php | 1051 ++++++ ...dateStatusApi.php => ProductFanoutApi.php} | 531 +-- lib/Api/ProductImageOptimizerApi.php | 1051 ++++++ ....php => ProductLogExplorerInsightsApi.php} | 326 +- ...ledProductsApi.php => ProductNgwafApi.php} | 398 +-- lib/Api/ProductObjectStorageApi.php | 991 ++++++ lib/Api/ProductOriginInspectorApi.php | 1051 ++++++ lib/Api/ProductWebsocketsApi.php | 1051 ++++++ lib/Api/SnippetApi.php | 130 +- lib/Configuration.php | 11 +- ...hp => AiAcceleratorResponseBodyEnable.php} | 92 +- lib/Model/AiAcceleratorResponseCustomer.php | 314 ++ .../AiAcceleratorResponseCustomerCustomer.php | 344 ++ lib/Model/AiAcceleratorResponseLinks.php | 314 ++ ...hp => AiAcceleratorResponseLinksLinks.php} | 34 +- lib/Model/AiAcceleratorResponseProduct.php | 314 ++ .../AiAcceleratorResponseProductProduct.php | 344 ++ lib/Model/Backend.php | 2 +- lib/Model/BackendResponse.php | 2 +- lib/Model/BotManagementResponseBodyEnable.php | 374 ++ lib/Model/BotManagementResponseLinks.php | 314 ++ lib/Model/BotManagementResponseLinksLinks.php | 344 ++ lib/Model/BotManagementResponseProduct.php | 314 ++ .../BotManagementResponseProductProduct.php | 344 ++ lib/Model/BotManagementResponseService.php | 314 ++ ...> BotManagementResponseServiceService.php} | 8 +- .../BrotliCompressionResponseBodyEnable.php | 374 ++ lib/Model/BrotliCompressionResponseLinks.php | 314 ++ .../BrotliCompressionResponseLinksLinks.php | 344 ++ .../BrotliCompressionResponseProduct.php | 314 ++ ...rotliCompressionResponseProductProduct.php | 344 ++ .../BrotliCompressionResponseService.php | 314 ++ lib/Model/ComputeAclList.php | 345 ++ ...lyServiceId.php => ComputeAclListMeta.php} | 44 +- lib/Model/ComputeAclLookup.php | 32 +- ...osProtectionRequestUpdateConfiguration.php | 353 ++ .../DdosProtectionResponseConfiguration.php | 314 ++ ...tionResponseConfigurationConfiguration.php | 314 ++ lib/Model/DdosProtectionResponseConfigure.php | 404 +++ lib/Model/DdosProtectionResponseEnable.php | 374 ++ lib/Model/DdosProtectionResponseLinks.php | 314 ++ .../DdosProtectionResponseLinksLinks.php | 344 ++ lib/Model/DdosProtectionResponseProduct.php | 314 ++ .../DdosProtectionResponseProductProduct.php | 344 ++ lib/Model/DdosProtectionResponseService.php | 314 ++ lib/Model/DomainInspectorMeasurements.php | 180 +- .../DomainInspectorResponseBodyEnable.php | 374 ++ lib/Model/DomainInspectorResponseLinks.php | 314 ++ .../DomainInspectorResponseLinksLinks.php | 344 ++ lib/Model/DomainInspectorResponseProduct.php | 314 ++ .../DomainInspectorResponseProductProduct.php | 344 ++ lib/Model/DomainInspectorResponseService.php | 314 ++ lib/Model/FanoutResponseBodyEnable.php | 374 ++ lib/Model/FanoutResponseLinks.php | 314 ++ ...Links.php => FanoutResponseLinksLinks.php} | 8 +- lib/Model/FanoutResponseProduct.php | 314 ++ ...t.php => FanoutResponseProductProduct.php} | 8 +- lib/Model/FanoutResponseService.php | 314 ++ .../ImageOptimizerResponseBodyEnable.php | 374 ++ lib/Model/ImageOptimizerResponseLinks.php | 314 ++ .../ImageOptimizerResponseLinksLinks.php | 344 ++ lib/Model/ImageOptimizerResponseProduct.php | 314 ++ .../ImageOptimizerResponseProductProduct.php | 344 ++ lib/Model/ImageOptimizerResponseService.php | 314 ++ lib/Model/InlineResponse2003.php | 12 +- lib/Model/InlineResponse2003Meta.php | 345 -- lib/Model/InlineResponse2004.php | 6 +- lib/Model/InlineResponse2004Meta.php | 344 -- .../{Batch.php => KvStoreBatchResponse.php} | 14 +- ...ors.php => KvStoreBatchResponseErrors.php} | 14 +- .../{StoreResponse.php => KvStoreDetails.php} | 10 +- ...acyWafTag.php => KvStoreRequestCreate.php} | 15 +- ...pdateStatus.php => KvStoreUpsertBatch.php} | 182 +- lib/Model/LegacyWafConfigurationSet.php | 344 -- lib/Model/LegacyWafFirewall.php | 554 --- lib/Model/LegacyWafOwasp.php | 1154 ------- lib/Model/LegacyWafRule.php | 434 --- lib/Model/LegacyWafRuleset.php | 344 -- .../LogExplorerInsightsResponseBodyEnable.php | 374 ++ .../LogExplorerInsightsResponseLinks.php | 314 ++ .../LogExplorerInsightsResponseLinksLinks.php | 344 ++ .../LogExplorerInsightsResponseProduct.php | 314 ++ ...ExplorerInsightsResponseProductProduct.php | 344 ++ .../LogExplorerInsightsResponseService.php | 314 ++ ...WorkspaceId.php => NgwafRequestEnable.php} | 15 +- ...hp => NgwafRequestUpdateConfiguration.php} | 52 +- lib/Model/NgwafResponseConfiguration.php | 314 ++ ...wafResponseConfigurationConfiguration.php} | 10 +- ...esponse.php => NgwafResponseConfigure.php} | 32 +- ...ctResponse.php => NgwafResponseEnable.php} | 26 +- lib/Model/NgwafResponseLinks.php | 314 ++ ...eLinks.php => NgwafResponseLinksLinks.php} | 8 +- lib/Model/NgwafResponseProduct.php | 314 ++ lib/Model/NgwafResponseProductProduct.php | 344 ++ lib/Model/NgwafResponseService.php | 314 ++ lib/Model/ObjectStorageResponseBodyEnable.php | 374 ++ lib/Model/ObjectStorageResponseCustomer.php | 314 ++ lib/Model/ObjectStorageResponseLinks.php | 314 ++ ...hp => ObjectStorageResponseLinksLinks.php} | 43 +- lib/Model/ObjectStorageResponseProduct.php | 314 ++ .../ObjectStorageResponseProductProduct.php | 344 ++ lib/Model/OriginInspectorMeasurements.php | 424 ++- .../OriginInspectorResponseBodyEnable.php | 374 ++ lib/Model/OriginInspectorResponseLinks.php | 314 ++ .../OriginInspectorResponseLinksLinks.php | 344 ++ lib/Model/OriginInspectorResponseProduct.php | 314 ++ .../OriginInspectorResponseProductProduct.php | 344 ++ lib/Model/OriginInspectorResponseService.php | 314 ++ lib/Model/OriginInspectorValues.php | 424 ++- lib/Model/Realtime.php | 4 +- lib/Model/RealtimeEntryAggregated.php | 972 ++++-- lib/Model/RealtimeMeasurements.php | 972 ++++-- lib/Model/Results.php | 974 ++++-- lib/Model/Values.php | 180 +- lib/Model/WebsocketsResponseBodyEnable.php | 374 ++ lib/Model/WebsocketsResponseLinks.php | 314 ++ lib/Model/WebsocketsResponseLinksLinks.php | 344 ++ lib/Model/WebsocketsResponseProduct.php | 314 ++ ...p => WebsocketsResponseProductProduct.php} | 8 +- lib/Model/WebsocketsResponseService.php | 314 ++ sig.json | 2 +- 277 files changed, 37602 insertions(+), 14183 deletions(-) delete mode 100644 docs/Api/EnabledProductsApi.md delete mode 100644 docs/Api/LegacyWafConfigurationSetsApi.md delete mode 100644 docs/Api/LegacyWafFirewallApi.md delete mode 100644 docs/Api/LegacyWafOwaspApi.md delete mode 100644 docs/Api/LegacyWafRuleApi.md delete mode 100644 docs/Api/LegacyWafRuleStatusApi.md delete mode 100644 docs/Api/LegacyWafRulesetApi.md delete mode 100644 docs/Api/LegacyWafTagApi.md delete mode 100644 docs/Api/LegacyWafUpdateStatusApi.md create mode 100644 docs/Api/ProductAiAcceleratorApi.md create mode 100644 docs/Api/ProductBotManagementApi.md create mode 100644 docs/Api/ProductBrotliCompressionApi.md create mode 100644 docs/Api/ProductDdosProtectionApi.md create mode 100644 docs/Api/ProductDomainInspectorApi.md create mode 100644 docs/Api/ProductFanoutApi.md create mode 100644 docs/Api/ProductImageOptimizerApi.md create mode 100644 docs/Api/ProductLogExplorerInsightsApi.md create mode 100644 docs/Api/ProductNgwafApi.md create mode 100644 docs/Api/ProductObjectStorageApi.md create mode 100644 docs/Api/ProductOriginInspectorApi.md create mode 100644 docs/Api/ProductWebsocketsApi.md create mode 100644 docs/Model/AiAcceleratorResponseBodyEnable.md create mode 100644 docs/Model/AiAcceleratorResponseCustomer.md create mode 100644 docs/Model/AiAcceleratorResponseCustomerCustomer.md create mode 100644 docs/Model/AiAcceleratorResponseLinks.md create mode 100644 docs/Model/AiAcceleratorResponseLinksLinks.md create mode 100644 docs/Model/AiAcceleratorResponseProduct.md create mode 100644 docs/Model/AiAcceleratorResponseProductProduct.md delete mode 100644 docs/Model/BatchErrors.md create mode 100644 docs/Model/BotManagementResponseBodyEnable.md create mode 100644 docs/Model/BotManagementResponseLinks.md create mode 100644 docs/Model/BotManagementResponseLinksLinks.md create mode 100644 docs/Model/BotManagementResponseProduct.md create mode 100644 docs/Model/BotManagementResponseProductProduct.md create mode 100644 docs/Model/BotManagementResponseService.md rename docs/Model/{EnabledProductResponseService.md => BotManagementResponseServiceService.md} (88%) create mode 100644 docs/Model/BrotliCompressionResponseBodyEnable.md create mode 100644 docs/Model/BrotliCompressionResponseLinks.md create mode 100644 docs/Model/BrotliCompressionResponseLinksLinks.md create mode 100644 docs/Model/BrotliCompressionResponseProduct.md create mode 100644 docs/Model/BrotliCompressionResponseProductProduct.md create mode 100644 docs/Model/BrotliCompressionResponseService.md create mode 100644 docs/Model/ComputeAclList.md rename docs/Model/{ReadOnlyServiceId.md => ComputeAclListMeta.md} (72%) delete mode 100644 docs/Model/ConfiguredProductResponse.md rename docs/Model/{InlineResponse2004Meta.md => DdosProtectionRequestUpdateConfiguration.md} (61%) create mode 100644 docs/Model/DdosProtectionResponseConfiguration.md rename docs/Model/{Store.md => DdosProtectionResponseConfigurationConfiguration.md} (65%) create mode 100644 docs/Model/DdosProtectionResponseConfigure.md create mode 100644 docs/Model/DdosProtectionResponseEnable.md rename docs/Model/{InlineResponse2003Meta.md => DdosProtectionResponseLinks.md} (56%) create mode 100644 docs/Model/DdosProtectionResponseLinksLinks.md create mode 100644 docs/Model/DdosProtectionResponseProduct.md create mode 100644 docs/Model/DdosProtectionResponseProductProduct.md create mode 100644 docs/Model/DdosProtectionResponseService.md create mode 100644 docs/Model/DomainInspectorResponseBodyEnable.md create mode 100644 docs/Model/DomainInspectorResponseLinks.md create mode 100644 docs/Model/DomainInspectorResponseLinksLinks.md create mode 100644 docs/Model/DomainInspectorResponseProduct.md create mode 100644 docs/Model/DomainInspectorResponseProductProduct.md create mode 100644 docs/Model/DomainInspectorResponseService.md delete mode 100644 docs/Model/EnabledProductResponse.md create mode 100644 docs/Model/FanoutResponseBodyEnable.md create mode 100644 docs/Model/FanoutResponseLinks.md rename docs/Model/{EnabledProductResponseLinks.md => FanoutResponseLinksLinks.md} (91%) create mode 100644 docs/Model/FanoutResponseProduct.md rename docs/Model/{EnabledProductResponseProduct.md => FanoutResponseProductProduct.md} (90%) create mode 100644 docs/Model/FanoutResponseService.md create mode 100644 docs/Model/ImageOptimizerResponseBodyEnable.md create mode 100644 docs/Model/ImageOptimizerResponseLinks.md create mode 100644 docs/Model/ImageOptimizerResponseLinksLinks.md create mode 100644 docs/Model/ImageOptimizerResponseProduct.md create mode 100644 docs/Model/ImageOptimizerResponseProductProduct.md create mode 100644 docs/Model/ImageOptimizerResponseService.md rename docs/Model/{Batch.md => KvStoreBatchResponse.md} (67%) create mode 100644 docs/Model/KvStoreBatchResponseErrors.md rename docs/Model/{StoreResponse.md => KvStoreDetails.md} (72%) create mode 100644 docs/Model/KvStoreRequestCreate.md create mode 100644 docs/Model/KvStoreUpsertBatch.md delete mode 100644 docs/Model/LegacyWafConfigurationSet.md delete mode 100644 docs/Model/LegacyWafFirewall.md delete mode 100644 docs/Model/LegacyWafOwasp.md delete mode 100644 docs/Model/LegacyWafRule.md delete mode 100644 docs/Model/LegacyWafRuleStatus.md delete mode 100644 docs/Model/LegacyWafUpdateStatus.md create mode 100644 docs/Model/LogExplorerInsightsResponseBodyEnable.md create mode 100644 docs/Model/LogExplorerInsightsResponseLinks.md create mode 100644 docs/Model/LogExplorerInsightsResponseLinksLinks.md create mode 100644 docs/Model/LogExplorerInsightsResponseProduct.md create mode 100644 docs/Model/LogExplorerInsightsResponseProductProduct.md create mode 100644 docs/Model/LogExplorerInsightsResponseService.md rename docs/Model/{LegacyWafTag.md => NgwafRequestEnable.md} (70%) create mode 100644 docs/Model/NgwafRequestUpdateConfiguration.md rename docs/Model/{LegacyWafRuleset.md => NgwafResponseConfiguration.md} (54%) rename docs/Model/{ConfiguredProductResponseConfiguration.md => NgwafResponseConfigurationConfiguration.md} (66%) create mode 100644 docs/Model/NgwafResponseConfigure.md create mode 100644 docs/Model/NgwafResponseEnable.md rename docs/Model/{ReadOnlyVersion.md => NgwafResponseLinks.md} (61%) rename docs/Model/{ConfiguredProductResponseLinks.md => NgwafResponseLinksLinks.md} (90%) create mode 100644 docs/Model/NgwafResponseProduct.md rename docs/Model/{ConfiguredProductResponseProduct.md => NgwafResponseProductProduct.md} (89%) create mode 100644 docs/Model/NgwafResponseService.md create mode 100644 docs/Model/ObjectStorageResponseBodyEnable.md create mode 100644 docs/Model/ObjectStorageResponseCustomer.md create mode 100644 docs/Model/ObjectStorageResponseLinks.md create mode 100644 docs/Model/ObjectStorageResponseLinksLinks.md create mode 100644 docs/Model/ObjectStorageResponseProduct.md create mode 100644 docs/Model/ObjectStorageResponseProductProduct.md create mode 100644 docs/Model/OriginInspectorResponseBodyEnable.md create mode 100644 docs/Model/OriginInspectorResponseLinks.md create mode 100644 docs/Model/OriginInspectorResponseLinksLinks.md create mode 100644 docs/Model/OriginInspectorResponseProduct.md create mode 100644 docs/Model/OriginInspectorResponseProductProduct.md create mode 100644 docs/Model/OriginInspectorResponseService.md delete mode 100644 docs/Model/SetConfiguration.md delete mode 100644 docs/Model/SetWorkspaceId.md create mode 100644 docs/Model/WebsocketsResponseBodyEnable.md create mode 100644 docs/Model/WebsocketsResponseLinks.md create mode 100644 docs/Model/WebsocketsResponseLinksLinks.md create mode 100644 docs/Model/WebsocketsResponseProduct.md create mode 100644 docs/Model/WebsocketsResponseProductProduct.md create mode 100644 docs/Model/WebsocketsResponseService.md delete mode 100644 lib/Api/LegacyWafFirewallApi.php delete mode 100644 lib/Api/LegacyWafRuleStatusApi.php delete mode 100644 lib/Api/LegacyWafTagApi.php create mode 100644 lib/Api/ProductAiAcceleratorApi.php rename lib/Api/{LegacyWafRulesetApi.php => ProductBotManagementApi.php} (75%) rename lib/Api/{LegacyWafOwaspApi.php => ProductBrotliCompressionApi.php} (73%) rename lib/Api/{LegacyWafRuleApi.php => ProductDdosProtectionApi.php} (64%) create mode 100644 lib/Api/ProductDomainInspectorApi.php rename lib/Api/{LegacyWafUpdateStatusApi.php => ProductFanoutApi.php} (64%) create mode 100644 lib/Api/ProductImageOptimizerApi.php rename lib/Api/{LegacyWafConfigurationSetsApi.php => ProductLogExplorerInsightsApi.php} (75%) rename lib/Api/{EnabledProductsApi.php => ProductNgwafApi.php} (80%) create mode 100644 lib/Api/ProductObjectStorageApi.php create mode 100644 lib/Api/ProductOriginInspectorApi.php create mode 100644 lib/Api/ProductWebsocketsApi.php rename lib/Model/{LegacyWafRuleStatus.php => AiAcceleratorResponseBodyEnable.php} (74%) create mode 100644 lib/Model/AiAcceleratorResponseCustomer.php create mode 100644 lib/Model/AiAcceleratorResponseCustomerCustomer.php create mode 100644 lib/Model/AiAcceleratorResponseLinks.php rename lib/Model/{Store.php => AiAcceleratorResponseLinksLinks.php} (89%) create mode 100644 lib/Model/AiAcceleratorResponseProduct.php create mode 100644 lib/Model/AiAcceleratorResponseProductProduct.php create mode 100644 lib/Model/BotManagementResponseBodyEnable.php create mode 100644 lib/Model/BotManagementResponseLinks.php create mode 100644 lib/Model/BotManagementResponseLinksLinks.php create mode 100644 lib/Model/BotManagementResponseProduct.php create mode 100644 lib/Model/BotManagementResponseProductProduct.php create mode 100644 lib/Model/BotManagementResponseService.php rename lib/Model/{EnabledProductResponseService.php => BotManagementResponseServiceService.php} (96%) create mode 100644 lib/Model/BrotliCompressionResponseBodyEnable.php create mode 100644 lib/Model/BrotliCompressionResponseLinks.php create mode 100644 lib/Model/BrotliCompressionResponseLinksLinks.php create mode 100644 lib/Model/BrotliCompressionResponseProduct.php create mode 100644 lib/Model/BrotliCompressionResponseProductProduct.php create mode 100644 lib/Model/BrotliCompressionResponseService.php create mode 100644 lib/Model/ComputeAclList.php rename lib/Model/{ReadOnlyServiceId.php => ComputeAclListMeta.php} (87%) create mode 100644 lib/Model/DdosProtectionRequestUpdateConfiguration.php create mode 100644 lib/Model/DdosProtectionResponseConfiguration.php create mode 100644 lib/Model/DdosProtectionResponseConfigurationConfiguration.php create mode 100644 lib/Model/DdosProtectionResponseConfigure.php create mode 100644 lib/Model/DdosProtectionResponseEnable.php create mode 100644 lib/Model/DdosProtectionResponseLinks.php create mode 100644 lib/Model/DdosProtectionResponseLinksLinks.php create mode 100644 lib/Model/DdosProtectionResponseProduct.php create mode 100644 lib/Model/DdosProtectionResponseProductProduct.php create mode 100644 lib/Model/DdosProtectionResponseService.php create mode 100644 lib/Model/DomainInspectorResponseBodyEnable.php create mode 100644 lib/Model/DomainInspectorResponseLinks.php create mode 100644 lib/Model/DomainInspectorResponseLinksLinks.php create mode 100644 lib/Model/DomainInspectorResponseProduct.php create mode 100644 lib/Model/DomainInspectorResponseProductProduct.php create mode 100644 lib/Model/DomainInspectorResponseService.php create mode 100644 lib/Model/FanoutResponseBodyEnable.php create mode 100644 lib/Model/FanoutResponseLinks.php rename lib/Model/{EnabledProductResponseLinks.php => FanoutResponseLinksLinks.php} (96%) create mode 100644 lib/Model/FanoutResponseProduct.php rename lib/Model/{EnabledProductResponseProduct.php => FanoutResponseProductProduct.php} (96%) create mode 100644 lib/Model/FanoutResponseService.php create mode 100644 lib/Model/ImageOptimizerResponseBodyEnable.php create mode 100644 lib/Model/ImageOptimizerResponseLinks.php create mode 100644 lib/Model/ImageOptimizerResponseLinksLinks.php create mode 100644 lib/Model/ImageOptimizerResponseProduct.php create mode 100644 lib/Model/ImageOptimizerResponseProductProduct.php create mode 100644 lib/Model/ImageOptimizerResponseService.php delete mode 100644 lib/Model/InlineResponse2003Meta.php delete mode 100644 lib/Model/InlineResponse2004Meta.php rename lib/Model/{Batch.php => KvStoreBatchResponse.php} (94%) rename lib/Model/{BatchErrors.php => KvStoreBatchResponseErrors.php} (93%) rename lib/Model/{StoreResponse.php => KvStoreDetails.php} (96%) rename lib/Model/{LegacyWafTag.php => KvStoreRequestCreate.php} (91%) rename lib/Model/{LegacyWafUpdateStatus.php => KvStoreUpsertBatch.php} (63%) delete mode 100644 lib/Model/LegacyWafConfigurationSet.php delete mode 100644 lib/Model/LegacyWafFirewall.php delete mode 100644 lib/Model/LegacyWafOwasp.php delete mode 100644 lib/Model/LegacyWafRule.php delete mode 100644 lib/Model/LegacyWafRuleset.php create mode 100644 lib/Model/LogExplorerInsightsResponseBodyEnable.php create mode 100644 lib/Model/LogExplorerInsightsResponseLinks.php create mode 100644 lib/Model/LogExplorerInsightsResponseLinksLinks.php create mode 100644 lib/Model/LogExplorerInsightsResponseProduct.php create mode 100644 lib/Model/LogExplorerInsightsResponseProductProduct.php create mode 100644 lib/Model/LogExplorerInsightsResponseService.php rename lib/Model/{SetWorkspaceId.php => NgwafRequestEnable.php} (93%) rename lib/Model/{SetConfiguration.php => NgwafRequestUpdateConfiguration.php} (83%) create mode 100644 lib/Model/NgwafResponseConfiguration.php rename lib/Model/{ConfiguredProductResponseConfiguration.php => NgwafResponseConfigurationConfiguration.php} (95%) rename lib/Model/{ConfiguredProductResponse.php => NgwafResponseConfigure.php} (87%) rename lib/Model/{EnabledProductResponse.php => NgwafResponseEnable.php} (89%) create mode 100644 lib/Model/NgwafResponseLinks.php rename lib/Model/{ConfiguredProductResponseLinks.php => NgwafResponseLinksLinks.php} (96%) create mode 100644 lib/Model/NgwafResponseProduct.php create mode 100644 lib/Model/NgwafResponseProductProduct.php create mode 100644 lib/Model/NgwafResponseService.php create mode 100644 lib/Model/ObjectStorageResponseBodyEnable.php create mode 100644 lib/Model/ObjectStorageResponseCustomer.php create mode 100644 lib/Model/ObjectStorageResponseLinks.php rename lib/Model/{ReadOnlyVersion.php => ObjectStorageResponseLinksLinks.php} (87%) create mode 100644 lib/Model/ObjectStorageResponseProduct.php create mode 100644 lib/Model/ObjectStorageResponseProductProduct.php create mode 100644 lib/Model/OriginInspectorResponseBodyEnable.php create mode 100644 lib/Model/OriginInspectorResponseLinks.php create mode 100644 lib/Model/OriginInspectorResponseLinksLinks.php create mode 100644 lib/Model/OriginInspectorResponseProduct.php create mode 100644 lib/Model/OriginInspectorResponseProductProduct.php create mode 100644 lib/Model/OriginInspectorResponseService.php create mode 100644 lib/Model/WebsocketsResponseBodyEnable.php create mode 100644 lib/Model/WebsocketsResponseLinks.php create mode 100644 lib/Model/WebsocketsResponseLinksLinks.php create mode 100644 lib/Model/WebsocketsResponseProduct.php rename lib/Model/{ConfiguredProductResponseProduct.php => WebsocketsResponseProductProduct.php} (96%) create mode 100644 lib/Model/WebsocketsResponseService.php diff --git a/CHANGELOG.md b/CHANGELOG.md index ae712403..b5a13529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,61 @@ # Changelog +## [v7.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v7.0.0) (2025-02-26) + +**Breaking Changes:** + +- fix(snippet): Renamed `snippet_id` and `snippet_name` properties to `id` and `name` respectively. +- feat(kv_store, kv_store_item): KV store endpoints have new operation names, and the associated data models also have + new names. +- feat(product): Product enablement and configuration endpoints have been renamed into per-product operations. +- fix(historical): Widened integer stats fields to 64 bits. +- fix(realtime, domain_inspector): Widened integer stats fields to 64 bits. +- fix(historical): Corrected field names of `ddos_protection_requests_detect_count`, + `ddos_protection_requests_mitigate_count`, and `ddos_protection_requests_allow_count`. +- fix(realtime): Corrected field names of `ddos_protection_requests_detect_count`, + `ddos_protection_requests_mitigate_count`, and `ddos_protection_requests_allow_count`. +- fix(billing_usage_metrics): added parameters `req_start_month` and `req_end_month`. +- deprecated(billing): Billing v2 API has been deprecated. +- removed(legacy_waf): Legacy WAF API has been removed. + +**Bug fixes:** + +- bugfix(php): Define apiKeys on the Configuration class (Fix PHP deprecated syntax) +- fix(snippet): Marked `content` as nullable to support dynamic snippets. +- fix(billing_usage_metrics): `product_id` and `usage_type_name` parameters are no longer required. + +**Enhancements:** + +- feat(products): Added `object_storage` and `ai_accelerator` products. +- feat(historical): Added new metrics: `object_storage_class_a_operations_count`, + `object_storage_class_b_operations_count`, `aia_requests`, `aia_status_1xx`, + `aia_status_2xx`, `aia_status_3xx`, `aia_status_5xx`, `aia_response_usage_tokens`, + `aia_origin_usage_tokens`, `aia_estimated_time_saved_ms`, `request_collapse_usable_count`, + `request_collapse_unusable_count`, `status_530`, and `compute_cache_operations_count`. +- feat(realtime): Added new metrics: `object_storage_class_a_operations_count`, + `object_storage_class_b_operations_count`, `aia_requests`, `aia_status_1xx`, + `aia_status_2xx`, `aia_status_3xx`, `aia_status_5xx`, `aia_response_usage_tokens`, + `aia_origin_usage_tokens`, `aia_estimated_time_saved_ms`, `request_collapse_usable_count`, + `request_collapse_unusable_count`, `status_530`, and `compute_cache_operations_count`. +- feat(object_storage_access_keys): Added Object Storage Access Keys API. +- feat(domain_inspector_historical, domain_inspector_realtime): Added new metrics: `status_530` and `origin_status_530`. +- feat(origin_inspector_historical, origin_inspector_realtime): Added new metrics: `status_530`, `waf_status_530`, + `compute_status_530`, and `all_status_530`. +- feat(kv_store_item): Added support for `if-generation-match`. +- feat(acls_in_compute): Added ACLs in Compute API. + +**Documentation:** + +- doc(billing_usage_metrics): Documented that `start_month` and `end_month` are required. +- doc(historical): Correct default start time in description of Historical Stats API. +- doc(domain_inspector_historical): Removed duplicate description. +- doc(domain_inspector_realtime): Removed duplicate description. +- doc(origin_inspector_historical): Removed duplicate description. +- doc(origin_inspector_realtime): Removed duplicate description. +- doc(backend): Updated description of Backend API. +- doc(backend): Clarified default behavior of keepalive_time. +- doc(waf): Updated EOL notice of legacy-waf. + ## [v6.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v6.0.0) (2024-12-05) **Breaking Changes:** diff --git a/README.md b/README.md index 69e8c25e..54c7ee6f 100644 --- a/README.md +++ b/README.md @@ -199,11 +199,6 @@ Class | Method | Description [*DomainInspectorRealtimeApi*](docs/Api/DomainInspectorRealtimeApi.md) | [**getDomainInspectorLastMaxEntries**](docs/Api/DomainInspectorRealtimeApi.md#getdomaininspectorlastmaxentries) | Get a limited number of real-time domain data entries [*DomainInspectorRealtimeApi*](docs/Api/DomainInspectorRealtimeApi.md) | [**getDomainInspectorLastSecond**](docs/Api/DomainInspectorRealtimeApi.md#getdomaininspectorlastsecond) | Get real-time domain data from a specified time [*DomainOwnershipsApi*](docs/Api/DomainOwnershipsApi.md) | [**listDomainOwnerships**](docs/Api/DomainOwnershipsApi.md#listdomainownerships) | List domain-ownerships -[*EnabledProductsApi*](docs/Api/EnabledProductsApi.md) | [**disableProduct**](docs/Api/EnabledProductsApi.md#disableproduct) | Disable a product -[*EnabledProductsApi*](docs/Api/EnabledProductsApi.md) | [**enableProduct**](docs/Api/EnabledProductsApi.md#enableproduct) | Enable a product -[*EnabledProductsApi*](docs/Api/EnabledProductsApi.md) | [**getEnabledProduct**](docs/Api/EnabledProductsApi.md#getenabledproduct) | Get enabled product -[*EnabledProductsApi*](docs/Api/EnabledProductsApi.md) | [**getProductConfiguration**](docs/Api/EnabledProductsApi.md#getproductconfiguration) | Get configuration for a product -[*EnabledProductsApi*](docs/Api/EnabledProductsApi.md) | [**setProductConfiguration**](docs/Api/EnabledProductsApi.md#setproductconfiguration) | Update configuration for a product [*EventsApi*](docs/Api/EventsApi.md) | [**getEvent**](docs/Api/EventsApi.md#getevent) | Get an event [*EventsApi*](docs/Api/EventsApi.md) | [**listEvents**](docs/Api/EventsApi.md#listevents) | List events [*GzipApi*](docs/Api/GzipApi.md) | [**createGzipConfig**](docs/Api/GzipApi.md#creategzipconfig) | Create a gzip configuration @@ -270,42 +265,14 @@ Class | Method | Description [*InvitationsApi*](docs/Api/InvitationsApi.md) | [**createInvitation**](docs/Api/InvitationsApi.md#createinvitation) | Create an invitation [*InvitationsApi*](docs/Api/InvitationsApi.md) | [**deleteInvitation**](docs/Api/InvitationsApi.md#deleteinvitation) | Delete an invitation [*InvitationsApi*](docs/Api/InvitationsApi.md) | [**listInvitations**](docs/Api/InvitationsApi.md#listinvitations) | List invitations -[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**createStore**](docs/Api/KvStoreApi.md#createstore) | Create a KV store. -[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**deleteStore**](docs/Api/KvStoreApi.md#deletestore) | Delete a KV store. -[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**getStore**](docs/Api/KvStoreApi.md#getstore) | Describe a KV store. -[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**getStores**](docs/Api/KvStoreApi.md#getstores) | List KV stores. -[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**deleteKeyFromStore**](docs/Api/KvStoreItemApi.md#deletekeyfromstore) | Delete kv store item. -[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**getKeys**](docs/Api/KvStoreItemApi.md#getkeys) | List kv store keys. -[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**getValueForKey**](docs/Api/KvStoreItemApi.md#getvalueforkey) | Get the value of an kv store item -[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**setValueForKey**](docs/Api/KvStoreItemApi.md#setvalueforkey) | Insert an item into an kv store -[*LegacyWafConfigurationSetsApi*](docs/Api/LegacyWafConfigurationSetsApi.md) | [**listWafConfigSets**](docs/Api/LegacyWafConfigurationSetsApi.md#listwafconfigsets) | List configuration sets -[*LegacyWafConfigurationSetsApi*](docs/Api/LegacyWafConfigurationSetsApi.md) | [**listWafsConfigSet**](docs/Api/LegacyWafConfigurationSetsApi.md#listwafsconfigset) | List WAFs currently using a configuration set -[*LegacyWafConfigurationSetsApi*](docs/Api/LegacyWafConfigurationSetsApi.md) | [**useWafConfigSet**](docs/Api/LegacyWafConfigurationSetsApi.md#usewafconfigset) | Apply a configuration set to a WAF -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**createLegacyWafFirewallService**](docs/Api/LegacyWafFirewallApi.md#createlegacywaffirewallservice) | Create a firewall -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**disableLegacyWafFirewall**](docs/Api/LegacyWafFirewallApi.md#disablelegacywaffirewall) | Disable a firewall -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**enableLegacyWafFirewall**](docs/Api/LegacyWafFirewallApi.md#enablelegacywaffirewall) | Enable a firewall -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**getLegacyWafFirewall**](docs/Api/LegacyWafFirewallApi.md#getlegacywaffirewall) | Get a firewall object -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**getLegacyWafFirewallService**](docs/Api/LegacyWafFirewallApi.md#getlegacywaffirewallservice) | Get a firewall -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**listLegacyWafFirewalls**](docs/Api/LegacyWafFirewallApi.md#listlegacywaffirewalls) | List active firewalls -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**listLegacyWafFirewallsService**](docs/Api/LegacyWafFirewallApi.md#listlegacywaffirewallsservice) | List firewalls -[*LegacyWafFirewallApi*](docs/Api/LegacyWafFirewallApi.md) | [**updateLegacyWafFirewallService**](docs/Api/LegacyWafFirewallApi.md#updatelegacywaffirewallservice) | Update a firewall -[*LegacyWafOwaspApi*](docs/Api/LegacyWafOwaspApi.md) | [**createOwaspSettings**](docs/Api/LegacyWafOwaspApi.md#createowaspsettings) | Create an OWASP settings object -[*LegacyWafOwaspApi*](docs/Api/LegacyWafOwaspApi.md) | [**getOwaspSettings**](docs/Api/LegacyWafOwaspApi.md#getowaspsettings) | Get the OWASP settings object -[*LegacyWafOwaspApi*](docs/Api/LegacyWafOwaspApi.md) | [**updateOwaspSettings**](docs/Api/LegacyWafOwaspApi.md#updateowaspsettings) | Update the OWASP settings object -[*LegacyWafRuleApi*](docs/Api/LegacyWafRuleApi.md) | [**getLegacyWafFirewallRuleVcl**](docs/Api/LegacyWafRuleApi.md#getlegacywaffirewallrulevcl) | Get VCL for a rule associated with a firewall -[*LegacyWafRuleApi*](docs/Api/LegacyWafRuleApi.md) | [**getLegacyWafRule**](docs/Api/LegacyWafRuleApi.md#getlegacywafrule) | Get a rule -[*LegacyWafRuleApi*](docs/Api/LegacyWafRuleApi.md) | [**getLegacyWafRuleVcl**](docs/Api/LegacyWafRuleApi.md#getlegacywafrulevcl) | Get VCL for a rule -[*LegacyWafRuleApi*](docs/Api/LegacyWafRuleApi.md) | [**listLegacyWafRules**](docs/Api/LegacyWafRuleApi.md#listlegacywafrules) | List rules in the latest configuration set -[*LegacyWafRuleStatusApi*](docs/Api/LegacyWafRuleStatusApi.md) | [**getWafFirewallRuleStatus**](docs/Api/LegacyWafRuleStatusApi.md#getwaffirewallrulestatus) | Get the status of a rule on a firewall -[*LegacyWafRuleStatusApi*](docs/Api/LegacyWafRuleStatusApi.md) | [**listWafFirewallRuleStatuses**](docs/Api/LegacyWafRuleStatusApi.md#listwaffirewallrulestatuses) | List rule statuses -[*LegacyWafRuleStatusApi*](docs/Api/LegacyWafRuleStatusApi.md) | [**updateWafFirewallRuleStatus**](docs/Api/LegacyWafRuleStatusApi.md#updatewaffirewallrulestatus) | Update the status of a rule -[*LegacyWafRuleStatusApi*](docs/Api/LegacyWafRuleStatusApi.md) | [**updateWafFirewallRuleStatusesTag**](docs/Api/LegacyWafRuleStatusApi.md#updatewaffirewallrulestatusestag) | Create or update status of a tagged group of rules -[*LegacyWafRulesetApi*](docs/Api/LegacyWafRulesetApi.md) | [**getWafRuleset**](docs/Api/LegacyWafRulesetApi.md#getwafruleset) | Get a WAF ruleset -[*LegacyWafRulesetApi*](docs/Api/LegacyWafRulesetApi.md) | [**getWafRulesetVcl**](docs/Api/LegacyWafRulesetApi.md#getwafrulesetvcl) | Generate WAF ruleset VCL -[*LegacyWafRulesetApi*](docs/Api/LegacyWafRulesetApi.md) | [**updateWafRuleset**](docs/Api/LegacyWafRulesetApi.md#updatewafruleset) | Update a WAF ruleset -[*LegacyWafTagApi*](docs/Api/LegacyWafTagApi.md) | [**listLegacyWafTags**](docs/Api/LegacyWafTagApi.md#listlegacywaftags) | List WAF tags -[*LegacyWafUpdateStatusApi*](docs/Api/LegacyWafUpdateStatusApi.md) | [**getWafUpdateStatus**](docs/Api/LegacyWafUpdateStatusApi.md#getwafupdatestatus) | Get the status of a WAF update -[*LegacyWafUpdateStatusApi*](docs/Api/LegacyWafUpdateStatusApi.md) | [**listWafUpdateStatuses**](docs/Api/LegacyWafUpdateStatusApi.md#listwafupdatestatuses) | List update statuses +[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreCreate**](docs/Api/KvStoreApi.md#kvstorecreate) | Create a KV store. +[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreDelete**](docs/Api/KvStoreApi.md#kvstoredelete) | Delete a KV store. +[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreGet**](docs/Api/KvStoreApi.md#kvstoreget) | Describe a KV store. +[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreList**](docs/Api/KvStoreApi.md#kvstorelist) | List all KV stores. +[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreDeleteItem**](docs/Api/KvStoreItemApi.md#kvstoredeleteitem) | Delete an item. +[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreGetItem**](docs/Api/KvStoreItemApi.md#kvstoregetitem) | Get an item. +[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreListItemKeys**](docs/Api/KvStoreItemApi.md#kvstorelistitemkeys) | List item keys. +[*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreUpsertItem**](docs/Api/KvStoreItemApi.md#kvstoreupsertitem) | Insert or update an item. [*LogExplorerApi*](docs/Api/LogExplorerApi.md) | [**getLogRecords**](docs/Api/LogExplorerApi.md#getlogrecords) | Retrieve log records [*LoggingAzureblobApi*](docs/Api/LoggingAzureblobApi.md) | [**createLogAzure**](docs/Api/LoggingAzureblobApi.md#createlogazure) | Create an Azure Blob Storage log endpoint [*LoggingAzureblobApi*](docs/Api/LoggingAzureblobApi.md) | [**deleteLogAzure**](docs/Api/LoggingAzureblobApi.md#deletelogazure) | Delete the Azure Blob Storage log endpoint @@ -473,6 +440,46 @@ Class | Method | Description [*PoolApi*](docs/Api/PoolApi.md) | [**listServerPools**](docs/Api/PoolApi.md#listserverpools) | List server pools [*PoolApi*](docs/Api/PoolApi.md) | [**updateServerPool**](docs/Api/PoolApi.md#updateserverpool) | Update a server pool [*PopApi*](docs/Api/PopApi.md) | [**listPops**](docs/Api/PopApi.md#listpops) | List Fastly POPs +[*ProductAiAcceleratorApi*](docs/Api/ProductAiAcceleratorApi.md) | [**disableProductAiAccelerator**](docs/Api/ProductAiAcceleratorApi.md#disableproductaiaccelerator) | Disable product +[*ProductAiAcceleratorApi*](docs/Api/ProductAiAcceleratorApi.md) | [**enableAiAccelerator**](docs/Api/ProductAiAcceleratorApi.md#enableaiaccelerator) | Enable product +[*ProductAiAcceleratorApi*](docs/Api/ProductAiAcceleratorApi.md) | [**getAiAccelerator**](docs/Api/ProductAiAcceleratorApi.md#getaiaccelerator) | Get product enablement status +[*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**disableProductBotManagement**](docs/Api/ProductBotManagementApi.md#disableproductbotmanagement) | Disable product +[*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**enableProductBotManagement**](docs/Api/ProductBotManagementApi.md#enableproductbotmanagement) | Enable product +[*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**getProductBotManagement**](docs/Api/ProductBotManagementApi.md#getproductbotmanagement) | Get product enablement status +[*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**disableProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#disableproductbrotlicompression) | Disable product +[*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**enableProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#enableproductbrotlicompression) | Enable product +[*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**getProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#getproductbrotlicompression) | Get product enablement status +[*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**disableProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#disableproductddosprotection) | Disable product +[*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**enableProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#enableproductddosprotection) | Enable product +[*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**getProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#getproductddosprotection) | Get product enablement status +[*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**getProductDdosProtectionConfiguration**](docs/Api/ProductDdosProtectionApi.md#getproductddosprotectionconfiguration) | Get configuration +[*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**setProductDdosProtectionConfiguration**](docs/Api/ProductDdosProtectionApi.md#setproductddosprotectionconfiguration) | Update configuration +[*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**disableProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#disableproductdomaininspector) | Disable product +[*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**enableProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#enableproductdomaininspector) | Enable product +[*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**getProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#getproductdomaininspector) | Get product enablement status +[*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**disableProductFanout**](docs/Api/ProductFanoutApi.md#disableproductfanout) | Disable product +[*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**enableProductFanout**](docs/Api/ProductFanoutApi.md#enableproductfanout) | Enable product +[*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**getProductFanout**](docs/Api/ProductFanoutApi.md#getproductfanout) | Get product enablement status +[*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**disableProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#disableproductimageoptimizer) | Disable product +[*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**enableProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#enableproductimageoptimizer) | Enable product +[*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**getProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#getproductimageoptimizer) | Get product enablement status +[*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**disableProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#disableproductlogexplorerinsights) | Disable product +[*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**enableProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#enableproductlogexplorerinsights) | Enable product +[*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**getProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#getproductlogexplorerinsights) | Get product enablement status +[*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**disableProductNgwaf**](docs/Api/ProductNgwafApi.md#disableproductngwaf) | Disable product +[*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**enableProductNgwaf**](docs/Api/ProductNgwafApi.md#enableproductngwaf) | Enable product +[*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**getProductNgwaf**](docs/Api/ProductNgwafApi.md#getproductngwaf) | Get product enablement status +[*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**getProductNgwafConfiguration**](docs/Api/ProductNgwafApi.md#getproductngwafconfiguration) | Get configuration +[*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**setProductNgwafConfiguration**](docs/Api/ProductNgwafApi.md#setproductngwafconfiguration) | Update configuration +[*ProductObjectStorageApi*](docs/Api/ProductObjectStorageApi.md) | [**disableProductObjectStorage**](docs/Api/ProductObjectStorageApi.md#disableproductobjectstorage) | Disable product +[*ProductObjectStorageApi*](docs/Api/ProductObjectStorageApi.md) | [**enableObjectStorage**](docs/Api/ProductObjectStorageApi.md#enableobjectstorage) | Enable product +[*ProductObjectStorageApi*](docs/Api/ProductObjectStorageApi.md) | [**getObjectStorage**](docs/Api/ProductObjectStorageApi.md#getobjectstorage) | Get product enablement status +[*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**disableProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#disableproductorigininspector) | Disable product +[*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**enableProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#enableproductorigininspector) | Enable product +[*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**getProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#getproductorigininspector) | Get product enablement status +[*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**disableProductWebsockets**](docs/Api/ProductWebsocketsApi.md#disableproductwebsockets) | Disable product +[*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**enableProductWebsockets**](docs/Api/ProductWebsocketsApi.md#enableproductwebsockets) | Enable product +[*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**getProductWebsockets**](docs/Api/ProductWebsocketsApi.md#getproductwebsockets) | Get product enablement status [*PublicIpListApi*](docs/Api/PublicIpListApi.md) | [**listFastlyIps**](docs/Api/PublicIpListApi.md#listfastlyips) | List Fastly's public IPs [*PublishApi*](docs/Api/PublishApi.md) | [**publish**](docs/Api/PublishApi.md#publish) | Send messages to Fanout subscribers [*PurgeApi*](docs/Api/PurgeApi.md) | [**bulkPurgeTag**](docs/Api/PurgeApi.md#bulkpurgetag) | Purge multiple surrogate key tags diff --git a/docs/Api/AclEntryApi.md b/docs/Api/AclEntryApi.md index a32534c4..7c1787cb 100644 --- a/docs/Api/AclEntryApi.md +++ b/docs/Api/AclEntryApi.md @@ -75,7 +75,7 @@ Add an ACL entry to an ACL. ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['acl_id'] = 'acl_id_example'; // string | Alphanumeric string identifying a ACL. -$options['acl_entry'] = {"subnet":0,"ip":"127.0.0.1"}; // \Fastly\Model\AclEntry +$options['acl_entry'] = {"subnet":16,"ip":"192.168.0.1"}; // \Fastly\Model\AclEntry try { $result = $apiInstance->createAclEntry($options); diff --git a/docs/Api/AclsInComputeApi.md b/docs/Api/AclsInComputeApi.md index dab6ef4f..f80909d1 100644 --- a/docs/Api/AclsInComputeApi.md +++ b/docs/Api/AclsInComputeApi.md @@ -135,7 +135,7 @@ Name | Type | Description | Notes ## `computeAclListAcls()` ```php -computeAclListAcls($options): \Fastly\Model\ComputeAclCreateAclsResponse[] // List ACLs +computeAclListAcls($options): \Fastly\Model\ComputeAclList // List ACLs ``` List all ACLs. @@ -158,7 +158,7 @@ This endpoint does not need any parameters. ### Return type -[**\Fastly\Model\ComputeAclCreateAclsResponse[]**](../Model/ComputeAclCreateAclsResponse.md) +[**\Fastly\Model\ComputeAclList**](../Model/ComputeAclList.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/BackendApi.md b/docs/Api/BackendApi.md index d36d6af4..fe2d9496 100644 --- a/docs/Api/BackendApi.md +++ b/docs/Api/BackendApi.md @@ -47,7 +47,7 @@ $options['healthcheck'] = 'healthcheck_example'; // string | The name of the hea $options['hostname'] = 'hostname_example'; // string | The hostname of the backend. May be used as an alternative to `address` to set the backend location. $options['ipv4'] = 'ipv4_example'; // string | IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. $options['ipv6'] = 'ipv6_example'; // string | IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. -$options['keepalive_time'] = 56; // int | How long in seconds to keep a persistent connection to the backend between requests. +$options['keepalive_time'] = 56; // int | How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. $options['max_conn'] = 56; // int | Maximum number of concurrent connections this backend will accept. $options['max_tls_version'] = 'max_tls_version_example'; // string | Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. @@ -98,7 +98,7 @@ Name | Type | Description | Notes **hostname** | **string** | The hostname of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv4** | **string** | IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv6** | **string** | IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] -**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. | [optional] +**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. | [optional] **max_conn** | **int** | Maximum number of concurrent connections this backend will accept. | [optional] **max_tls_version** | **string** | Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **min_tls_version** | **string** | Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] @@ -266,7 +266,7 @@ $options['healthcheck'] = 'healthcheck_example'; // string | The name of the hea $options['hostname'] = 'hostname_example'; // string | The hostname of the backend. May be used as an alternative to `address` to set the backend location. $options['ipv4'] = 'ipv4_example'; // string | IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. $options['ipv6'] = 'ipv6_example'; // string | IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. -$options['keepalive_time'] = 56; // int | How long in seconds to keep a persistent connection to the backend between requests. +$options['keepalive_time'] = 56; // int | How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. $options['max_conn'] = 56; // int | Maximum number of concurrent connections this backend will accept. $options['max_tls_version'] = 'max_tls_version_example'; // string | Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. @@ -318,7 +318,7 @@ Name | Type | Description | Notes **hostname** | **string** | The hostname of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv4** | **string** | IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv6** | **string** | IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] -**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. | [optional] +**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. | [optional] **max_conn** | **int** | Maximum number of concurrent connections this backend will accept. | [optional] **max_tls_version** | **string** | Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **min_tls_version** | **string** | Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] diff --git a/docs/Api/BillingUsageMetricsApi.md b/docs/Api/BillingUsageMetricsApi.md index 0c991387..bb03b82a 100644 --- a/docs/Api/BillingUsageMetricsApi.md +++ b/docs/Api/BillingUsageMetricsApi.md @@ -31,8 +31,8 @@ Returns product usage, broken down by service. ### Example ```php - $options['product_id'] = 'product_id_example'; // string | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. -$options['usage_type_name'] = 'usage_type_name_example'; // string | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. + $options['product_id'] = 'product_id_example'; // string | The product identifier for the metrics returned (e.g., `cdn_usage`). +$options['usage_type_name'] = 'usage_type_name_example'; // string | The usage type name for the metrics returned (e.g., `North America Requests`). $options['start_month'] = 2023-01; // string $options['end_month'] = 2023-03; // string $options['limit'] = '5'; // string | Number of results per page. The maximum is 100. @@ -51,8 +51,8 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product_id** | **string** | The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. | -**usage_type_name** | **string** | The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. | +**product_id** | **string** | The product identifier for the metrics returned (e.g., `cdn_usage`). | [optional] +**usage_type_name** | **string** | The usage type name for the metrics returned (e.g., `North America Requests`). | [optional] **start_month** | **string** | | [optional] **end_month** | **string** | | [optional] **limit** | **string** | Number of results per page. The maximum is 100. | [optional] [defaults to '5'] @@ -75,8 +75,8 @@ Returns monthly usage metrics for customer by product. ### Example ```php - $options['start_month'] = 2023-01; // string -$options['end_month'] = 2023-03; // string + $options['start_month'] = 2024-05; // string +$options['end_month'] = 2024-06; // string try { $result = $apiInstance->getUsageMetrics($options); @@ -91,8 +91,8 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**start_month** | **string** | | [optional] -**end_month** | **string** | | [optional] +**start_month** | **string** | | +**end_month** | **string** | | ### Return type diff --git a/docs/Api/EnabledProductsApi.md b/docs/Api/EnabledProductsApi.md deleted file mode 100644 index 537b3e1e..00000000 --- a/docs/Api/EnabledProductsApi.md +++ /dev/null @@ -1,209 +0,0 @@ -# Fastly\Api\EnabledProductsApi - - -```php -$apiInstance = new Fastly\Api\EnabledProductsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**disableProduct()**](EnabledProductsApi.md#disableProduct) | **DELETE** /enabled-products/v1/{product_id}/services/{service_id} | Disable a product -[**enableProduct()**](EnabledProductsApi.md#enableProduct) | **PUT** /enabled-products/v1/{product_id}/services/{service_id} | Enable a product -[**getEnabledProduct()**](EnabledProductsApi.md#getEnabledProduct) | **GET** /enabled-products/v1/{product_id}/services/{service_id} | Get enabled product -[**getProductConfiguration()**](EnabledProductsApi.md#getProductConfiguration) | **GET** /enabled-products/v1/{product_id}/services/{service_id}/configuration | Get configuration for a product -[**setProductConfiguration()**](EnabledProductsApi.md#setProductConfiguration) | **PATCH** /enabled-products/v1/{product_id}/services/{service_id}/configuration | Update configuration for a product - - -## `disableProduct()` - -```php -disableProduct($options) // Disable a product -``` - -Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. - -### Example -```php - $options['product_id'] = ngwaf; // string -$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. - -try { - $apiInstance->disableProduct($options); -} catch (Exception $e) { - echo 'Exception when calling EnabledProductsApi->disableProduct: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**product_id** | **string** | | -**service_id** | **string** | Alphanumeric string identifying the service. | - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `enableProduct()` - -```php -enableProduct($options): \Fastly\Model\EnabledProductResponse // Enable a product -``` - -Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. - -### Example -```php - $options['product_id'] = ngwaf; // string -$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['set_workspace_id'] = {"workspace_id":"7JFbo4RNA0OKdFWC04r6B3"}; // \Fastly\Model\SetWorkspaceId - -try { - $result = $apiInstance->enableProduct($options); -} catch (Exception $e) { - echo 'Exception when calling EnabledProductsApi->enableProduct: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**product_id** | **string** | | -**service_id** | **string** | Alphanumeric string identifying the service. | -**set_workspace_id** | [**\Fastly\Model\SetWorkspaceId**](../Model/SetWorkspaceId.md) | | [optional] - -### Return type - -[**\Fastly\Model\EnabledProductResponse**](../Model/EnabledProductResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getEnabledProduct()` - -```php -getEnabledProduct($options): \Fastly\Model\EnabledProductResponse // Get enabled product -``` - -Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, `ngwaf`, `ddos_protection`, and `log_explorer_insights`. - -### Example -```php - $options['product_id'] = ngwaf; // string -$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. - -try { - $result = $apiInstance->getEnabledProduct($options); -} catch (Exception $e) { - echo 'Exception when calling EnabledProductsApi->getEnabledProduct: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**product_id** | **string** | | -**service_id** | **string** | Alphanumeric string identifying the service. | - -### Return type - -[**\Fastly\Model\EnabledProductResponse**](../Model/EnabledProductResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getProductConfiguration()` - -```php -getProductConfiguration($options): \Fastly\Model\ConfiguredProductResponse // Get configuration for a product -``` - -Get configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`. - -### Example -```php - $options['product_id'] = ngwaf; // string -$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. - -try { - $result = $apiInstance->getProductConfiguration($options); -} catch (Exception $e) { - echo 'Exception when calling EnabledProductsApi->getProductConfiguration: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**product_id** | **string** | | -**service_id** | **string** | Alphanumeric string identifying the service. | - -### Return type - -[**\Fastly\Model\ConfiguredProductResponse**](../Model/ConfiguredProductResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `setProductConfiguration()` - -```php -setProductConfiguration($options): \Fastly\Model\ConfiguredProductResponse // Update configuration for a product -``` - -Update configuration for an enabled product on a service. Supported product IDs: `ngwaf` and `ddos_protection`. - -### Example -```php - $options['product_id'] = ngwaf; // string -$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['set_configuration'] = {"workspace_id":"7JFbo4RNA0OKdFWC04r6B3","traffic_ramp":"20"}; // \Fastly\Model\SetConfiguration - -try { - $result = $apiInstance->setProductConfiguration($options); -} catch (Exception $e) { - echo 'Exception when calling EnabledProductsApi->setProductConfiguration: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**product_id** | **string** | | -**service_id** | **string** | Alphanumeric string identifying the service. | -**set_configuration** | [**\Fastly\Model\SetConfiguration**](../Model/SetConfiguration.md) | | [optional] - -### Return type - -[**\Fastly\Model\ConfiguredProductResponse**](../Model/ConfiguredProductResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/KvStoreApi.md b/docs/Api/KvStoreApi.md index aa151e5f..fd87c987 100644 --- a/docs/Api/KvStoreApi.md +++ b/docs/Api/KvStoreApi.md @@ -17,29 +17,29 @@ $apiInstance = new Fastly\Api\KvStoreApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**createStore()**](KvStoreApi.md#createStore) | **POST** /resources/stores/kv | Create a KV store. -[**deleteStore()**](KvStoreApi.md#deleteStore) | **DELETE** /resources/stores/kv/{store_id} | Delete a KV store. -[**getStore()**](KvStoreApi.md#getStore) | **GET** /resources/stores/kv/{store_id} | Describe a KV store. -[**getStores()**](KvStoreApi.md#getStores) | **GET** /resources/stores/kv | List KV stores. +[**kvStoreCreate()**](KvStoreApi.md#kvStoreCreate) | **POST** /resources/stores/kv | Create a KV store. +[**kvStoreDelete()**](KvStoreApi.md#kvStoreDelete) | **DELETE** /resources/stores/kv/{store_id} | Delete a KV store. +[**kvStoreGet()**](KvStoreApi.md#kvStoreGet) | **GET** /resources/stores/kv/{store_id} | Describe a KV store. +[**kvStoreList()**](KvStoreApi.md#kvStoreList) | **GET** /resources/stores/kv | List all KV stores. -## `createStore()` +## `kvStoreCreate()` ```php -createStore($options): \Fastly\Model\StoreResponse // Create a KV store. +kvStoreCreate($options): \Fastly\Model\KvStoreDetails // Create a KV store. ``` -Create a new KV store. +Create a KV store. ### Example ```php $options['location'] = 'location_example'; // string -$options['store'] = {"name":"my-store"}; // \Fastly\Model\Store +$options['kv_store_request_create'] = {"name":"my-store"}; // \Fastly\Model\KvStoreRequestCreate try { - $result = $apiInstance->createStore($options); + $result = $apiInstance->kvStoreCreate($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreApi->createStore: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreApi->kvStoreCreate: ', $e->getMessage(), PHP_EOL; } ``` @@ -49,32 +49,32 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**location** | **string** | | [optional] -**store** | [**\Fastly\Model\Store**](../Model/Store.md) | | [optional] +**location** | **string** | | [optional] [one of: 'US', 'EU', 'ASIA', 'AUS'] +**kv_store_request_create** | [**\Fastly\Model\KvStoreRequestCreate**](../Model/KvStoreRequestCreate.md) | | [optional] ### Return type -[**\Fastly\Model\StoreResponse**](../Model/StoreResponse.md) +[**\Fastly\Model\KvStoreDetails**](../Model/KvStoreDetails.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `deleteStore()` +## `kvStoreDelete()` ```php -deleteStore($options) // Delete a KV store. +kvStoreDelete($options) // Delete a KV store. ``` -A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a `409` (Conflict). +A KV store must be empty before it can be deleted. Attempting to delete a KV store that contains items will result in a response with a `409` status code. ### Example ```php $options['store_id'] = 'store_id_example'; // string try { - $apiInstance->deleteStore($options); + $apiInstance->kvStoreDelete($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreApi->deleteStore: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreApi->kvStoreDelete: ', $e->getMessage(), PHP_EOL; } ``` @@ -93,22 +93,22 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `getStore()` +## `kvStoreGet()` ```php -getStore($options): \Fastly\Model\StoreResponse // Describe a KV store. +kvStoreGet($options): \Fastly\Model\KvStoreDetails // Describe a KV store. ``` -Get a KV store by ID. +Get details of a KV store. ### Example ```php $options['store_id'] = 'store_id_example'; // string try { - $result = $apiInstance->getStore($options); + $result = $apiInstance->kvStoreGet($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreApi->getStore: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreApi->kvStoreGet: ', $e->getMessage(), PHP_EOL; } ``` @@ -122,18 +122,18 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\StoreResponse**](../Model/StoreResponse.md) +[**\Fastly\Model\KvStoreDetails**](../Model/KvStoreDetails.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `getStores()` +## `kvStoreList()` ```php -getStores($options): \Fastly\Model\InlineResponse2003 // List KV stores. +kvStoreList($options): \Fastly\Model\InlineResponse2003 // List all KV stores. ``` -Get all stores for a given customer. +List all KV stores. ### Example ```php @@ -141,9 +141,9 @@ Get all stores for a given customer. $options['limit'] = 1000; // int try { - $result = $apiInstance->getStores($options); + $result = $apiInstance->kvStoreList($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreApi->getStores: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreApi->kvStoreList: ', $e->getMessage(), PHP_EOL; } ``` diff --git a/docs/Api/KvStoreItemApi.md b/docs/Api/KvStoreItemApi.md index bb13d997..516f8725 100644 --- a/docs/Api/KvStoreItemApi.md +++ b/docs/Api/KvStoreItemApi.md @@ -17,29 +17,31 @@ $apiInstance = new Fastly\Api\KvStoreItemApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**deleteKeyFromStore()**](KvStoreItemApi.md#deleteKeyFromStore) | **DELETE** /resources/stores/kv/{store_id}/keys/{key_name} | Delete kv store item. -[**getKeys()**](KvStoreItemApi.md#getKeys) | **GET** /resources/stores/kv/{store_id}/keys | List kv store keys. -[**getValueForKey()**](KvStoreItemApi.md#getValueForKey) | **GET** /resources/stores/kv/{store_id}/keys/{key_name} | Get the value of an kv store item -[**setValueForKey()**](KvStoreItemApi.md#setValueForKey) | **PUT** /resources/stores/kv/{store_id}/keys/{key_name} | Insert an item into an kv store +[**kvStoreDeleteItem()**](KvStoreItemApi.md#kvStoreDeleteItem) | **DELETE** /resources/stores/kv/{store_id}/keys/{key} | Delete an item. +[**kvStoreGetItem()**](KvStoreItemApi.md#kvStoreGetItem) | **GET** /resources/stores/kv/{store_id}/keys/{key} | Get an item. +[**kvStoreListItemKeys()**](KvStoreItemApi.md#kvStoreListItemKeys) | **GET** /resources/stores/kv/{store_id}/keys | List item keys. +[**kvStoreUpsertItem()**](KvStoreItemApi.md#kvStoreUpsertItem) | **PUT** /resources/stores/kv/{store_id}/keys/{key} | Insert or update an item. -## `deleteKeyFromStore()` +## `kvStoreDeleteItem()` ```php -deleteKeyFromStore($options) // Delete kv store item. +kvStoreDeleteItem($options) // Delete an item. ``` -Delete an item from an kv store +Delete an item. ### Example ```php $options['store_id'] = 'store_id_example'; // string -$options['key_name'] = 'key_name_example'; // string +$options['key'] = 'key_example'; // string +$options['if_generation_match'] = 56; // int +$options['force'] = false; // bool try { - $apiInstance->deleteKeyFromStore($options); + $apiInstance->kvStoreDeleteItem($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreItemApi->deleteKeyFromStore: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreItemApi->kvStoreDeleteItem: ', $e->getMessage(), PHP_EOL; } ``` @@ -50,7 +52,9 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **store_id** | **string** | | -**key_name** | **string** | | +**key** | **string** | | +**if_generation_match** | **int** | | [optional] +**force** | **bool** | | [optional] [defaults to false] ### Return type @@ -59,26 +63,23 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `getKeys()` +## `kvStoreGetItem()` ```php -getKeys($options): \Fastly\Model\InlineResponse2004 // List kv store keys. +kvStoreGetItem($options): \SplFileObject // Get an item. ``` -List the keys of all items within an kv store. +Get an item, including its value, metadata (if any), and generation marker. ### Example ```php $options['store_id'] = 'store_id_example'; // string -$options['cursor'] = 'cursor_example'; // string -$options['limit'] = 100; // int -$options['prefix'] = 'prefix_example'; // string -$options['consistency'] = 'consistency_example'; // string +$options['key'] = 'key_example'; // string try { - $result = $apiInstance->getKeys($options); + $result = $apiInstance->kvStoreGetItem($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreItemApi->getKeys: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreItemApi->kvStoreGetItem: ', $e->getMessage(), PHP_EOL; } ``` @@ -89,35 +90,35 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **store_id** | **string** | | -**cursor** | **string** | | [optional] -**limit** | **int** | | [optional] [defaults to 100] -**prefix** | **string** | | [optional] -**consistency** | **string** | | [optional] +**key** | **string** | | ### Return type -[**\Fastly\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +**\SplFileObject** [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `getValueForKey()` +## `kvStoreListItemKeys()` ```php -getValueForKey($options): string // Get the value of an kv store item +kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2004 // List item keys. ``` -Get the value associated with a key. +Lists the matching item keys (or all item keys, if no prefix is supplied). ### Example ```php $options['store_id'] = 'store_id_example'; // string -$options['key_name'] = 'key_name_example'; // string +$options['cursor'] = 'cursor_example'; // string +$options['limit'] = 100; // int +$options['prefix'] = 'prefix_example'; // string +$options['consistency'] = 'strong'; // string try { - $result = $apiInstance->getValueForKey($options); + $result = $apiInstance->kvStoreListItemKeys($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreItemApi->getValueForKey: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreItemApi->kvStoreListItemKeys: ', $e->getMessage(), PHP_EOL; } ``` @@ -128,40 +129,43 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **store_id** | **string** | | -**key_name** | **string** | | +**cursor** | **string** | | [optional] +**limit** | **int** | | [optional] [defaults to 100] +**prefix** | **string** | | [optional] +**consistency** | **string** | | [optional] [one of: 'strong', 'eventual'] [defaults to 'strong'] ### Return type -**string** +[**\Fastly\Model\InlineResponse2004**](../Model/InlineResponse2004.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `setValueForKey()` +## `kvStoreUpsertItem()` ```php -setValueForKey($options): string // Insert an item into an kv store +kvStoreUpsertItem($options) // Insert or update an item. ``` -Set a new value for a new or existing key in an kv store. +Inserts or updates an item's value and metadata. ### Example ```php $options['store_id'] = 'store_id_example'; // string -$options['key_name'] = 'key_name_example'; // string +$options['key'] = 'key_example'; // string $options['if_generation_match'] = 56; // int $options['time_to_live_sec'] = 56; // int $options['metadata'] = 'metadata_example'; // string -$options['add'] = True; // bool -$options['append'] = True; // bool -$options['prepend'] = True; // bool -$options['background_fetch'] = True; // bool -$options['body'] = 'body_example'; // string +$options['add'] = false; // bool +$options['append'] = false; // bool +$options['prepend'] = false; // bool +$options['background_fetch'] = false; // bool +$options['body'] = "/path/to/file.txt"; // \SplFileObject try { - $result = $apiInstance->setValueForKey($options); + $apiInstance->kvStoreUpsertItem($options); } catch (Exception $e) { - echo 'Exception when calling KvStoreItemApi->setValueForKey: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling KvStoreItemApi->kvStoreUpsertItem: ', $e->getMessage(), PHP_EOL; } ``` @@ -172,19 +176,19 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **store_id** | **string** | | -**key_name** | **string** | | +**key** | **string** | | **if_generation_match** | **int** | | [optional] **time_to_live_sec** | **int** | | [optional] **metadata** | **string** | | [optional] -**add** | **bool** | | [optional] -**append** | **bool** | | [optional] -**prepend** | **bool** | | [optional] -**background_fetch** | **bool** | | [optional] -**body** | **string** | | [optional] +**add** | **bool** | | [optional] [defaults to false] +**append** | **bool** | | [optional] [defaults to false] +**prepend** | **bool** | | [optional] [defaults to false] +**background_fetch** | **bool** | | [optional] [defaults to false] +**body** | **\SplFileObject****\SplFileObject** | | [optional] ### Return type -**string** +void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafConfigurationSetsApi.md b/docs/Api/LegacyWafConfigurationSetsApi.md deleted file mode 100644 index 6eeda858..00000000 --- a/docs/Api/LegacyWafConfigurationSetsApi.md +++ /dev/null @@ -1,124 +0,0 @@ -# Fastly\Api\LegacyWafConfigurationSetsApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafConfigurationSetsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**listWafConfigSets()**](LegacyWafConfigurationSetsApi.md#listWafConfigSets) | **GET** /wafs/configuration_sets | List configuration sets -[**listWafsConfigSet()**](LegacyWafConfigurationSetsApi.md#listWafsConfigSet) | **GET** /wafs/configuration_sets/{configuration_set_id}/relationships/wafs | List WAFs currently using a configuration set -[**useWafConfigSet()**](LegacyWafConfigurationSetsApi.md#useWafConfigSet) | **PATCH** /wafs/configuration_sets/{configuration_set_id}/relationships/wafs | Apply a configuration set to a WAF - - -## `listWafConfigSets()` - -```php -listWafConfigSets($options): object // List configuration sets -``` - -List all Configuration sets. - -### Example -```php - -try { - $result = $apiInstance->listWafConfigSets($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafConfigurationSetsApi->listWafConfigSets: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -This endpoint does not need any parameters. - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafsConfigSet()` - -```php -listWafsConfigSet($options): object // List WAFs currently using a configuration set -``` - -List the WAF objects currently using the specified configuration set. - -### Example -```php - $options['configuration_set_id'] = 'configuration_set_id_example'; // string | Alphanumeric string identifying a WAF configuration set. - -try { - $result = $apiInstance->listWafsConfigSet($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafConfigurationSetsApi->listWafsConfigSet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**configuration_set_id** | **string** | Alphanumeric string identifying a WAF configuration set. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `useWafConfigSet()` - -```php -useWafConfigSet($options): object // Apply a configuration set to a WAF -``` - -Update one or more WAF objects to use the specified configuration set. - -### Example -```php - $options['configuration_set_id'] = 'configuration_set_id_example'; // string | Alphanumeric string identifying a WAF configuration set. -$options['request_body'] = {"data":[{"id":"w4Fg2uUGZzb2W9Euo4m0Or","type":"waf"},{"id":"w4Fg2uUGZzb2W9Euo5q2Az","type":"waf"}]}; // array - -try { - $result = $apiInstance->useWafConfigSet($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafConfigurationSetsApi->useWafConfigSet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**configuration_set_id** | **string** | Alphanumeric string identifying a WAF configuration set. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafFirewallApi.md b/docs/Api/LegacyWafFirewallApi.md deleted file mode 100644 index 813f6c1d..00000000 --- a/docs/Api/LegacyWafFirewallApi.md +++ /dev/null @@ -1,334 +0,0 @@ -# Fastly\Api\LegacyWafFirewallApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafFirewallApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**createLegacyWafFirewallService()**](LegacyWafFirewallApi.md#createLegacyWafFirewallService) | **POST** /service/{service_id}/version/{version_id}/wafs | Create a firewall -[**disableLegacyWafFirewall()**](LegacyWafFirewallApi.md#disableLegacyWafFirewall) | **PATCH** /wafs/{firewall_id}/disable | Disable a firewall -[**enableLegacyWafFirewall()**](LegacyWafFirewallApi.md#enableLegacyWafFirewall) | **PATCH** /wafs/{firewall_id}/enable | Enable a firewall -[**getLegacyWafFirewall()**](LegacyWafFirewallApi.md#getLegacyWafFirewall) | **GET** /wafs/{firewall_id} | Get a firewall object -[**getLegacyWafFirewallService()**](LegacyWafFirewallApi.md#getLegacyWafFirewallService) | **GET** /service/{service_id}/version/{version_id}/wafs/{firewall_id} | Get a firewall -[**listLegacyWafFirewalls()**](LegacyWafFirewallApi.md#listLegacyWafFirewalls) | **GET** /wafs | List active firewalls -[**listLegacyWafFirewallsService()**](LegacyWafFirewallApi.md#listLegacyWafFirewallsService) | **GET** /service/{service_id}/version/{version_id}/wafs | List firewalls -[**updateLegacyWafFirewallService()**](LegacyWafFirewallApi.md#updateLegacyWafFirewallService) | **PATCH** /service/{service_id}/version/{version_id}/wafs/{firewall_id} | Update a firewall - - -## `createLegacyWafFirewallService()` - -```php -createLegacyWafFirewallService($options): object // Create a firewall -``` - -Create a firewall object for a particular service and version. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['request_body'] = {"data":{"type":"waf","attributes":{"prefetch_condition":"WAF-Condition","response":"WAF_Error"}}}; // array - -try { - $result = $apiInstance->createLegacyWafFirewallService($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->createLegacyWafFirewallService: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**version_id** | **int** | Integer identifying a service version. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `disableLegacyWafFirewall()` - -```php -disableLegacyWafFirewall($options): object // Disable a firewall -``` - -Disable a firewall for a particular service and version. This endpoint is intended to be used in an emergency. Disabling a firewall object for a specific service and version replaces your existing WAF ruleset with an empty ruleset. While disabled, your WAF ruleset will not be applied to your origin traffic. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['request_body'] = {"data":{"id":"w4Fg2uUGZzb2W9Euo4m0Or","type":"waf"}}; // array - -try { - $result = $apiInstance->disableLegacyWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->disableLegacyWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `enableLegacyWafFirewall()` - -```php -enableLegacyWafFirewall($options): object // Enable a firewall -``` - -Re-enable a firewall object for a particular service and version after it has been disabled. This endpoint is intended to be used in an emergency. When a firewall object is re-enabled, a newly generated WAF ruleset VCL based on the current WAF configuration is used to replace the empty ruleset. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['request_body'] = {"data":{"id":"w4Fg2uUGZzb2W9Euo4m0Or","type":"waf"}}; // array - -try { - $result = $apiInstance->enableLegacyWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->enableLegacyWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getLegacyWafFirewall()` - -```php -getLegacyWafFirewall($options): object // Get a firewall object -``` - -Get a specific firewall object. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['include'] = configuration_set; // string | Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. - -try { - $result = $apiInstance->getLegacyWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->getLegacyWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**include** | **string** | Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getLegacyWafFirewallService()` - -```php -getLegacyWafFirewallService($options): object // Get a firewall -``` - -Get a specific firewall object. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. - -try { - $result = $apiInstance->getLegacyWafFirewallService($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->getLegacyWafFirewallService: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**version_id** | **int** | Integer identifying a service version. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listLegacyWafFirewalls()` - -```php -listLegacyWafFirewalls($options): object // List active firewalls -``` - -List all active firewall objects. - -### Example -```php - $options['filter_rules_rule_id'] = 'filter_rules_rule_id_example'; // string | Limit the returned firewalls to a specific rule ID. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = configuration_set; // string | Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. - -try { - $result = $apiInstance->listLegacyWafFirewalls($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->listLegacyWafFirewalls: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_rules_rule_id** | **string** | Limit the returned firewalls to a specific rule ID. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listLegacyWafFirewallsService()` - -```php -listLegacyWafFirewallsService($options): object // List firewalls -``` - -List all firewall objects for a particular service and version. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = configuration_set; // string | Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. - -try { - $result = $apiInstance->listLegacyWafFirewallsService($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->listLegacyWafFirewallsService: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**version_id** | **int** | Integer identifying a service version. | -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateLegacyWafFirewallService()` - -```php -updateLegacyWafFirewallService($options): object // Update a firewall -``` - -Update a firewall object for a particular service and version. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['request_body'] = {"data":{"id":"w4Fg2uUGZzb2W9Euo4m0Or","type":"waf","attributes":{"response":"new response"}}}; // array - -try { - $result = $apiInstance->updateLegacyWafFirewallService($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafFirewallApi->updateLegacyWafFirewallService: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**version_id** | **int** | Integer identifying a service version. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafOwaspApi.md b/docs/Api/LegacyWafOwaspApi.md deleted file mode 100644 index f8feece1..00000000 --- a/docs/Api/LegacyWafOwaspApi.md +++ /dev/null @@ -1,135 +0,0 @@ -# Fastly\Api\LegacyWafOwaspApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafOwaspApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**createOwaspSettings()**](LegacyWafOwaspApi.md#createOwaspSettings) | **POST** /service/{service_id}/wafs/{firewall_id}/owasp | Create an OWASP settings object -[**getOwaspSettings()**](LegacyWafOwaspApi.md#getOwaspSettings) | **GET** /service/{service_id}/wafs/{firewall_id}/owasp | Get the OWASP settings object -[**updateOwaspSettings()**](LegacyWafOwaspApi.md#updateOwaspSettings) | **PATCH** /service/{service_id}/wafs/{firewall_id}/owasp | Update the OWASP settings object - - -## `createOwaspSettings()` - -```php -createOwaspSettings($options): object // Create an OWASP settings object -``` - -Create an OWASP settings object for a particular service and firewall. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['request_body'] = {"data":{"type":"owasp"}}; // array - -try { - $result = $apiInstance->createOwaspSettings($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafOwaspApi->createOwaspSettings: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getOwaspSettings()` - -```php -getOwaspSettings($options): object // Get the OWASP settings object -``` - -Get the OWASP settings object for a particular service and firewall. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. - -try { - $result = $apiInstance->getOwaspSettings($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafOwaspApi->getOwaspSettings: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateOwaspSettings()` - -```php -updateOwaspSettings($options): object // Update the OWASP settings object -``` - -Update the OWASP settings object for a particular service and firewall. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['request_body'] = {"data":{"id":"0W4guUGZzb2W9Euo4m0oR","type":"owasp","attributes":{"inbound_anomaly_score_threshold":42}}}; // array - -try { - $result = $apiInstance->updateOwaspSettings($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafOwaspApi->updateOwaspSettings: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafRuleApi.md b/docs/Api/LegacyWafRuleApi.md deleted file mode 100644 index 0bea4a8d..00000000 --- a/docs/Api/LegacyWafRuleApi.md +++ /dev/null @@ -1,178 +0,0 @@ -# Fastly\Api\LegacyWafRuleApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafRuleApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getLegacyWafFirewallRuleVcl()**](LegacyWafRuleApi.md#getLegacyWafFirewallRuleVcl) | **GET** /wafs/{firewall_id}/rules/{waf_rule_id}/vcl | Get VCL for a rule associated with a firewall -[**getLegacyWafRule()**](LegacyWafRuleApi.md#getLegacyWafRule) | **GET** /wafs/rules/{waf_rule_id} | Get a rule -[**getLegacyWafRuleVcl()**](LegacyWafRuleApi.md#getLegacyWafRuleVcl) | **GET** /wafs/rules/{waf_rule_id}/vcl | Get VCL for a rule -[**listLegacyWafRules()**](LegacyWafRuleApi.md#listLegacyWafRules) | **GET** /wafs/rules | List rules in the latest configuration set - - -## `getLegacyWafFirewallRuleVcl()` - -```php -getLegacyWafFirewallRuleVcl($options): object // Get VCL for a rule associated with a firewall -``` - -Get associated VCL for a specific rule associated with a specific firewall. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. - -try { - $result = $apiInstance->getLegacyWafFirewallRuleVcl($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleApi->getLegacyWafFirewallRuleVcl: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getLegacyWafRule()` - -```php -getLegacyWafRule($options): object // Get a rule -``` - -Get a specific rule. - -### Example -```php - $options['filter_configuration_set_id'] = 'filter_configuration_set_id_example'; // string | Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. -$options['include'] = tags; // string | Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. - -try { - $result = $apiInstance->getLegacyWafRule($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleApi->getLegacyWafRule: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_configuration_set_id** | **string** | Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. | [optional] -**include** | **string** | Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. | [optional] -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getLegacyWafRuleVcl()` - -```php -getLegacyWafRuleVcl($options): object // Get VCL for a rule -``` - -Get associated VCL for a specific rule. - -### Example -```php - $options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. - -try { - $result = $apiInstance->getLegacyWafRuleVcl($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleApi->getLegacyWafRuleVcl: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listLegacyWafRules()` - -```php -listLegacyWafRules($options): object[] // List rules in the latest configuration set -``` - -List all rules in the latest configuration set. - -### Example -```php - $options['filter_rule_id'] = 'filter_rule_id_example'; // string | Limit the returned rules to a specific rule ID. -$options['filter_severity'] = 'filter_severity_example'; // string | Limit the returned rules to a specific severity. -$options['filter_tags_name'] = 'filter_tags_name_example'; // string | Limit the returned rules to a set linked to a tag by name. -$options['filter_configuration_set_id'] = 'filter_configuration_set_id_example'; // string | Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = 'include_example'; // string | Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. - -try { - $result = $apiInstance->listLegacyWafRules($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleApi->listLegacyWafRules: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_rule_id** | **string** | Limit the returned rules to a specific rule ID. | [optional] -**filter_severity** | **string** | Limit the returned rules to a specific severity. | [optional] -**filter_tags_name** | **string** | Limit the returned rules to a set linked to a tag by name. | [optional] -**filter_configuration_set_id** | **string** | Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. | [optional] - -### Return type - -**object[]** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafRuleStatusApi.md b/docs/Api/LegacyWafRuleStatusApi.md deleted file mode 100644 index cf8a9ddb..00000000 --- a/docs/Api/LegacyWafRuleStatusApi.md +++ /dev/null @@ -1,196 +0,0 @@ -# Fastly\Api\LegacyWafRuleStatusApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafRuleStatusApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getWafFirewallRuleStatus()**](LegacyWafRuleStatusApi.md#getWafFirewallRuleStatus) | **GET** /service/{service_id}/wafs/{firewall_id}/rules/{waf_rule_id}/rule_status | Get the status of a rule on a firewall -[**listWafFirewallRuleStatuses()**](LegacyWafRuleStatusApi.md#listWafFirewallRuleStatuses) | **GET** /service/{service_id}/wafs/{firewall_id}/rule_statuses | List rule statuses -[**updateWafFirewallRuleStatus()**](LegacyWafRuleStatusApi.md#updateWafFirewallRuleStatus) | **PATCH** /service/{service_id}/wafs/{firewall_id}/rules/{waf_rule_id}/rule_status | Update the status of a rule -[**updateWafFirewallRuleStatusesTag()**](LegacyWafRuleStatusApi.md#updateWafFirewallRuleStatusesTag) | **POST** /service/{service_id}/wafs/{firewall_id}/rule_statuses | Create or update status of a tagged group of rules - - -## `getWafFirewallRuleStatus()` - -```php -getWafFirewallRuleStatus($options): object // Get the status of a rule on a firewall -``` - -Get a specific rule status object for a particular service, firewall, and rule. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. - -try { - $result = $apiInstance->getWafFirewallRuleStatus($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleStatusApi->getWafFirewallRuleStatus: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafFirewallRuleStatuses()` - -```php -listWafFirewallRuleStatuses($options): object // List rule statuses -``` - -List all rule statuses for a particular service and firewall. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['filter_status'] = 'filter_status_example'; // string | Limit results to rule statuses with the specified status. -$options['filter_rule_message'] = 'filter_rule_message_example'; // string | Limit results to rule statuses whose rules have the specified message. -$options['filter_rule_rule_id'] = 'filter_rule_rule_id_example'; // string | Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. -$options['filter_rule_tags'] = 'filter_rule_tags_example'; // string | Limit results to rule statuses whose rules relate to the specified tag IDs. -$options['filter_rule_tags_name'] = application-FBC Market; // string | Limit results to rule statuses whose rules related to the named tags. -$options['include'] = 'include_example'; // string | Include relationships. Optional, comma separated values. Permitted values: `tags`. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. - -try { - $result = $apiInstance->listWafFirewallRuleStatuses($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleStatusApi->listWafFirewallRuleStatuses: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**filter_status** | **string** | Limit results to rule statuses with the specified status. | [optional] -**filter_rule_message** | **string** | Limit results to rule statuses whose rules have the specified message. | [optional] -**filter_rule_rule_id** | **string** | Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. | [optional] -**filter_rule_tags** | **string** | Limit results to rule statuses whose rules relate to the specified tag IDs. | [optional] -**filter_rule_tags_name** | **string** | Limit results to rule statuses whose rules related to the named tags. | [optional] -**include** | **string** | Include relationships. Optional, comma separated values. Permitted values: `tags`. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafFirewallRuleStatus()` - -```php -updateWafFirewallRuleStatus($options): object // Update the status of a rule -``` - -Update a rule status for a particular service, firewall, and rule. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. -$options['request_body'] = {"data":{"id":"RU1S0isxPaozGVKXdv0eY","type":"rule_status","attributes":{"status":"block"}}}; // array - -try { - $result = $apiInstance->updateWafFirewallRuleStatus($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleStatusApi->updateWafFirewallRuleStatus: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafFirewallRuleStatusesTag()` - -```php -updateWafFirewallRuleStatusesTag($options): object // Create or update status of a tagged group of rules -``` - -Create or update all rule statuses for a particular service and firewall, based on tag name. By default, only rule status for enabled rules (with status log or block) will be updated. To update rule statuses for disabled rules under the specified tag, use the force attribute. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['name'] = 'name_example'; // string | The tag name to use to determine the set of rules to update. For example, OWASP or language-php. -$options['force'] = 'force_example'; // string | Whether or not to update rule statuses for disabled rules. Optional. -$options['request_body'] = {"data":{"type":"rule_status","attributes":{"status":"block","name":"application-FBC Market","force":true}}}; // array - -try { - $result = $apiInstance->updateWafFirewallRuleStatusesTag($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRuleStatusApi->updateWafFirewallRuleStatusesTag: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**name** | **string** | The tag name to use to determine the set of rules to update. For example, OWASP or language-php. | [optional] -**force** | **string** | Whether or not to update rule statuses for disabled rules. Optional. | [optional] -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafRulesetApi.md b/docs/Api/LegacyWafRulesetApi.md deleted file mode 100644 index 3d5d9629..00000000 --- a/docs/Api/LegacyWafRulesetApi.md +++ /dev/null @@ -1,133 +0,0 @@ -# Fastly\Api\LegacyWafRulesetApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafRulesetApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getWafRuleset()**](LegacyWafRulesetApi.md#getWafRuleset) | **GET** /service/{service_id}/wafs/{firewall_id}/ruleset | Get a WAF ruleset -[**getWafRulesetVcl()**](LegacyWafRulesetApi.md#getWafRulesetVcl) | **GET** /service/{service_id}/wafs/{firewall_id}/ruleset/preview | Generate WAF ruleset VCL -[**updateWafRuleset()**](LegacyWafRulesetApi.md#updateWafRuleset) | **PATCH** /service/{service_id}/wafs/{firewall_id}/ruleset | Update a WAF ruleset - - -## `getWafRuleset()` - -```php -getWafRuleset($options): object // Get a WAF ruleset -``` - -Get a WAF ruleset for a particular service and firewall object. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. - -try { - $result = $apiInstance->getWafRuleset($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRulesetApi->getWafRuleset: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getWafRulesetVcl()` - -```php -getWafRulesetVcl($options): object // Generate WAF ruleset VCL -``` - -Get a preview of the WAF ruleset VCL for a particular service and firewall object based on changes to WAF configuration before deploying the ruleset. The response will include a link to status of the background VCL generation job. Once the background job is completed, the preview WAF ruleset VCL can be retrieved from the status response. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. - -try { - $result = $apiInstance->getWafRulesetVcl($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRulesetApi->getWafRulesetVcl: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafRuleset()` - -```php -updateWafRuleset($options): object // Update a WAF ruleset -``` - -Update the WAF ruleset for a particular service and firewall object. Use the URL in the response to view the WAF ruleset deploy status. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['request_body'] = {"data":{"id":"r5TguUGZzb2W9EuF4mo0N","type":"ruleset"}}; // array - -try { - $result = $apiInstance->updateWafRuleset($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafRulesetApi->updateWafRuleset: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafTagApi.md b/docs/Api/LegacyWafTagApi.md deleted file mode 100644 index ed308d33..00000000 --- a/docs/Api/LegacyWafTagApi.md +++ /dev/null @@ -1,61 +0,0 @@ -# Fastly\Api\LegacyWafTagApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafTagApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**listLegacyWafTags()**](LegacyWafTagApi.md#listLegacyWafTags) | **GET** /wafs/tags | List WAF tags - - -## `listLegacyWafTags()` - -```php -listLegacyWafTags($options): object // List WAF tags -``` - -List all tags. - -### Example -```php - $options['filter_name'] = 'filter_name_example'; // string | Limit the returned tags to a specific name. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = rules; // string | Include relationships. Optional, comma separated values. Permitted values: `rules`. - -try { - $result = $apiInstance->listLegacyWafTags($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafTagApi->listLegacyWafTags: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_name** | **string** | Limit the returned tags to a specific name. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional, comma separated values. Permitted values: `rules`. | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/LegacyWafUpdateStatusApi.md b/docs/Api/LegacyWafUpdateStatusApi.md deleted file mode 100644 index 493545c9..00000000 --- a/docs/Api/LegacyWafUpdateStatusApi.md +++ /dev/null @@ -1,102 +0,0 @@ -# Fastly\Api\LegacyWafUpdateStatusApi - - -```php -$apiInstance = new Fastly\Api\LegacyWafUpdateStatusApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getWafUpdateStatus()**](LegacyWafUpdateStatusApi.md#getWafUpdateStatus) | **GET** /service/{service_id}/wafs/{firewall_id}/update_statuses/{update_status_id} | Get the status of a WAF update -[**listWafUpdateStatuses()**](LegacyWafUpdateStatusApi.md#listWafUpdateStatuses) | **GET** /service/{service_id}/wafs/{firewall_id}/update_statuses | List update statuses - - -## `getWafUpdateStatus()` - -```php -getWafUpdateStatus($options): object // Get the status of a WAF update -``` - -Get a specific update status object for a particular service and firewall object. - -### Example -```php - $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. -$options['update_status_id'] = 'update_status_id_example'; // string | Alphanumeric string identifying a WAF update status. - -try { - $result = $apiInstance->getWafUpdateStatus($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafUpdateStatusApi->getWafUpdateStatus: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | -**update_status_id** | **string** | Alphanumeric string identifying a WAF update status. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafUpdateStatuses()` - -```php -listWafUpdateStatuses($options): object // List update statuses -``` - -List all update statuses for a particular service and firewall object. - -### Example -```php - $options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = waf; // string | Include relationships. Optional, comma separated values. Permitted values: `waf`. -$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a Firewall. - -try { - $result = $apiInstance->listWafUpdateStatuses($options); -} catch (Exception $e) { - echo 'Exception when calling LegacyWafUpdateStatusApi->listWafUpdateStatuses: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional, comma separated values. Permitted values: `waf`. | [optional] -**service_id** | **string** | Alphanumeric string identifying the service. | -**firewall_id** | **string** | Alphanumeric string identifying a Firewall. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/ProductAiAcceleratorApi.md b/docs/Api/ProductAiAcceleratorApi.md new file mode 100644 index 00000000..bd0c3c97 --- /dev/null +++ b/docs/Api/ProductAiAcceleratorApi.md @@ -0,0 +1,116 @@ +# Fastly\Api\ProductAiAcceleratorApi + + +```php +$apiInstance = new Fastly\Api\ProductAiAcceleratorApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductAiAccelerator()**](ProductAiAcceleratorApi.md#disableProductAiAccelerator) | **DELETE** /enabled-products/v1/ai_accelerator | Disable product +[**enableAiAccelerator()**](ProductAiAcceleratorApi.md#enableAiAccelerator) | **PUT** /enabled-products/v1/ai_accelerator | Enable product +[**getAiAccelerator()**](ProductAiAcceleratorApi.md#getAiAccelerator) | **GET** /enabled-products/v1/ai_accelerator | Get product enablement status + + +## `disableProductAiAccelerator()` + +```php +disableProductAiAccelerator($options) // Disable product +``` + +Disable the AI Accelerator product + +### Example +```php + +try { + $apiInstance->disableProductAiAccelerator($options); +} catch (Exception $e) { + echo 'Exception when calling ProductAiAcceleratorApi->disableProductAiAccelerator: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableAiAccelerator()` + +```php +enableAiAccelerator($options): \Fastly\Model\AiAcceleratorResponseBodyEnable // Enable product +``` + +Enable the AI Accelerator product + +### Example +```php + +try { + $result = $apiInstance->enableAiAccelerator($options); +} catch (Exception $e) { + echo 'Exception when calling ProductAiAcceleratorApi->enableAiAccelerator: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\AiAcceleratorResponseBodyEnable**](../Model/AiAcceleratorResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getAiAccelerator()` + +```php +getAiAccelerator($options): \Fastly\Model\AiAcceleratorResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the AI Accelerator product + +### Example +```php + +try { + $result = $apiInstance->getAiAccelerator($options); +} catch (Exception $e) { + echo 'Exception when calling ProductAiAcceleratorApi->getAiAccelerator: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\AiAcceleratorResponseBodyEnable**](../Model/AiAcceleratorResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductBotManagementApi.md b/docs/Api/ProductBotManagementApi.md new file mode 100644 index 00000000..33eea4fe --- /dev/null +++ b/docs/Api/ProductBotManagementApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductBotManagementApi + + +```php +$apiInstance = new Fastly\Api\ProductBotManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductBotManagement()**](ProductBotManagementApi.md#disableProductBotManagement) | **DELETE** /enabled-products/v1/bot_management/services/{service_id} | Disable product +[**enableProductBotManagement()**](ProductBotManagementApi.md#enableProductBotManagement) | **PUT** /enabled-products/v1/bot_management/services/{service_id} | Enable product +[**getProductBotManagement()**](ProductBotManagementApi.md#getProductBotManagement) | **GET** /enabled-products/v1/bot_management/services/{service_id} | Get product enablement status + + +## `disableProductBotManagement()` + +```php +disableProductBotManagement($options) // Disable product +``` + +Disable the Bot Management product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductBotManagement($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBotManagementApi->disableProductBotManagement: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductBotManagement()` + +```php +enableProductBotManagement($options): \Fastly\Model\BotManagementResponseBodyEnable // Enable product +``` + +Enable the Bot Management product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductBotManagement($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBotManagementApi->enableProductBotManagement: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\BotManagementResponseBodyEnable**](../Model/BotManagementResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductBotManagement()` + +```php +getProductBotManagement($options): \Fastly\Model\BotManagementResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Bot Management product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductBotManagement($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBotManagementApi->getProductBotManagement: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\BotManagementResponseBodyEnable**](../Model/BotManagementResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductBrotliCompressionApi.md b/docs/Api/ProductBrotliCompressionApi.md new file mode 100644 index 00000000..da5857fc --- /dev/null +++ b/docs/Api/ProductBrotliCompressionApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductBrotliCompressionApi + + +```php +$apiInstance = new Fastly\Api\ProductBrotliCompressionApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductBrotliCompression()**](ProductBrotliCompressionApi.md#disableProductBrotliCompression) | **DELETE** /enabled-products/v1/brotli_compression/services/{service_id} | Disable product +[**enableProductBrotliCompression()**](ProductBrotliCompressionApi.md#enableProductBrotliCompression) | **PUT** /enabled-products/v1/brotli_compression/services/{service_id} | Enable product +[**getProductBrotliCompression()**](ProductBrotliCompressionApi.md#getProductBrotliCompression) | **GET** /enabled-products/v1/brotli_compression/services/{service_id} | Get product enablement status + + +## `disableProductBrotliCompression()` + +```php +disableProductBrotliCompression($options) // Disable product +``` + +Disable the Brotli Compression product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductBrotliCompression($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBrotliCompressionApi->disableProductBrotliCompression: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductBrotliCompression()` + +```php +enableProductBrotliCompression($options): \Fastly\Model\BrotliCompressionResponseBodyEnable // Enable product +``` + +Enable the Brotli Compression product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductBrotliCompression($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBrotliCompressionApi->enableProductBrotliCompression: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\BrotliCompressionResponseBodyEnable**](../Model/BrotliCompressionResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductBrotliCompression()` + +```php +getProductBrotliCompression($options): \Fastly\Model\BrotliCompressionResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Brotli Compression product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductBrotliCompression($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBrotliCompressionApi->getProductBrotliCompression: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\BrotliCompressionResponseBodyEnable**](../Model/BrotliCompressionResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductDdosProtectionApi.md b/docs/Api/ProductDdosProtectionApi.md new file mode 100644 index 00000000..7f350928 --- /dev/null +++ b/docs/Api/ProductDdosProtectionApi.md @@ -0,0 +1,197 @@ +# Fastly\Api\ProductDdosProtectionApi + + +```php +$apiInstance = new Fastly\Api\ProductDdosProtectionApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductDdosProtection()**](ProductDdosProtectionApi.md#disableProductDdosProtection) | **DELETE** /enabled-products/v1/ddos_protection/services/{service_id} | Disable product +[**enableProductDdosProtection()**](ProductDdosProtectionApi.md#enableProductDdosProtection) | **PUT** /enabled-products/v1/ddos_protection/services/{service_id} | Enable product +[**getProductDdosProtection()**](ProductDdosProtectionApi.md#getProductDdosProtection) | **GET** /enabled-products/v1/ddos_protection/services/{service_id} | Get product enablement status +[**getProductDdosProtectionConfiguration()**](ProductDdosProtectionApi.md#getProductDdosProtectionConfiguration) | **GET** /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Get configuration +[**setProductDdosProtectionConfiguration()**](ProductDdosProtectionApi.md#setProductDdosProtectionConfiguration) | **PATCH** /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Update configuration + + +## `disableProductDdosProtection()` + +```php +disableProductDdosProtection($options) // Disable product +``` + +Disable the DDoS Protection product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductDdosProtection($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDdosProtectionApi->disableProductDdosProtection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductDdosProtection()` + +```php +enableProductDdosProtection($options): \Fastly\Model\DdosProtectionResponseEnable // Enable product +``` + +Enable the DDoS Protection product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductDdosProtection($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDdosProtectionApi->enableProductDdosProtection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\DdosProtectionResponseEnable**](../Model/DdosProtectionResponseEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductDdosProtection()` + +```php +getProductDdosProtection($options): \Fastly\Model\DdosProtectionResponseEnable // Get product enablement status +``` + +Get the enablement status of the DDoS Protection product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductDdosProtection($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDdosProtectionApi->getProductDdosProtection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\DdosProtectionResponseEnable**](../Model/DdosProtectionResponseEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductDdosProtectionConfiguration()` + +```php +getProductDdosProtectionConfiguration($options): \Fastly\Model\DdosProtectionResponseConfigure // Get configuration +``` + +Get configuration of the DDoS Protection product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductDdosProtectionConfiguration($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDdosProtectionApi->getProductDdosProtectionConfiguration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\DdosProtectionResponseConfigure**](../Model/DdosProtectionResponseConfigure.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `setProductDdosProtectionConfiguration()` + +```php +setProductDdosProtectionConfiguration($options): \Fastly\Model\DdosProtectionResponseConfigure // Update configuration +``` + +Update configuration of the DDoS Protection product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. +$options['ddos_protection_request_update_configuration'] = {"mode":"log"}; // \Fastly\Model\DdosProtectionRequestUpdateConfiguration + +try { + $result = $apiInstance->setProductDdosProtectionConfiguration($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDdosProtectionApi->setProductDdosProtectionConfiguration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | +**ddos_protection_request_update_configuration** | [**\Fastly\Model\DdosProtectionRequestUpdateConfiguration**](../Model/DdosProtectionRequestUpdateConfiguration.md) | | [optional] + +### Return type + +[**\Fastly\Model\DdosProtectionResponseConfigure**](../Model/DdosProtectionResponseConfigure.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductDomainInspectorApi.md b/docs/Api/ProductDomainInspectorApi.md new file mode 100644 index 00000000..03cd72b8 --- /dev/null +++ b/docs/Api/ProductDomainInspectorApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductDomainInspectorApi + + +```php +$apiInstance = new Fastly\Api\ProductDomainInspectorApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductDomainInspector()**](ProductDomainInspectorApi.md#disableProductDomainInspector) | **DELETE** /enabled-products/v1/domain_inspector/services/{service_id} | Disable product +[**enableProductDomainInspector()**](ProductDomainInspectorApi.md#enableProductDomainInspector) | **PUT** /enabled-products/v1/domain_inspector/services/{service_id} | Enable product +[**getProductDomainInspector()**](ProductDomainInspectorApi.md#getProductDomainInspector) | **GET** /enabled-products/v1/domain_inspector/services/{service_id} | Get product enablement status + + +## `disableProductDomainInspector()` + +```php +disableProductDomainInspector($options) // Disable product +``` + +Disable the Domain Inspector product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductDomainInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainInspectorApi->disableProductDomainInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductDomainInspector()` + +```php +enableProductDomainInspector($options): \Fastly\Model\DomainInspectorResponseBodyEnable // Enable product +``` + +Enable the Domain Inspector product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductDomainInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainInspectorApi->enableProductDomainInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\DomainInspectorResponseBodyEnable**](../Model/DomainInspectorResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductDomainInspector()` + +```php +getProductDomainInspector($options): \Fastly\Model\DomainInspectorResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Domain Inspector product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductDomainInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainInspectorApi->getProductDomainInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\DomainInspectorResponseBodyEnable**](../Model/DomainInspectorResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductFanoutApi.md b/docs/Api/ProductFanoutApi.md new file mode 100644 index 00000000..1a082b6b --- /dev/null +++ b/docs/Api/ProductFanoutApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductFanoutApi + + +```php +$apiInstance = new Fastly\Api\ProductFanoutApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductFanout()**](ProductFanoutApi.md#disableProductFanout) | **DELETE** /enabled-products/v1/fanout/services/{service_id} | Disable product +[**enableProductFanout()**](ProductFanoutApi.md#enableProductFanout) | **PUT** /enabled-products/v1/fanout/services/{service_id} | Enable product +[**getProductFanout()**](ProductFanoutApi.md#getProductFanout) | **GET** /enabled-products/v1/fanout/services/{service_id} | Get product enablement status + + +## `disableProductFanout()` + +```php +disableProductFanout($options) // Disable product +``` + +Disable the Fanout product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductFanout($options); +} catch (Exception $e) { + echo 'Exception when calling ProductFanoutApi->disableProductFanout: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductFanout()` + +```php +enableProductFanout($options): \Fastly\Model\FanoutResponseBodyEnable // Enable product +``` + +Enable the Fanout product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductFanout($options); +} catch (Exception $e) { + echo 'Exception when calling ProductFanoutApi->enableProductFanout: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\FanoutResponseBodyEnable**](../Model/FanoutResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductFanout()` + +```php +getProductFanout($options): \Fastly\Model\FanoutResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Fanout product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductFanout($options); +} catch (Exception $e) { + echo 'Exception when calling ProductFanoutApi->getProductFanout: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\FanoutResponseBodyEnable**](../Model/FanoutResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductImageOptimizerApi.md b/docs/Api/ProductImageOptimizerApi.md new file mode 100644 index 00000000..a08e71ab --- /dev/null +++ b/docs/Api/ProductImageOptimizerApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductImageOptimizerApi + + +```php +$apiInstance = new Fastly\Api\ProductImageOptimizerApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductImageOptimizer()**](ProductImageOptimizerApi.md#disableProductImageOptimizer) | **DELETE** /enabled-products/v1/image_optimizer/services/{service_id} | Disable product +[**enableProductImageOptimizer()**](ProductImageOptimizerApi.md#enableProductImageOptimizer) | **PUT** /enabled-products/v1/image_optimizer/services/{service_id} | Enable product +[**getProductImageOptimizer()**](ProductImageOptimizerApi.md#getProductImageOptimizer) | **GET** /enabled-products/v1/image_optimizer/services/{service_id} | Get product enablement status + + +## `disableProductImageOptimizer()` + +```php +disableProductImageOptimizer($options) // Disable product +``` + +Disable the Image Optimizer product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductImageOptimizer($options); +} catch (Exception $e) { + echo 'Exception when calling ProductImageOptimizerApi->disableProductImageOptimizer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductImageOptimizer()` + +```php +enableProductImageOptimizer($options): \Fastly\Model\ImageOptimizerResponseBodyEnable // Enable product +``` + +Enable the Image Optimizer product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductImageOptimizer($options); +} catch (Exception $e) { + echo 'Exception when calling ProductImageOptimizerApi->enableProductImageOptimizer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\ImageOptimizerResponseBodyEnable**](../Model/ImageOptimizerResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductImageOptimizer()` + +```php +getProductImageOptimizer($options): \Fastly\Model\ImageOptimizerResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Image Optimizer product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductImageOptimizer($options); +} catch (Exception $e) { + echo 'Exception when calling ProductImageOptimizerApi->getProductImageOptimizer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\ImageOptimizerResponseBodyEnable**](../Model/ImageOptimizerResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductLogExplorerInsightsApi.md b/docs/Api/ProductLogExplorerInsightsApi.md new file mode 100644 index 00000000..524a9918 --- /dev/null +++ b/docs/Api/ProductLogExplorerInsightsApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductLogExplorerInsightsApi + + +```php +$apiInstance = new Fastly\Api\ProductLogExplorerInsightsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#disableProductLogExplorerInsights) | **DELETE** /enabled-products/v1/log_explorer_insights/services/{service_id} | Disable product +[**enableProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#enableProductLogExplorerInsights) | **PUT** /enabled-products/v1/log_explorer_insights/services/{service_id} | Enable product +[**getProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#getProductLogExplorerInsights) | **GET** /enabled-products/v1/log_explorer_insights/services/{service_id} | Get product enablement status + + +## `disableProductLogExplorerInsights()` + +```php +disableProductLogExplorerInsights($options) // Disable product +``` + +Disable the Log Explorer & Insights product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductLogExplorerInsights($options); +} catch (Exception $e) { + echo 'Exception when calling ProductLogExplorerInsightsApi->disableProductLogExplorerInsights: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductLogExplorerInsights()` + +```php +enableProductLogExplorerInsights($options): \Fastly\Model\LogExplorerInsightsResponseBodyEnable // Enable product +``` + +Enable the Log Explorer & Insights product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductLogExplorerInsights($options); +} catch (Exception $e) { + echo 'Exception when calling ProductLogExplorerInsightsApi->enableProductLogExplorerInsights: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\LogExplorerInsightsResponseBodyEnable**](../Model/LogExplorerInsightsResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductLogExplorerInsights()` + +```php +getProductLogExplorerInsights($options): \Fastly\Model\LogExplorerInsightsResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Log Explorer & Insights product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductLogExplorerInsights($options); +} catch (Exception $e) { + echo 'Exception when calling ProductLogExplorerInsightsApi->getProductLogExplorerInsights: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\LogExplorerInsightsResponseBodyEnable**](../Model/LogExplorerInsightsResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductNgwafApi.md b/docs/Api/ProductNgwafApi.md new file mode 100644 index 00000000..9687eff1 --- /dev/null +++ b/docs/Api/ProductNgwafApi.md @@ -0,0 +1,199 @@ +# Fastly\Api\ProductNgwafApi + + +```php +$apiInstance = new Fastly\Api\ProductNgwafApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductNgwaf()**](ProductNgwafApi.md#disableProductNgwaf) | **DELETE** /enabled-products/v1/ngwaf/services/{service_id} | Disable product +[**enableProductNgwaf()**](ProductNgwafApi.md#enableProductNgwaf) | **PUT** /enabled-products/v1/ngwaf/services/{service_id} | Enable product +[**getProductNgwaf()**](ProductNgwafApi.md#getProductNgwaf) | **GET** /enabled-products/v1/ngwaf/services/{service_id} | Get product enablement status +[**getProductNgwafConfiguration()**](ProductNgwafApi.md#getProductNgwafConfiguration) | **GET** /enabled-products/v1/ngwaf/services/{service_id}/configuration | Get configuration +[**setProductNgwafConfiguration()**](ProductNgwafApi.md#setProductNgwafConfiguration) | **PATCH** /enabled-products/v1/ngwaf/services/{service_id}/configuration | Update configuration + + +## `disableProductNgwaf()` + +```php +disableProductNgwaf($options) // Disable product +``` + +Disable the Next-Gen WAF product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductNgwaf($options); +} catch (Exception $e) { + echo 'Exception when calling ProductNgwafApi->disableProductNgwaf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductNgwaf()` + +```php +enableProductNgwaf($options): \Fastly\Model\NgwafResponseEnable // Enable product +``` + +Enable the Next-Gen WAF product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. +$options['ngwaf_request_enable'] = {"workspace_id":"7JFbo4RNA0OKdFWC04r6B3"}; // \Fastly\Model\NgwafRequestEnable + +try { + $result = $apiInstance->enableProductNgwaf($options); +} catch (Exception $e) { + echo 'Exception when calling ProductNgwafApi->enableProductNgwaf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | +**ngwaf_request_enable** | [**\Fastly\Model\NgwafRequestEnable**](../Model/NgwafRequestEnable.md) | | [optional] + +### Return type + +[**\Fastly\Model\NgwafResponseEnable**](../Model/NgwafResponseEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductNgwaf()` + +```php +getProductNgwaf($options): \Fastly\Model\NgwafResponseEnable // Get product enablement status +``` + +Get the enablement status of the Next-Gen WAF product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductNgwaf($options); +} catch (Exception $e) { + echo 'Exception when calling ProductNgwafApi->getProductNgwaf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\NgwafResponseEnable**](../Model/NgwafResponseEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductNgwafConfiguration()` + +```php +getProductNgwafConfiguration($options): \Fastly\Model\NgwafResponseConfigure // Get configuration +``` + +Get configuration of the Next-Gen WAF product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductNgwafConfiguration($options); +} catch (Exception $e) { + echo 'Exception when calling ProductNgwafApi->getProductNgwafConfiguration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\NgwafResponseConfigure**](../Model/NgwafResponseConfigure.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `setProductNgwafConfiguration()` + +```php +setProductNgwafConfiguration($options): \Fastly\Model\NgwafResponseConfigure // Update configuration +``` + +Update configuration of the Next-Gen WAF product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. +$options['ngwaf_request_update_configuration'] = {"workspace_id":"7JFbo4RNA0OKdFWC04r6B3","traffic_ramp":"20"}; // \Fastly\Model\NgwafRequestUpdateConfiguration + +try { + $result = $apiInstance->setProductNgwafConfiguration($options); +} catch (Exception $e) { + echo 'Exception when calling ProductNgwafApi->setProductNgwafConfiguration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | +**ngwaf_request_update_configuration** | [**\Fastly\Model\NgwafRequestUpdateConfiguration**](../Model/NgwafRequestUpdateConfiguration.md) | | [optional] + +### Return type + +[**\Fastly\Model\NgwafResponseConfigure**](../Model/NgwafResponseConfigure.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductObjectStorageApi.md b/docs/Api/ProductObjectStorageApi.md new file mode 100644 index 00000000..066c406c --- /dev/null +++ b/docs/Api/ProductObjectStorageApi.md @@ -0,0 +1,116 @@ +# Fastly\Api\ProductObjectStorageApi + + +```php +$apiInstance = new Fastly\Api\ProductObjectStorageApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductObjectStorage()**](ProductObjectStorageApi.md#disableProductObjectStorage) | **DELETE** /enabled-products/v1/object_storage | Disable product +[**enableObjectStorage()**](ProductObjectStorageApi.md#enableObjectStorage) | **PUT** /enabled-products/v1/object_storage | Enable product +[**getObjectStorage()**](ProductObjectStorageApi.md#getObjectStorage) | **GET** /enabled-products/v1/object_storage | Get product enablement status + + +## `disableProductObjectStorage()` + +```php +disableProductObjectStorage($options) // Disable product +``` + +Disable the Object Storage product + +### Example +```php + +try { + $apiInstance->disableProductObjectStorage($options); +} catch (Exception $e) { + echo 'Exception when calling ProductObjectStorageApi->disableProductObjectStorage: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableObjectStorage()` + +```php +enableObjectStorage($options): \Fastly\Model\ObjectStorageResponseBodyEnable // Enable product +``` + +Enable the Object Storage product + +### Example +```php + +try { + $result = $apiInstance->enableObjectStorage($options); +} catch (Exception $e) { + echo 'Exception when calling ProductObjectStorageApi->enableObjectStorage: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\ObjectStorageResponseBodyEnable**](../Model/ObjectStorageResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getObjectStorage()` + +```php +getObjectStorage($options): \Fastly\Model\ObjectStorageResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Object Storage product + +### Example +```php + +try { + $result = $apiInstance->getObjectStorage($options); +} catch (Exception $e) { + echo 'Exception when calling ProductObjectStorageApi->getObjectStorage: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\ObjectStorageResponseBodyEnable**](../Model/ObjectStorageResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductOriginInspectorApi.md b/docs/Api/ProductOriginInspectorApi.md new file mode 100644 index 00000000..5e71a0ea --- /dev/null +++ b/docs/Api/ProductOriginInspectorApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductOriginInspectorApi + + +```php +$apiInstance = new Fastly\Api\ProductOriginInspectorApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductOriginInspector()**](ProductOriginInspectorApi.md#disableProductOriginInspector) | **DELETE** /enabled-products/v1/origin_inspector/services/{service_id} | Disable product +[**enableProductOriginInspector()**](ProductOriginInspectorApi.md#enableProductOriginInspector) | **PUT** /enabled-products/v1/origin_inspector/services/{service_id} | Enable product +[**getProductOriginInspector()**](ProductOriginInspectorApi.md#getProductOriginInspector) | **GET** /enabled-products/v1/origin_inspector/services/{service_id} | Get product enablement status + + +## `disableProductOriginInspector()` + +```php +disableProductOriginInspector($options) // Disable product +``` + +Disable the Origin Inspector product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductOriginInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductOriginInspectorApi->disableProductOriginInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductOriginInspector()` + +```php +enableProductOriginInspector($options): \Fastly\Model\OriginInspectorResponseBodyEnable // Enable product +``` + +Enable the Origin Inspector product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductOriginInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductOriginInspectorApi->enableProductOriginInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\OriginInspectorResponseBodyEnable**](../Model/OriginInspectorResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductOriginInspector()` + +```php +getProductOriginInspector($options): \Fastly\Model\OriginInspectorResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Origin Inspector product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductOriginInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductOriginInspectorApi->getProductOriginInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\OriginInspectorResponseBodyEnable**](../Model/OriginInspectorResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductWebsocketsApi.md b/docs/Api/ProductWebsocketsApi.md new file mode 100644 index 00000000..13712aca --- /dev/null +++ b/docs/Api/ProductWebsocketsApi.md @@ -0,0 +1,125 @@ +# Fastly\Api\ProductWebsocketsApi + + +```php +$apiInstance = new Fastly\Api\ProductWebsocketsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductWebsockets()**](ProductWebsocketsApi.md#disableProductWebsockets) | **DELETE** /enabled-products/v1/websockets/services/{service_id} | Disable product +[**enableProductWebsockets()**](ProductWebsocketsApi.md#enableProductWebsockets) | **PUT** /enabled-products/v1/websockets/services/{service_id} | Enable product +[**getProductWebsockets()**](ProductWebsocketsApi.md#getProductWebsockets) | **GET** /enabled-products/v1/websockets/services/{service_id} | Get product enablement status + + +## `disableProductWebsockets()` + +```php +disableProductWebsockets($options) // Disable product +``` + +Disable the Websockets product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductWebsockets($options); +} catch (Exception $e) { + echo 'Exception when calling ProductWebsocketsApi->disableProductWebsockets: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductWebsockets()` + +```php +enableProductWebsockets($options): \Fastly\Model\WebsocketsResponseBodyEnable // Enable product +``` + +Enable the WebSockets product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductWebsockets($options); +} catch (Exception $e) { + echo 'Exception when calling ProductWebsocketsApi->enableProductWebsockets: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\WebsocketsResponseBodyEnable**](../Model/WebsocketsResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductWebsockets()` + +```php +getProductWebsockets($options): \Fastly\Model\WebsocketsResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the WebSockets product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductWebsockets($options); +} catch (Exception $e) { + echo 'Exception when calling ProductWebsocketsApi->getProductWebsockets: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\WebsocketsResponseBodyEnable**](../Model/WebsocketsResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/SnippetApi.md b/docs/Api/SnippetApi.md index c830a114..7ae18004 100644 --- a/docs/Api/SnippetApi.md +++ b/docs/Api/SnippetApi.md @@ -18,12 +18,12 @@ $apiInstance = new Fastly\Api\SnippetApi( Method | HTTP request | Description ------ | ------------ | ----------- [**createSnippet()**](SnippetApi.md#createSnippet) | **POST** /service/{service_id}/version/{version_id}/snippet | Create a snippet -[**deleteSnippet()**](SnippetApi.md#deleteSnippet) | **DELETE** /service/{service_id}/version/{version_id}/snippet/{snippet_name} | Delete a snippet -[**getSnippet()**](SnippetApi.md#getSnippet) | **GET** /service/{service_id}/version/{version_id}/snippet/{snippet_name} | Get a versioned snippet -[**getSnippetDynamic()**](SnippetApi.md#getSnippetDynamic) | **GET** /service/{service_id}/snippet/{snippet_id} | Get a dynamic snippet +[**deleteSnippet()**](SnippetApi.md#deleteSnippet) | **DELETE** /service/{service_id}/version/{version_id}/snippet/{name} | Delete a snippet +[**getSnippet()**](SnippetApi.md#getSnippet) | **GET** /service/{service_id}/version/{version_id}/snippet/{name} | Get a versioned snippet +[**getSnippetDynamic()**](SnippetApi.md#getSnippetDynamic) | **GET** /service/{service_id}/snippet/{id} | Get a dynamic snippet [**listSnippets()**](SnippetApi.md#listSnippets) | **GET** /service/{service_id}/version/{version_id}/snippet | List snippets -[**updateSnippet()**](SnippetApi.md#updateSnippet) | **PUT** /service/{service_id}/version/{version_id}/snippet/{snippet_name} | Update a versioned snippet -[**updateSnippetDynamic()**](SnippetApi.md#updateSnippetDynamic) | **PUT** /service/{service_id}/snippet/{snippet_id} | Update a dynamic snippet +[**updateSnippet()**](SnippetApi.md#updateSnippet) | **PUT** /service/{service_id}/version/{version_id}/snippet/{name} | Update a versioned snippet +[**updateSnippetDynamic()**](SnippetApi.md#updateSnippetDynamic) | **PUT** /service/{service_id}/snippet/{id} | Update a dynamic snippet ## `createSnippet()` @@ -84,7 +84,7 @@ Delete a specific snippet for a particular service and version. ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. -$options['snippet_name'] = 'snippet_name_example'; // string | The name for the snippet. +$options['name'] = 'name_example'; // string | The name for the snippet. try { $result = $apiInstance->deleteSnippet($options); @@ -101,7 +101,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | -**snippet_name** | **string** | The name for the snippet. | +**name** | **string** | The name for the snippet. | ### Return type @@ -122,7 +122,7 @@ Get a single snippet for a particular service and version. ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. -$options['snippet_name'] = 'snippet_name_example'; // string | The name for the snippet. +$options['name'] = 'name_example'; // string | The name for the snippet. try { $result = $apiInstance->getSnippet($options); @@ -139,7 +139,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | -**snippet_name** | **string** | The name for the snippet. | +**name** | **string** | The name for the snippet. | ### Return type @@ -159,7 +159,7 @@ Get a single dynamic snippet for a particular service. ### Example ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['snippet_id'] = 'snippet_id_example'; // string | Alphanumeric string identifying a VCL Snippet. +$options['id'] = 'id_example'; // string | Alphanumeric string identifying a VCL Snippet. try { $result = $apiInstance->getSnippetDynamic($options); @@ -175,7 +175,7 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | -**snippet_id** | **string** | Alphanumeric string identifying a VCL Snippet. | +**id** | **string** | Alphanumeric string identifying a VCL Snippet. | ### Return type @@ -232,7 +232,7 @@ Update a specific snippet for a particular service and version. ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. -$options['snippet_name'] = 'snippet_name_example'; // string | The name for the snippet. +$options['name'] = 'name_example'; // string | The name for the snippet. try { $result = $apiInstance->updateSnippet($options); @@ -249,7 +249,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | -**snippet_name** | **string** | The name for the snippet. | +**name** | **string** | The name for the snippet. | ### Return type @@ -269,7 +269,7 @@ Update a dynamic snippet for a particular service. ### Example ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. -$options['snippet_id'] = 'snippet_id_example'; // string | Alphanumeric string identifying a VCL Snippet. +$options['id'] = 'id_example'; // string | Alphanumeric string identifying a VCL Snippet. $options['name'] = 'name_example'; // string | The name for the snippet. $options['type'] = 'type_example'; // string | The location in generated VCL where the snippet should be placed. $options['content'] = 'content_example'; // string | The VCL code that specifies exactly what the snippet does. @@ -290,7 +290,7 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | -**snippet_id** | **string** | Alphanumeric string identifying a VCL Snippet. | +**id** | **string** | Alphanumeric string identifying a VCL Snippet. | **name** | **string** | The name for the snippet. | [optional] **type** | **string** | The location in generated VCL where the snippet should be placed. | [optional] [one of: 'init', 'recv', 'hash', 'hit', 'miss', 'pass', 'fetch', 'error', 'deliver', 'log', 'none'] **content** | **string** | The VCL code that specifies exactly what the snippet does. | [optional] diff --git a/docs/Model/AiAcceleratorResponseBodyEnable.md b/docs/Model/AiAcceleratorResponseBodyEnable.md new file mode 100644 index 00000000..3b2ec1dc --- /dev/null +++ b/docs/Model/AiAcceleratorResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # AiAcceleratorResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\AiAcceleratorResponseProductProduct**](AiAcceleratorResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\AiAcceleratorResponseCustomerCustomer**](AiAcceleratorResponseCustomerCustomer.md) | | [optional] +**_links** | [**\Fastly\Model\AiAcceleratorResponseLinksLinks**](AiAcceleratorResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AiAcceleratorResponseCustomer.md b/docs/Model/AiAcceleratorResponseCustomer.md new file mode 100644 index 00000000..75cb2890 --- /dev/null +++ b/docs/Model/AiAcceleratorResponseCustomer.md @@ -0,0 +1,10 @@ +# # AiAcceleratorResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\AiAcceleratorResponseCustomerCustomer**](AiAcceleratorResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AiAcceleratorResponseCustomerCustomer.md b/docs/Model/AiAcceleratorResponseCustomerCustomer.md new file mode 100644 index 00000000..62225ed2 --- /dev/null +++ b/docs/Model/AiAcceleratorResponseCustomerCustomer.md @@ -0,0 +1,11 @@ +# # AiAcceleratorResponseCustomerCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Customer identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AiAcceleratorResponseLinks.md b/docs/Model/AiAcceleratorResponseLinks.md new file mode 100644 index 00000000..6c160606 --- /dev/null +++ b/docs/Model/AiAcceleratorResponseLinks.md @@ -0,0 +1,10 @@ +# # AiAcceleratorResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\AiAcceleratorResponseLinksLinks**](AiAcceleratorResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AiAcceleratorResponseLinksLinks.md b/docs/Model/AiAcceleratorResponseLinksLinks.md new file mode 100644 index 00000000..91f82b66 --- /dev/null +++ b/docs/Model/AiAcceleratorResponseLinksLinks.md @@ -0,0 +1,10 @@ +# # AiAcceleratorResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AiAcceleratorResponseProduct.md b/docs/Model/AiAcceleratorResponseProduct.md new file mode 100644 index 00000000..b90eb0aa --- /dev/null +++ b/docs/Model/AiAcceleratorResponseProduct.md @@ -0,0 +1,10 @@ +# # AiAcceleratorResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\AiAcceleratorResponseProductProduct**](AiAcceleratorResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AiAcceleratorResponseProductProduct.md b/docs/Model/AiAcceleratorResponseProductProduct.md new file mode 100644 index 00000000..baaaf101 --- /dev/null +++ b/docs/Model/AiAcceleratorResponseProductProduct.md @@ -0,0 +1,11 @@ +# # AiAcceleratorResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Backend.md b/docs/Model/Backend.md index 900baac2..c585b255 100644 --- a/docs/Model/Backend.md +++ b/docs/Model/Backend.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **hostname** | **string** | The hostname of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv4** | **string** | IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv6** | **string** | IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] -**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. | [optional] +**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. | [optional] **max_conn** | **int** | Maximum number of concurrent connections this backend will accept. | [optional] **max_tls_version** | **string** | Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **min_tls_version** | **string** | Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] diff --git a/docs/Model/BackendResponse.md b/docs/Model/BackendResponse.md index 4a7d2f47..e5374591 100644 --- a/docs/Model/BackendResponse.md +++ b/docs/Model/BackendResponse.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **hostname** | **string** | The hostname of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv4** | **string** | IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] **ipv6** | **string** | IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. | [optional] -**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. | [optional] +**keepalive_time** | **int** | How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. | [optional] **max_conn** | **int** | Maximum number of concurrent connections this backend will accept. | [optional] **max_tls_version** | **string** | Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] **min_tls_version** | **string** | Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] diff --git a/docs/Model/BatchErrors.md b/docs/Model/BatchErrors.md deleted file mode 100644 index f6fc5c25..00000000 --- a/docs/Model/BatchErrors.md +++ /dev/null @@ -1,13 +0,0 @@ -# # BatchErrors - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **string** | The key that the error corresponds to. This field will be empty if the object or one of its fields was unable to be parsed. | [optional] -**index** | **int** | The line number of the payload on which the error occurred (starting from 0 for the first line). | [optional] -**code** | **string** | The HTTP response code for the request, or a 400 if the request was not able to be completed. | [optional] -**reason** | **string** | A descriptor of this particular item's error. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseBodyEnable.md b/docs/Model/BotManagementResponseBodyEnable.md new file mode 100644 index 00000000..a3e8e7c1 --- /dev/null +++ b/docs/Model/BotManagementResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # BotManagementResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\BotManagementResponseProductProduct**](BotManagementResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\BotManagementResponseLinksLinks**](BotManagementResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseLinks.md b/docs/Model/BotManagementResponseLinks.md new file mode 100644 index 00000000..d305aad3 --- /dev/null +++ b/docs/Model/BotManagementResponseLinks.md @@ -0,0 +1,10 @@ +# # BotManagementResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\BotManagementResponseLinksLinks**](BotManagementResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseLinksLinks.md b/docs/Model/BotManagementResponseLinksLinks.md new file mode 100644 index 00000000..054db6e3 --- /dev/null +++ b/docs/Model/BotManagementResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # BotManagementResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseProduct.md b/docs/Model/BotManagementResponseProduct.md new file mode 100644 index 00000000..39edf4a1 --- /dev/null +++ b/docs/Model/BotManagementResponseProduct.md @@ -0,0 +1,10 @@ +# # BotManagementResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\BotManagementResponseProductProduct**](BotManagementResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseProductProduct.md b/docs/Model/BotManagementResponseProductProduct.md new file mode 100644 index 00000000..30da8ac0 --- /dev/null +++ b/docs/Model/BotManagementResponseProductProduct.md @@ -0,0 +1,11 @@ +# # BotManagementResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseService.md b/docs/Model/BotManagementResponseService.md new file mode 100644 index 00000000..4b48b4ba --- /dev/null +++ b/docs/Model/BotManagementResponseService.md @@ -0,0 +1,10 @@ +# # BotManagementResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EnabledProductResponseService.md b/docs/Model/BotManagementResponseServiceService.md similarity index 88% rename from docs/Model/EnabledProductResponseService.md rename to docs/Model/BotManagementResponseServiceService.md index b8aa0a43..4f59ac7b 100644 --- a/docs/Model/EnabledProductResponseService.md +++ b/docs/Model/BotManagementResponseServiceService.md @@ -1,4 +1,4 @@ -# # EnabledProductResponseService +# # BotManagementResponseServiceService ## Properties diff --git a/docs/Model/BrotliCompressionResponseBodyEnable.md b/docs/Model/BrotliCompressionResponseBodyEnable.md new file mode 100644 index 00000000..7ed82eb7 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # BrotliCompressionResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\BrotliCompressionResponseProductProduct**](BrotliCompressionResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\BrotliCompressionResponseLinksLinks**](BrotliCompressionResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseLinks.md b/docs/Model/BrotliCompressionResponseLinks.md new file mode 100644 index 00000000..8db28f6b --- /dev/null +++ b/docs/Model/BrotliCompressionResponseLinks.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\BrotliCompressionResponseLinksLinks**](BrotliCompressionResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseLinksLinks.md b/docs/Model/BrotliCompressionResponseLinksLinks.md new file mode 100644 index 00000000..2d23ac6b --- /dev/null +++ b/docs/Model/BrotliCompressionResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # BrotliCompressionResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseProduct.md b/docs/Model/BrotliCompressionResponseProduct.md new file mode 100644 index 00000000..ab0ca50b --- /dev/null +++ b/docs/Model/BrotliCompressionResponseProduct.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\BrotliCompressionResponseProductProduct**](BrotliCompressionResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseProductProduct.md b/docs/Model/BrotliCompressionResponseProductProduct.md new file mode 100644 index 00000000..dd2f4ec1 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseProductProduct.md @@ -0,0 +1,11 @@ +# # BrotliCompressionResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseService.md b/docs/Model/BrotliCompressionResponseService.md new file mode 100644 index 00000000..a64a70af --- /dev/null +++ b/docs/Model/BrotliCompressionResponseService.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ComputeAclList.md b/docs/Model/ComputeAclList.md new file mode 100644 index 00000000..cec8d264 --- /dev/null +++ b/docs/Model/ComputeAclList.md @@ -0,0 +1,11 @@ +# # ComputeAclList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\ComputeAclCreateAclsResponse[]**](ComputeAclCreateAclsResponse.md) | | [optional] +**meta** | [**\Fastly\Model\ComputeAclListMeta**](ComputeAclListMeta.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReadOnlyServiceId.md b/docs/Model/ComputeAclListMeta.md similarity index 72% rename from docs/Model/ReadOnlyServiceId.md rename to docs/Model/ComputeAclListMeta.md index 569e8f3d..6c003436 100644 --- a/docs/Model/ReadOnlyServiceId.md +++ b/docs/Model/ComputeAclListMeta.md @@ -1,9 +1,10 @@ -# # ReadOnlyServiceId +# # ComputeAclListMeta ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**total** | **int** | Total of ACLs. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ComputeAclLookup.md b/docs/Model/ComputeAclLookup.md index 1c5df805..14c30b81 100644 --- a/docs/Model/ComputeAclLookup.md +++ b/docs/Model/ComputeAclLookup.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**prefix** | **string** | A valid IPv4 or IPv6 address. | [optional] -**length** | **int** | The length of address in the IP addressing space. | [optional] +**prefix** | **string** | A valid IPv4 or IPv6 address and prefix in CIDR notation. | [optional] **action** | **string** | One of \"ALLOW\" or \"BLOCK\". | [optional] diff --git a/docs/Model/ConfiguredProductResponse.md b/docs/Model/ConfiguredProductResponse.md deleted file mode 100644 index 7ab0ae85..00000000 --- a/docs/Model/ConfiguredProductResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # ConfiguredProductResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product** | [**\Fastly\Model\ConfiguredProductResponseProduct**](ConfiguredProductResponseProduct.md) | | [optional] -**service** | [**\Fastly\Model\EnabledProductResponseService**](EnabledProductResponseService.md) | | [optional] -**configuration** | [**\Fastly\Model\ConfiguredProductResponseConfiguration**](ConfiguredProductResponseConfiguration.md) | | [optional] -**_links** | [**\Fastly\Model\ConfiguredProductResponseLinks**](ConfiguredProductResponseLinks.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2004Meta.md b/docs/Model/DdosProtectionRequestUpdateConfiguration.md similarity index 61% rename from docs/Model/InlineResponse2004Meta.md rename to docs/Model/DdosProtectionRequestUpdateConfiguration.md index efea9f74..d6be1d1a 100644 --- a/docs/Model/InlineResponse2004Meta.md +++ b/docs/Model/DdosProtectionRequestUpdateConfiguration.md @@ -1,11 +1,10 @@ -# # InlineResponse2004Meta +# # DdosProtectionRequestUpdateConfiguration ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**next_cursor** | **string** | | [optional] -**limit** | **int** | | [optional] +**mode** | **string** | Operation mode | [one of: 'false', 'log', 'block'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseConfiguration.md b/docs/Model/DdosProtectionResponseConfiguration.md new file mode 100644 index 00000000..0025711c --- /dev/null +++ b/docs/Model/DdosProtectionResponseConfiguration.md @@ -0,0 +1,10 @@ +# # DdosProtectionResponseConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configuration** | [**\Fastly\Model\DdosProtectionResponseConfigurationConfiguration**](DdosProtectionResponseConfigurationConfiguration.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Store.md b/docs/Model/DdosProtectionResponseConfigurationConfiguration.md similarity index 65% rename from docs/Model/Store.md rename to docs/Model/DdosProtectionResponseConfigurationConfiguration.md index 2029dbb5..a9dd7bb1 100644 --- a/docs/Model/Store.md +++ b/docs/Model/DdosProtectionResponseConfigurationConfiguration.md @@ -1,10 +1,10 @@ -# # Store +# # DdosProtectionResponseConfigurationConfiguration ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | A human-readable name for the store. | [optional] +**mode** | **string** | Operation mode | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseConfigure.md b/docs/Model/DdosProtectionResponseConfigure.md new file mode 100644 index 00000000..394b8b9a --- /dev/null +++ b/docs/Model/DdosProtectionResponseConfigure.md @@ -0,0 +1,13 @@ +# # DdosProtectionResponseConfigure + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DdosProtectionResponseProductProduct**](DdosProtectionResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**configuration** | [**\Fastly\Model\DdosProtectionResponseConfigurationConfiguration**](DdosProtectionResponseConfigurationConfiguration.md) | | [optional] +**_links** | [**\Fastly\Model\DdosProtectionResponseLinksLinks**](DdosProtectionResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseEnable.md b/docs/Model/DdosProtectionResponseEnable.md new file mode 100644 index 00000000..f48f824d --- /dev/null +++ b/docs/Model/DdosProtectionResponseEnable.md @@ -0,0 +1,12 @@ +# # DdosProtectionResponseEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DdosProtectionResponseProductProduct**](DdosProtectionResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\DdosProtectionResponseLinksLinks**](DdosProtectionResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2003Meta.md b/docs/Model/DdosProtectionResponseLinks.md similarity index 56% rename from docs/Model/InlineResponse2003Meta.md rename to docs/Model/DdosProtectionResponseLinks.md index 90c210a4..b3786f00 100644 --- a/docs/Model/InlineResponse2003Meta.md +++ b/docs/Model/DdosProtectionResponseLinks.md @@ -1,11 +1,10 @@ -# # InlineResponse2003Meta +# # DdosProtectionResponseLinks ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**next_cursor** | **string** | Cursor for the next page. | [optional] -**limit** | **int** | Entries returned. | [optional] +**_links** | [**\Fastly\Model\DdosProtectionResponseLinksLinks**](DdosProtectionResponseLinksLinks.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseLinksLinks.md b/docs/Model/DdosProtectionResponseLinksLinks.md new file mode 100644 index 00000000..538416fc --- /dev/null +++ b/docs/Model/DdosProtectionResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # DdosProtectionResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseProduct.md b/docs/Model/DdosProtectionResponseProduct.md new file mode 100644 index 00000000..ada3392d --- /dev/null +++ b/docs/Model/DdosProtectionResponseProduct.md @@ -0,0 +1,10 @@ +# # DdosProtectionResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DdosProtectionResponseProductProduct**](DdosProtectionResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseProductProduct.md b/docs/Model/DdosProtectionResponseProductProduct.md new file mode 100644 index 00000000..3945722f --- /dev/null +++ b/docs/Model/DdosProtectionResponseProductProduct.md @@ -0,0 +1,11 @@ +# # DdosProtectionResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseService.md b/docs/Model/DdosProtectionResponseService.md new file mode 100644 index 00000000..8f64bde5 --- /dev/null +++ b/docs/Model/DdosProtectionResponseService.md @@ -0,0 +1,10 @@ +# # DdosProtectionResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorMeasurements.md b/docs/Model/DomainInspectorMeasurements.md index d8620c1c..f5b151dc 100644 --- a/docs/Model/DomainInspectorMeasurements.md +++ b/docs/Model/DomainInspectorMeasurements.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses delivered with status code 503 (Service Unavailable). | [optional] **status_504** | **int** | Number of responses delivered with status code 504 (Gateway Timeout). | [optional] **status_505** | **int** | Number of responses delivered with status code 505 (HTTP Version Not Supported). | [optional] +**status_530** | **int** | Number of responses delivered with status code 530. | [optional] **requests** | **int** | Number of requests processed. | [optional] **resp_header_bytes** | **int** | Total header bytes delivered. | [optional] **resp_body_bytes** | **int** | Total body bytes delivered. | [optional] @@ -61,6 +62,7 @@ Name | Type | Description | Notes **origin_status_503** | **int** | Number of responses received from origin with status code 503 (Service Unavailable). | [optional] **origin_status_504** | **int** | Number of responses received from origin with status code 504 (Gateway Timeout). | [optional] **origin_status_505** | **int** | Number of responses received from origin with status code 505 (HTTP Version Not Supported). | [optional] +**origin_status_530** | **int** | Number of responses received from origin with status code 530. | [optional] **origin_status_1xx** | **int** | Number of \"Informational\" category status codes received from origin. | [optional] **origin_status_2xx** | **int** | Number of \"Success\" status codes received from origin. | [optional] **origin_status_3xx** | **int** | Number of \"Redirection\" codes received from origin. | [optional] diff --git a/docs/Model/DomainInspectorResponseBodyEnable.md b/docs/Model/DomainInspectorResponseBodyEnable.md new file mode 100644 index 00000000..66b53a0c --- /dev/null +++ b/docs/Model/DomainInspectorResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # DomainInspectorResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DomainInspectorResponseProductProduct**](DomainInspectorResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\DomainInspectorResponseLinksLinks**](DomainInspectorResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseLinks.md b/docs/Model/DomainInspectorResponseLinks.md new file mode 100644 index 00000000..fc1b222e --- /dev/null +++ b/docs/Model/DomainInspectorResponseLinks.md @@ -0,0 +1,10 @@ +# # DomainInspectorResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\DomainInspectorResponseLinksLinks**](DomainInspectorResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseLinksLinks.md b/docs/Model/DomainInspectorResponseLinksLinks.md new file mode 100644 index 00000000..59a6eeb1 --- /dev/null +++ b/docs/Model/DomainInspectorResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # DomainInspectorResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseProduct.md b/docs/Model/DomainInspectorResponseProduct.md new file mode 100644 index 00000000..d4ef0e6b --- /dev/null +++ b/docs/Model/DomainInspectorResponseProduct.md @@ -0,0 +1,10 @@ +# # DomainInspectorResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DomainInspectorResponseProductProduct**](DomainInspectorResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseProductProduct.md b/docs/Model/DomainInspectorResponseProductProduct.md new file mode 100644 index 00000000..4459fbe2 --- /dev/null +++ b/docs/Model/DomainInspectorResponseProductProduct.md @@ -0,0 +1,11 @@ +# # DomainInspectorResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseService.md b/docs/Model/DomainInspectorResponseService.md new file mode 100644 index 00000000..5e07d1df --- /dev/null +++ b/docs/Model/DomainInspectorResponseService.md @@ -0,0 +1,10 @@ +# # DomainInspectorResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EnabledProductResponse.md b/docs/Model/EnabledProductResponse.md deleted file mode 100644 index ab3d0930..00000000 --- a/docs/Model/EnabledProductResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# # EnabledProductResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product** | [**\Fastly\Model\EnabledProductResponseProduct**](EnabledProductResponseProduct.md) | | [optional] -**service** | [**\Fastly\Model\EnabledProductResponseService**](EnabledProductResponseService.md) | | [optional] -**_links** | [**\Fastly\Model\EnabledProductResponseLinks**](EnabledProductResponseLinks.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseBodyEnable.md b/docs/Model/FanoutResponseBodyEnable.md new file mode 100644 index 00000000..79acf824 --- /dev/null +++ b/docs/Model/FanoutResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # FanoutResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\FanoutResponseProductProduct**](FanoutResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\FanoutResponseLinksLinks**](FanoutResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseLinks.md b/docs/Model/FanoutResponseLinks.md new file mode 100644 index 00000000..bd76ccbc --- /dev/null +++ b/docs/Model/FanoutResponseLinks.md @@ -0,0 +1,10 @@ +# # FanoutResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\FanoutResponseLinksLinks**](FanoutResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EnabledProductResponseLinks.md b/docs/Model/FanoutResponseLinksLinks.md similarity index 91% rename from docs/Model/EnabledProductResponseLinks.md rename to docs/Model/FanoutResponseLinksLinks.md index 4161bf9c..7ad29022 100644 --- a/docs/Model/EnabledProductResponseLinks.md +++ b/docs/Model/FanoutResponseLinksLinks.md @@ -1,4 +1,4 @@ -# # EnabledProductResponseLinks +# # FanoutResponseLinksLinks ## Properties diff --git a/docs/Model/FanoutResponseProduct.md b/docs/Model/FanoutResponseProduct.md new file mode 100644 index 00000000..7720be0f --- /dev/null +++ b/docs/Model/FanoutResponseProduct.md @@ -0,0 +1,10 @@ +# # FanoutResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\FanoutResponseProductProduct**](FanoutResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EnabledProductResponseProduct.md b/docs/Model/FanoutResponseProductProduct.md similarity index 90% rename from docs/Model/EnabledProductResponseProduct.md rename to docs/Model/FanoutResponseProductProduct.md index 911494d7..72536e96 100644 --- a/docs/Model/EnabledProductResponseProduct.md +++ b/docs/Model/FanoutResponseProductProduct.md @@ -1,4 +1,4 @@ -# # EnabledProductResponseProduct +# # FanoutResponseProductProduct ## Properties diff --git a/docs/Model/FanoutResponseService.md b/docs/Model/FanoutResponseService.md new file mode 100644 index 00000000..e0282d66 --- /dev/null +++ b/docs/Model/FanoutResponseService.md @@ -0,0 +1,10 @@ +# # FanoutResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseBodyEnable.md b/docs/Model/ImageOptimizerResponseBodyEnable.md new file mode 100644 index 00000000..d85b8882 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # ImageOptimizerResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ImageOptimizerResponseProductProduct**](ImageOptimizerResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\ImageOptimizerResponseLinksLinks**](ImageOptimizerResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseLinks.md b/docs/Model/ImageOptimizerResponseLinks.md new file mode 100644 index 00000000..779ed063 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseLinks.md @@ -0,0 +1,10 @@ +# # ImageOptimizerResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\ImageOptimizerResponseLinksLinks**](ImageOptimizerResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseLinksLinks.md b/docs/Model/ImageOptimizerResponseLinksLinks.md new file mode 100644 index 00000000..3cf23f39 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # ImageOptimizerResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseProduct.md b/docs/Model/ImageOptimizerResponseProduct.md new file mode 100644 index 00000000..0e0d42c4 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseProduct.md @@ -0,0 +1,10 @@ +# # ImageOptimizerResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ImageOptimizerResponseProductProduct**](ImageOptimizerResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseProductProduct.md b/docs/Model/ImageOptimizerResponseProductProduct.md new file mode 100644 index 00000000..2e40f5db --- /dev/null +++ b/docs/Model/ImageOptimizerResponseProductProduct.md @@ -0,0 +1,11 @@ +# # ImageOptimizerResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseService.md b/docs/Model/ImageOptimizerResponseService.md new file mode 100644 index 00000000..d9bf3210 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseService.md @@ -0,0 +1,10 @@ +# # ImageOptimizerResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2003.md b/docs/Model/InlineResponse2003.md index d1544a79..20b23b2c 100644 --- a/docs/Model/InlineResponse2003.md +++ b/docs/Model/InlineResponse2003.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\StoreResponse[]**](StoreResponse.md) | | [optional] -**meta** | [**\Fastly\Model\InlineResponse2003Meta**](InlineResponse2003Meta.md) | | [optional] +**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2004.md b/docs/Model/InlineResponse2004.md index fb2807fa..13d927e5 100644 --- a/docs/Model/InlineResponse2004.md +++ b/docs/Model/InlineResponse2004.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | **string[]** | | [optional] -**meta** | [**\Fastly\Model\InlineResponse2004Meta**](InlineResponse2004Meta.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Batch.md b/docs/Model/KvStoreBatchResponse.md similarity index 67% rename from docs/Model/Batch.md rename to docs/Model/KvStoreBatchResponse.md index 19d70603..b0781ab8 100644 --- a/docs/Model/Batch.md +++ b/docs/Model/KvStoreBatchResponse.md @@ -1,4 +1,4 @@ -# # Batch +# # KvStoreBatchResponse ## Properties @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **string** | A descriptor for the response of the entire batch | [optional] **type** | **string** | If an error is present in any of the requests, this field will describe that error | [optional] -**errors** | [**\Fastly\Model\BatchErrors[]**](BatchErrors.md) | Per-key errors which failed to parse, validate, or otherwise transmit | [optional] +**errors** | [**\Fastly\Model\KvStoreBatchResponseErrors[]**](KvStoreBatchResponseErrors.md) | Errors which occurred while handling the items in the request | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KvStoreBatchResponseErrors.md b/docs/Model/KvStoreBatchResponseErrors.md new file mode 100644 index 00000000..bd4c9f40 --- /dev/null +++ b/docs/Model/KvStoreBatchResponseErrors.md @@ -0,0 +1,13 @@ +# # KvStoreBatchResponseErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | The key that the error corresponds to. This field will be empty if the object or one of its fields was not parseable. | [optional] +**index** | **int** | The line number of the batch request body on which the error occurred (starting from 0 for the first line). | [optional] +**code** | **string** | The HTTP response code for the item, or a 400 if the item's operation was not completed. | [optional] +**reason** | **string** | A descriptor of this particular item's error. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StoreResponse.md b/docs/Model/KvStoreDetails.md similarity index 72% rename from docs/Model/StoreResponse.md rename to docs/Model/KvStoreDetails.md index d1471e27..28fbd519 100644 --- a/docs/Model/StoreResponse.md +++ b/docs/Model/KvStoreDetails.md @@ -1,11 +1,11 @@ -# # StoreResponse +# # KvStoreDetails ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | ID of the store. | [optional] -**name** | **string** | A human-readable name for the store. | [optional] +**name** | **string** | Name of the store. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KvStoreRequestCreate.md b/docs/Model/KvStoreRequestCreate.md new file mode 100644 index 00000000..92e46785 --- /dev/null +++ b/docs/Model/KvStoreRequestCreate.md @@ -0,0 +1,10 @@ +# # KvStoreRequestCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | A human-readable name for the store. Refer to https://www.fastly.com/documentation/guides/concepts/edge-state/data-stores/#limitations-and-constraints for constraints on the KV store name. | + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KvStoreUpsertBatch.md b/docs/Model/KvStoreUpsertBatch.md new file mode 100644 index 00000000..7febddfd --- /dev/null +++ b/docs/Model/KvStoreUpsertBatch.md @@ -0,0 +1,14 @@ +# # KvStoreUpsertBatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **string** | The key of the item to be added, updated, retrieved, or deleted. | +**value** | **string** | Value for the item (in Base64 encoding). | +**time_to_live_sec** | **int** | Indicates that the item should be deleted after the specified number of seconds have elapsed. Deletion is not immediate but will occur within 24 hours of the requested expiration. | [optional] +**metadata** | **string** | An arbitrary data field which can contain up to 2000 bytes of data. | [optional] +**background_fetch** | **bool** | If set to true, the new value for the item will not be immediately visible to other users of the KV store; they will receive the existing (stale) value while the platform updates cached copies. Setting this to true ensures that other users of the KV store will receive responses to 'get' operations for this item quickly, although they will be slightly out of date. | [optional] [defaults to false] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafConfigurationSet.md b/docs/Model/LegacyWafConfigurationSet.md deleted file mode 100644 index 503b7d8a..00000000 --- a/docs/Model/LegacyWafConfigurationSet.md +++ /dev/null @@ -1,11 +0,0 @@ -# # LegacyWafConfigurationSet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | **bool** | The active configuration set is the default configuration set when creating a new WAF. When Fastly adds configuration sets, the new versions become the default (active). | [optional] -**name** | **string** | The name of the configuration set. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafFirewall.md b/docs/Model/LegacyWafFirewall.md deleted file mode 100644 index 27f38f99..00000000 --- a/docs/Model/LegacyWafFirewall.md +++ /dev/null @@ -1,18 +0,0 @@ -# # LegacyWafFirewall - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**last_push** | **string** | Date and time that VCL was last pushed to cache nodes. | [optional] -**prefetch_condition** | **string** | Name of the corresponding condition object. | [optional] -**response** | **string** | Name of the corresponding response object. | [optional] -**version** | [**\Fastly\Model\ReadOnlyVersion**](ReadOnlyVersion.md) | | [optional] -**service_id** | [**\Fastly\Model\ReadOnlyServiceId**](ReadOnlyServiceId.md) | | [optional] -**disabled** | **bool** | The status of the firewall. | [optional] [defaults to false] -**rule_statuses_log_count** | **int** | The number of rule statuses set to log. | [optional] -**rule_statuses_block_count** | **int** | The number of rule statuses set to block. | [optional] -**rule_statuses_disabled_count** | **int** | The number of rule statuses set to disabled. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafOwasp.md b/docs/Model/LegacyWafOwasp.md deleted file mode 100644 index f75f4e81..00000000 --- a/docs/Model/LegacyWafOwasp.md +++ /dev/null @@ -1,38 +0,0 @@ -# # LegacyWafOwasp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowed_http_versions** | **string** | Allowed HTTP versions. | [optional] [defaults to 'HTTP/1.0 HTTP/1.1 HTTP/2'] -**allowed_methods** | **string** | A space-separated list of HTTP method names. | [optional] [defaults to 'GET HEAD POST OPTIONS PUT PATCH DELETE'] -**allowed_request_content_type** | **string** | Allowed request content types. | [optional] [defaults to 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json|text/plain'] -**arg_length** | **int** | The maximum allowed length of an argument. | [optional] [defaults to 400] -**arg_name_length** | **int** | The maximum allowed argument name length. | [optional] [defaults to 100] -**combined_file_sizes** | **int** | The maximum allowed size of all files (in bytes). | [optional] [defaults to 10000000] -**created_at** | **string** | Date and time that the settings object was created. | [optional] -**critical_anomaly_score** | **int** | Score value to add for critical anomalies. | [optional] [defaults to 6] -**crs_validate_utf8_encoding** | **bool** | CRS validate UTF8 encoding. | [optional] -**error_anomaly_score** | **int** | Score value to add for error anomalies. | [optional] [defaults to 5] -**high_risk_country_codes** | **string** | A space-separated list of country codes in ISO 3166-1 (two-letter) format. | [optional] -**http_violation_score_threshold** | **int** | HTTP violation threshold. | [optional] -**inbound_anomaly_score_threshold** | **int** | Inbound anomaly threshold. | [optional] -**lfi_score_threshold** | **int** | Local file inclusion attack threshold. | [optional] -**max_file_size** | **int** | The maximum allowed file size (in bytes). | [optional] [defaults to 10000000] -**max_num_args** | **int** | The maximum number of arguments allowed. | [optional] [defaults to 255] -**notice_anomaly_score** | **int** | Score value to add for notice anomalies. | [optional] [defaults to 4] -**paranoia_level** | **int** | The configured paranoia level. | [optional] [defaults to 1] -**php_injection_score_threshold** | **int** | PHP injection threshold. | [optional] -**rce_score_threshold** | **int** | Remote code execution threshold. | [optional] -**restricted_extensions** | **string** | A space-separated list of disallowed file extensions. | [optional] [defaults to '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx'] -**restricted_headers** | **string** | A space-separated list of disallowed header names. | [optional] [defaults to '/proxy/ /lock-token/ /content-range/ /translate/ /if/'] -**rfi_score_threshold** | **int** | Remote file inclusion attack threshold. | [optional] -**session_fixation_score_threshold** | **int** | Session fixation attack threshold. | [optional] -**sql_injection_score_threshold** | **int** | SQL injection attack threshold. | [optional] -**total_arg_length** | **int** | The maximum size of argument names and values. | [optional] [defaults to 6400] -**updated_at** | **string** | Date and time that the settings object was last updated. | [optional] -**warning_anomaly_score** | **int** | Score value to add for warning anomalies. | [optional] -**xss_score_threshold** | **int** | XSS attack threshold. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafRule.md b/docs/Model/LegacyWafRule.md deleted file mode 100644 index ada45870..00000000 --- a/docs/Model/LegacyWafRule.md +++ /dev/null @@ -1,14 +0,0 @@ -# # LegacyWafRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **string** | Message metadata for the rule. | [optional] -**rule_id** | **string** | Corresponding ModSecurity rule ID. | [optional] -**severity** | **int** | Severity metadata for the rule. | [optional] -**source** | **string** | The ModSecurity rule logic. | [optional] -**vcl** | **string** | The VCL representation of the rule logic. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafRuleStatus.md b/docs/Model/LegacyWafRuleStatus.md deleted file mode 100644 index 8fa4aade..00000000 --- a/docs/Model/LegacyWafRuleStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# # LegacyWafRuleStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **string** | Describes the behavior for the particular rule within this firewall. Permitted values: `log`, `block`, and `disabled`. | [optional] -**modsec_rule_id** | **string** | The ModSecurity rule ID. | [optional] -**unique_rule_id** | **string** | The Rule ID. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafUpdateStatus.md b/docs/Model/LegacyWafUpdateStatus.md deleted file mode 100644 index 4f4ee8ec..00000000 --- a/docs/Model/LegacyWafUpdateStatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# # LegacyWafUpdateStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**completed_at** | **string** | Date and time that job was completed. | [optional] -**created_at** | **string** | Date and time that job was created. | [optional] -**data** | **string** | This field can contain data passed to the background worker as well as output from the background job. | [optional] -**message** | **string** | Message with information about the status of the update. | [optional] -**status** | **string** | Current status of the update. | [optional] -**updated_at** | **string** | Date and time that job was last updated. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseBodyEnable.md b/docs/Model/LogExplorerInsightsResponseBodyEnable.md new file mode 100644 index 00000000..c4b2f400 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # LogExplorerInsightsResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\LogExplorerInsightsResponseProductProduct**](LogExplorerInsightsResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\LogExplorerInsightsResponseLinksLinks**](LogExplorerInsightsResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseLinks.md b/docs/Model/LogExplorerInsightsResponseLinks.md new file mode 100644 index 00000000..9c8018ae --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseLinks.md @@ -0,0 +1,10 @@ +# # LogExplorerInsightsResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\LogExplorerInsightsResponseLinksLinks**](LogExplorerInsightsResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseLinksLinks.md b/docs/Model/LogExplorerInsightsResponseLinksLinks.md new file mode 100644 index 00000000..990a1118 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # LogExplorerInsightsResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseProduct.md b/docs/Model/LogExplorerInsightsResponseProduct.md new file mode 100644 index 00000000..d9b80647 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseProduct.md @@ -0,0 +1,10 @@ +# # LogExplorerInsightsResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\LogExplorerInsightsResponseProductProduct**](LogExplorerInsightsResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseProductProduct.md b/docs/Model/LogExplorerInsightsResponseProductProduct.md new file mode 100644 index 00000000..32454776 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseProductProduct.md @@ -0,0 +1,11 @@ +# # LogExplorerInsightsResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseService.md b/docs/Model/LogExplorerInsightsResponseService.md new file mode 100644 index 00000000..42f0ae16 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseService.md @@ -0,0 +1,10 @@ +# # LogExplorerInsightsResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafTag.md b/docs/Model/NgwafRequestEnable.md similarity index 70% rename from docs/Model/LegacyWafTag.md rename to docs/Model/NgwafRequestEnable.md index 3b750a6d..bb541458 100644 --- a/docs/Model/LegacyWafTag.md +++ b/docs/Model/NgwafRequestEnable.md @@ -1,10 +1,10 @@ -# # LegacyWafTag +# # NgwafRequestEnable ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of the tag. | [optional] +**workspace_id** | **string** | The workspace to link. | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NgwafRequestUpdateConfiguration.md b/docs/Model/NgwafRequestUpdateConfiguration.md new file mode 100644 index 00000000..b053d23d --- /dev/null +++ b/docs/Model/NgwafRequestUpdateConfiguration.md @@ -0,0 +1,11 @@ +# # NgwafRequestUpdateConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workspace_id** | **string** | The workspace to link. | [optional] +**traffic_ramp** | **string** | The percentage of traffic to inspect. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LegacyWafRuleset.md b/docs/Model/NgwafResponseConfiguration.md similarity index 54% rename from docs/Model/LegacyWafRuleset.md rename to docs/Model/NgwafResponseConfiguration.md index d0d05213..7d7aa7be 100644 --- a/docs/Model/LegacyWafRuleset.md +++ b/docs/Model/NgwafResponseConfiguration.md @@ -1,11 +1,10 @@ -# # LegacyWafRuleset +# # NgwafResponseConfiguration ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_push** | **string** | Date and time WAF ruleset VCL was last deployed. | [optional] -**vcl** | **string** | The WAF ruleset VCL currently deployed. | [optional] +**configuration** | [**\Fastly\Model\NgwafResponseConfigurationConfiguration**](NgwafResponseConfigurationConfiguration.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConfiguredProductResponseConfiguration.md b/docs/Model/NgwafResponseConfigurationConfiguration.md similarity index 66% rename from docs/Model/ConfiguredProductResponseConfiguration.md rename to docs/Model/NgwafResponseConfigurationConfiguration.md index 7ff9e028..4dc0c4c6 100644 --- a/docs/Model/ConfiguredProductResponseConfiguration.md +++ b/docs/Model/NgwafResponseConfigurationConfiguration.md @@ -1,11 +1,11 @@ -# # ConfiguredProductResponseConfiguration +# # NgwafResponseConfigurationConfiguration ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **workspace_id** | **string** | Workspace ID | [optional] -**traffic_ramp** | **string** | Traffic ramp | [optional] +**traffic_ramp** | **string** | The percentage of traffic to inspect. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NgwafResponseConfigure.md b/docs/Model/NgwafResponseConfigure.md new file mode 100644 index 00000000..9b360b01 --- /dev/null +++ b/docs/Model/NgwafResponseConfigure.md @@ -0,0 +1,13 @@ +# # NgwafResponseConfigure + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\NgwafResponseProductProduct**](NgwafResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**configuration** | [**\Fastly\Model\NgwafResponseConfigurationConfiguration**](NgwafResponseConfigurationConfiguration.md) | | [optional] +**_links** | [**\Fastly\Model\NgwafResponseLinksLinks**](NgwafResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NgwafResponseEnable.md b/docs/Model/NgwafResponseEnable.md new file mode 100644 index 00000000..6a058b72 --- /dev/null +++ b/docs/Model/NgwafResponseEnable.md @@ -0,0 +1,12 @@ +# # NgwafResponseEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\NgwafResponseProductProduct**](NgwafResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\NgwafResponseLinksLinks**](NgwafResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReadOnlyVersion.md b/docs/Model/NgwafResponseLinks.md similarity index 61% rename from docs/Model/ReadOnlyVersion.md rename to docs/Model/NgwafResponseLinks.md index 51e7173d..b403c442 100644 --- a/docs/Model/ReadOnlyVersion.md +++ b/docs/Model/NgwafResponseLinks.md @@ -1,9 +1,10 @@ -# # ReadOnlyVersion +# # NgwafResponseLinks ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\NgwafResponseLinksLinks**](NgwafResponseLinksLinks.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConfiguredProductResponseLinks.md b/docs/Model/NgwafResponseLinksLinks.md similarity index 90% rename from docs/Model/ConfiguredProductResponseLinks.md rename to docs/Model/NgwafResponseLinksLinks.md index 419669ca..902d4296 100644 --- a/docs/Model/ConfiguredProductResponseLinks.md +++ b/docs/Model/NgwafResponseLinksLinks.md @@ -1,4 +1,4 @@ -# # ConfiguredProductResponseLinks +# # NgwafResponseLinksLinks ## Properties diff --git a/docs/Model/NgwafResponseProduct.md b/docs/Model/NgwafResponseProduct.md new file mode 100644 index 00000000..845038a3 --- /dev/null +++ b/docs/Model/NgwafResponseProduct.md @@ -0,0 +1,10 @@ +# # NgwafResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\NgwafResponseProductProduct**](NgwafResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConfiguredProductResponseProduct.md b/docs/Model/NgwafResponseProductProduct.md similarity index 89% rename from docs/Model/ConfiguredProductResponseProduct.md rename to docs/Model/NgwafResponseProductProduct.md index a128bf8f..2343db7a 100644 --- a/docs/Model/ConfiguredProductResponseProduct.md +++ b/docs/Model/NgwafResponseProductProduct.md @@ -1,4 +1,4 @@ -# # ConfiguredProductResponseProduct +# # NgwafResponseProductProduct ## Properties diff --git a/docs/Model/NgwafResponseService.md b/docs/Model/NgwafResponseService.md new file mode 100644 index 00000000..e4357169 --- /dev/null +++ b/docs/Model/NgwafResponseService.md @@ -0,0 +1,10 @@ +# # NgwafResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponseBodyEnable.md b/docs/Model/ObjectStorageResponseBodyEnable.md new file mode 100644 index 00000000..ebc9fa73 --- /dev/null +++ b/docs/Model/ObjectStorageResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # ObjectStorageResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ObjectStorageResponseProductProduct**](ObjectStorageResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\AiAcceleratorResponseCustomerCustomer**](AiAcceleratorResponseCustomerCustomer.md) | | [optional] +**_links** | [**\Fastly\Model\ObjectStorageResponseLinksLinks**](ObjectStorageResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponseCustomer.md b/docs/Model/ObjectStorageResponseCustomer.md new file mode 100644 index 00000000..ceae50c7 --- /dev/null +++ b/docs/Model/ObjectStorageResponseCustomer.md @@ -0,0 +1,10 @@ +# # ObjectStorageResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\AiAcceleratorResponseCustomerCustomer**](AiAcceleratorResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponseLinks.md b/docs/Model/ObjectStorageResponseLinks.md new file mode 100644 index 00000000..20808f94 --- /dev/null +++ b/docs/Model/ObjectStorageResponseLinks.md @@ -0,0 +1,10 @@ +# # ObjectStorageResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\ObjectStorageResponseLinksLinks**](ObjectStorageResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponseLinksLinks.md b/docs/Model/ObjectStorageResponseLinksLinks.md new file mode 100644 index 00000000..ad8f99b0 --- /dev/null +++ b/docs/Model/ObjectStorageResponseLinksLinks.md @@ -0,0 +1,10 @@ +# # ObjectStorageResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponseProduct.md b/docs/Model/ObjectStorageResponseProduct.md new file mode 100644 index 00000000..3e8da87e --- /dev/null +++ b/docs/Model/ObjectStorageResponseProduct.md @@ -0,0 +1,10 @@ +# # ObjectStorageResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ObjectStorageResponseProductProduct**](ObjectStorageResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ObjectStorageResponseProductProduct.md b/docs/Model/ObjectStorageResponseProductProduct.md new file mode 100644 index 00000000..49cc288a --- /dev/null +++ b/docs/Model/ObjectStorageResponseProductProduct.md @@ -0,0 +1,11 @@ +# # ObjectStorageResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorMeasurements.md b/docs/Model/OriginInspectorMeasurements.md index 3cff70cf..70668891 100644 --- a/docs/Model/OriginInspectorMeasurements.md +++ b/docs/Model/OriginInspectorMeasurements.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) from origin. | [optional] **status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) from origin. | [optional] **status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) from origin. | [optional] +**status_530** | **int** | Number of responses received from origin with status code 530. | [optional] **latency_0_to_1ms** | **int** | Number of responses from origin with latency between 0 and 1 millisecond. | [optional] **latency_1_to_5ms** | **int** | Number of responses from origin with latency between 1 and 5 milliseconds. | [optional] **latency_5_to_10ms** | **int** | Number of responses from origin with latency between 5 and 10 milliseconds. | [optional] @@ -68,6 +69,7 @@ Name | Type | Description | Notes **waf_status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) received for origin requests made by the Fastly WAF. | [optional] **waf_status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) received for origin requests made by the Fastly WAF. | [optional] **waf_status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by the Fastly WAF. | [optional] +**waf_status_530** | **int** | Number of responses received with status code 530 received for origin requests made by the Fastly WAF. | [optional] **waf_latency_0_to_1ms** | **int** | Number of responses with latency between 0 and 1 millisecond received for origin requests made by the Fastly WAF. | [optional] **waf_latency_1_to_5ms** | **int** | Number of responses with latency between 1 and 5 milliseconds received for origin requests made by the Fastly WAF. | [optional] **waf_latency_5_to_10ms** | **int** | Number of responses with latency between 5 and 10 milliseconds received for origin requests made by the Fastly WAF. | [optional] @@ -106,6 +108,7 @@ Name | Type | Description | Notes **compute_status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) for origin received by the Compute platform. | [optional] **compute_status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) for origin received by the Compute platform. | [optional] **compute_status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) for origin received by the Compute platform. | [optional] +**compute_status_530** | **int** | Number of responses received with status code 530 for origin received by the Compute platform. | [optional] **compute_latency_0_to_1ms** | **int** | Number of responses with latency between 0 and 1 millisecond for origin received by the Compute platform. | [optional] **compute_latency_1_to_5ms** | **int** | Number of responses with latency between 1 and 5 milliseconds for origin received by the Compute platform. | [optional] **compute_latency_5_to_10ms** | **int** | Number of responses with latency between 5 and 10 milliseconds for origin received by the Compute platform. | [optional] @@ -144,6 +147,7 @@ Name | Type | Description | Notes **all_status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) received for origin requests made by all sources. | [optional] **all_status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) received for origin requests made by all sources. | [optional] **all_status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by all sources. | [optional] +**all_status_530** | **int** | Number of responses received with status code 530 received for origin requests made by all sources. | [optional] **all_latency_0_to_1ms** | **int** | Number of responses with latency between 0 and 1 millisecond received for origin requests made by all sources. | [optional] **all_latency_1_to_5ms** | **int** | Number of responses with latency between 1 and 5 milliseconds received for origin requests made by all sources. | [optional] **all_latency_5_to_10ms** | **int** | Number of responses with latency between 5 and 10 milliseconds received for origin requests made by all sources. | [optional] diff --git a/docs/Model/OriginInspectorResponseBodyEnable.md b/docs/Model/OriginInspectorResponseBodyEnable.md new file mode 100644 index 00000000..4ceb8a33 --- /dev/null +++ b/docs/Model/OriginInspectorResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # OriginInspectorResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\OriginInspectorResponseProductProduct**](OriginInspectorResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\OriginInspectorResponseLinksLinks**](OriginInspectorResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseLinks.md b/docs/Model/OriginInspectorResponseLinks.md new file mode 100644 index 00000000..21f7ab65 --- /dev/null +++ b/docs/Model/OriginInspectorResponseLinks.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\OriginInspectorResponseLinksLinks**](OriginInspectorResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseLinksLinks.md b/docs/Model/OriginInspectorResponseLinksLinks.md new file mode 100644 index 00000000..b3a6516d --- /dev/null +++ b/docs/Model/OriginInspectorResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # OriginInspectorResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseProduct.md b/docs/Model/OriginInspectorResponseProduct.md new file mode 100644 index 00000000..c800df8e --- /dev/null +++ b/docs/Model/OriginInspectorResponseProduct.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\OriginInspectorResponseProductProduct**](OriginInspectorResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseProductProduct.md b/docs/Model/OriginInspectorResponseProductProduct.md new file mode 100644 index 00000000..61ae4e71 --- /dev/null +++ b/docs/Model/OriginInspectorResponseProductProduct.md @@ -0,0 +1,11 @@ +# # OriginInspectorResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseService.md b/docs/Model/OriginInspectorResponseService.md new file mode 100644 index 00000000..cab435f3 --- /dev/null +++ b/docs/Model/OriginInspectorResponseService.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorValues.md b/docs/Model/OriginInspectorValues.md index 42ba459a..254254f9 100644 --- a/docs/Model/OriginInspectorValues.md +++ b/docs/Model/OriginInspectorValues.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) from origin. | [optional] **status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) from origin. | [optional] **status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) from origin. | [optional] +**status_530** | **int** | Number of responses received from origin with status code 530. | [optional] **latency_0_to_1ms** | **int** | Number of responses from origin with latency between 0 and 1 millisecond. | [optional] **latency_1_to_5ms** | **int** | Number of responses from origin with latency between 1 and 5 milliseconds. | [optional] **latency_5_to_10ms** | **int** | Number of responses from origin with latency between 5 and 10 milliseconds. | [optional] @@ -68,6 +69,7 @@ Name | Type | Description | Notes **waf_status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) received for origin requests made by the Fastly WAF. | [optional] **waf_status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) received for origin requests made by the Fastly WAF. | [optional] **waf_status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by the Fastly WAF. | [optional] +**waf_status_530** | **int** | Number of responses received with status code 530 received for origin requests made by the Fastly WAF. | [optional] **waf_latency_0_to_1ms** | **int** | Number of responses with latency between 0 and 1 millisecond received for origin requests made by the Fastly WAF. | [optional] **waf_latency_1_to_5ms** | **int** | Number of responses with latency between 1 and 5 milliseconds received for origin requests made by the Fastly WAF. | [optional] **waf_latency_5_to_10ms** | **int** | Number of responses with latency between 5 and 10 milliseconds received for origin requests made by the Fastly WAF. | [optional] @@ -106,6 +108,7 @@ Name | Type | Description | Notes **compute_status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) for origin received by the Compute platform. | [optional] **compute_status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) for origin received by the Compute platform. | [optional] **compute_status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) for origin received by the Compute platform. | [optional] +**compute_status_530** | **int** | Number of responses received with status code 530 for origin received by the Compute platform. | [optional] **compute_latency_0_to_1ms** | **int** | Number of responses with latency between 0 and 1 millisecond for origin received by the Compute platform. | [optional] **compute_latency_1_to_5ms** | **int** | Number of responses with latency between 1 and 5 milliseconds for origin received by the Compute platform. | [optional] **compute_latency_5_to_10ms** | **int** | Number of responses with latency between 5 and 10 milliseconds for origin received by the Compute platform. | [optional] @@ -144,6 +147,7 @@ Name | Type | Description | Notes **all_status_503** | **int** | Number of responses received with status code 503 (Service Unavailable) received for origin requests made by all sources. | [optional] **all_status_504** | **int** | Number of responses received with status code 504 (Gateway Timeout) received for origin requests made by all sources. | [optional] **all_status_505** | **int** | Number of responses received with status code 505 (HTTP Version Not Supported) received for origin requests made by all sources. | [optional] +**all_status_530** | **int** | Number of responses received with status code 530 received for origin requests made by all sources. | [optional] **all_latency_0_to_1ms** | **int** | Number of responses with latency between 0 and 1 millisecond received for origin requests made by all sources. | [optional] **all_latency_1_to_5ms** | **int** | Number of responses with latency between 1 and 5 milliseconds received for origin requests made by all sources. | [optional] **all_latency_5_to_10ms** | **int** | Number of responses with latency between 5 and 10 milliseconds received for origin requests made by all sources. | [optional] diff --git a/docs/Model/RealtimeEntryAggregated.md b/docs/Model/RealtimeEntryAggregated.md index 93d1c698..6fa5dd7f 100644 --- a/docs/Model/RealtimeEntryAggregated.md +++ b/docs/Model/RealtimeEntryAggregated.md @@ -89,6 +89,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses sent with status code 503 (Service Unavailable). | [optional] **status_504** | **int** | Number of responses sent with status code 504 (Gateway Timeout). | [optional] **status_505** | **int** | Number of responses sent with status code 505 (HTTP Version Not Supported). | [optional] +**status_530** | **int** | Number of responses sent with status code 530. | [optional] **uncacheable** | **int** | Number of requests that were designated uncachable. | [optional] **pass_time** | **float** | Total amount of time spent processing cache passes (in seconds). | [optional] **tls** | **int** | Number of requests that were received over TLS. | [optional] @@ -247,9 +248,23 @@ Name | Type | Description | Notes **all_status_5xx** | **int** | Number of \"Server Error\" codes delivered for all sources. | [optional] **origin_offload** | **float** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] **request_denied_get_head_body** | **int** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] -**service_ddos_requests_detected** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] -**service_ddos_requests_mitigated** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] -**service_ddos_requests_allowed** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [optional] +**ddos_protection_requests_detect_count** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] +**ddos_protection_requests_mitigate_count** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] +**ddos_protection_requests_allow_count** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [optional] +**object_storage_class_a_operations_count** | **int** | A count of the number of Class A Object Storage operations. | [optional] +**object_storage_class_b_operations_count** | **int** | A count of the number of Class B Object Storage operations. | [optional] +**aia_requests** | **int** | Number of requests received by AI Accelerator. | [optional] +**aia_status_1xx** | **int** | Number of \"Informational\" category status codes received from AI provider. | [optional] +**aia_status_2xx** | **int** | Number of \"Success\" status codes received from AI provider. | [optional] +**aia_status_3xx** | **int** | Number of \"Redirection\" received from AI provider. | [optional] +**aia_status_4xx** | **int** | Number of \"Client Error\" received from AI provider. | [optional] +**aia_status_5xx** | **int** | Number of \"Server Error\" received from AI provider. | [optional] +**aia_response_usage_tokens** | **int** | The usage tokens associated with the response returned from the AI Accelerator cache. | [optional] +**aia_origin_usage_tokens** | **int** | The number of usage tokens reported by the request to the origin from AI Accelerator. | [optional] +**aia_estimated_time_saved_ms** | **int** | The estimated amount of time saved by responses served from the AI Accelerator semantic cache. | [optional] +**request_collapse_usable_count** | **int** | Number of requests that were collapsed and satisfied by a usable cache object. | [optional] +**request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] +**compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RealtimeMeasurements.md b/docs/Model/RealtimeMeasurements.md index 7b6a8ee9..aac0e4bc 100644 --- a/docs/Model/RealtimeMeasurements.md +++ b/docs/Model/RealtimeMeasurements.md @@ -89,6 +89,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses sent with status code 503 (Service Unavailable). | [optional] **status_504** | **int** | Number of responses sent with status code 504 (Gateway Timeout). | [optional] **status_505** | **int** | Number of responses sent with status code 505 (HTTP Version Not Supported). | [optional] +**status_530** | **int** | Number of responses sent with status code 530. | [optional] **uncacheable** | **int** | Number of requests that were designated uncachable. | [optional] **pass_time** | **float** | Total amount of time spent processing cache passes (in seconds). | [optional] **tls** | **int** | Number of requests that were received over TLS. | [optional] @@ -247,9 +248,23 @@ Name | Type | Description | Notes **all_status_5xx** | **int** | Number of \"Server Error\" codes delivered for all sources. | [optional] **origin_offload** | **float** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] **request_denied_get_head_body** | **int** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] -**service_ddos_requests_detected** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] -**service_ddos_requests_mitigated** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] -**service_ddos_requests_allowed** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [optional] +**ddos_protection_requests_detect_count** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] +**ddos_protection_requests_mitigate_count** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] +**ddos_protection_requests_allow_count** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [optional] +**object_storage_class_a_operations_count** | **int** | A count of the number of Class A Object Storage operations. | [optional] +**object_storage_class_b_operations_count** | **int** | A count of the number of Class B Object Storage operations. | [optional] +**aia_requests** | **int** | Number of requests received by AI Accelerator. | [optional] +**aia_status_1xx** | **int** | Number of \"Informational\" category status codes received from AI provider. | [optional] +**aia_status_2xx** | **int** | Number of \"Success\" status codes received from AI provider. | [optional] +**aia_status_3xx** | **int** | Number of \"Redirection\" received from AI provider. | [optional] +**aia_status_4xx** | **int** | Number of \"Client Error\" received from AI provider. | [optional] +**aia_status_5xx** | **int** | Number of \"Server Error\" received from AI provider. | [optional] +**aia_response_usage_tokens** | **int** | The usage tokens associated with the response returned from the AI Accelerator cache. | [optional] +**aia_origin_usage_tokens** | **int** | The number of usage tokens reported by the request to the origin from AI Accelerator. | [optional] +**aia_estimated_time_saved_ms** | **int** | The estimated amount of time saved by responses served from the AI Accelerator semantic cache. | [optional] +**request_collapse_usable_count** | **int** | Number of requests that were collapsed and satisfied by a usable cache object. | [optional] +**request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] +**compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Results.md b/docs/Model/Results.md index f79674df..b5be473a 100644 --- a/docs/Model/Results.md +++ b/docs/Model/Results.md @@ -114,6 +114,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses sent with status code 503 (Service Unavailable). | [optional] **status_504** | **int** | Number of responses sent with status code 504 (Gateway Timeout). | [optional] **status_505** | **int** | Number of responses sent with status code 505 (HTTP Version Not Supported). | [optional] +**status_530** | **int** | Number of responses sent with status code 530. | [optional] **status_1xx** | **int** | Number of \"Informational\" category status codes delivered. | [optional] **status_2xx** | **int** | Number of \"Success\" status codes delivered. | [optional] **status_3xx** | **int** | Number of \"Redirection\" codes delivered. | [optional] @@ -247,9 +248,23 @@ Name | Type | Description | Notes **all_status_5xx** | **int** | Number of \"Server Error\" codes delivered for all sources. | [optional] **origin_offload** | **float** | Origin Offload measures the ratio of bytes served to end users that were cached by Fastly, over the bytes served to end users, between 0 and 1. ((`edge_resp_body_bytes` + `edge_resp_header_bytes`) - (`origin_fetch_resp_body_bytes` + `origin_fetch_resp_header_bytes`)) / (`edge_resp_body_bytes` + `edge_resp_header_bytes`). | [optional] **request_denied_get_head_body** | **int** | Number of requests where Fastly responded with 400 due to the request being a GET or HEAD request containing a body. | [optional] -**service_ddos_requests_detected** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] -**service_ddos_requests_mitigated** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] -**service_ddos_requests_allowed** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [optional] +**ddos_protection_requests_detect_count** | **int** | Number of requests classified as a DDoS attack against a customer origin or service. | [optional] +**ddos_protection_requests_mitigate_count** | **int** | Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. | [optional] +**ddos_protection_requests_allow_count** | **int** | Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. | [optional] +**object_storage_class_a_operations_count** | **int** | A count of the number of Class A Object Storage operations. | [optional] +**object_storage_class_b_operations_count** | **int** | A count of the number of Class B Object Storage operations. | [optional] +**aia_requests** | **int** | Number of requests received by AI Accelerator. | [optional] +**aia_status_1xx** | **int** | Number of \"Informational\" category status codes received from AI provider. | [optional] +**aia_status_2xx** | **int** | Number of \"Success\" status codes received from AI provider. | [optional] +**aia_status_3xx** | **int** | Number of \"Redirection\" received from AI provider. | [optional] +**aia_status_4xx** | **int** | Number of \"Client Error\" received from AI provider. | [optional] +**aia_status_5xx** | **int** | Number of \"Server Error\" received from AI provider. | [optional] +**aia_response_usage_tokens** | **int** | The usage tokens associated with the response returned from the AI Accelerator cache. | [optional] +**aia_origin_usage_tokens** | **int** | The number of usage tokens reported by the request to the origin from AI Accelerator. | [optional] +**aia_estimated_time_saved_ms** | **int** | The estimated amount of time saved by responses served from the AI Accelerator semantic cache. | [optional] +**request_collapse_usable_count** | **int** | Number of requests that were collapsed and satisfied by a usable cache object. | [optional] +**request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] +**compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] **service_id** | **string** | | [optional] [readonly] **start_time** | **int** | Timestamp for the start of the time period being reported | [optional] diff --git a/docs/Model/SetConfiguration.md b/docs/Model/SetConfiguration.md deleted file mode 100644 index 7bd3fa1f..00000000 --- a/docs/Model/SetConfiguration.md +++ /dev/null @@ -1,12 +0,0 @@ -# # SetConfiguration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**workspace_id** | **string** | The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`. | [optional] -**traffic_ramp** | **string** | The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`. | [optional] -**mode** | **string** | The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SetWorkspaceId.md b/docs/Model/SetWorkspaceId.md deleted file mode 100644 index 593a53e5..00000000 --- a/docs/Model/SetWorkspaceId.md +++ /dev/null @@ -1,10 +0,0 @@ -# # SetWorkspaceId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**workspace_id** | **string** | The workspace to link with the Next-Gen WAF product. Note this body is only supported and required when `product_id` is `ngwaf` | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Values.md b/docs/Model/Values.md index 6cc18df3..43d393c4 100644 --- a/docs/Model/Values.md +++ b/docs/Model/Values.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **status_503** | **int** | Number of responses delivered with status code 503 (Service Unavailable). | [optional] **status_504** | **int** | Number of responses delivered with status code 504 (Gateway Timeout). | [optional] **status_505** | **int** | Number of responses delivered with status code 505 (HTTP Version Not Supported). | [optional] +**status_530** | **int** | Number of responses delivered with status code 530. | [optional] **requests** | **int** | Number of requests processed. | [optional] **resp_header_bytes** | **int** | Total header bytes delivered. | [optional] **resp_body_bytes** | **int** | Total body bytes delivered. | [optional] @@ -61,6 +62,7 @@ Name | Type | Description | Notes **origin_status_503** | **int** | Number of responses received from origin with status code 503 (Service Unavailable). | [optional] **origin_status_504** | **int** | Number of responses received from origin with status code 504 (Gateway Timeout). | [optional] **origin_status_505** | **int** | Number of responses received from origin with status code 505 (HTTP Version Not Supported). | [optional] +**origin_status_530** | **int** | Number of responses received from origin with status code 530. | [optional] **origin_status_1xx** | **int** | Number of \"Informational\" category status codes received from origin. | [optional] **origin_status_2xx** | **int** | Number of \"Success\" status codes received from origin. | [optional] **origin_status_3xx** | **int** | Number of \"Redirection\" codes received from origin. | [optional] diff --git a/docs/Model/WebsocketsResponseBodyEnable.md b/docs/Model/WebsocketsResponseBodyEnable.md new file mode 100644 index 00000000..e2d5eaf6 --- /dev/null +++ b/docs/Model/WebsocketsResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # WebsocketsResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\WebsocketsResponseProductProduct**](WebsocketsResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\WebsocketsResponseLinksLinks**](WebsocketsResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseLinks.md b/docs/Model/WebsocketsResponseLinks.md new file mode 100644 index 00000000..9140961d --- /dev/null +++ b/docs/Model/WebsocketsResponseLinks.md @@ -0,0 +1,10 @@ +# # WebsocketsResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\WebsocketsResponseLinksLinks**](WebsocketsResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseLinksLinks.md b/docs/Model/WebsocketsResponseLinksLinks.md new file mode 100644 index 00000000..0abf562d --- /dev/null +++ b/docs/Model/WebsocketsResponseLinksLinks.md @@ -0,0 +1,11 @@ +# # WebsocketsResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] +**service** | **string** | Location of the service resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseProduct.md b/docs/Model/WebsocketsResponseProduct.md new file mode 100644 index 00000000..785288d6 --- /dev/null +++ b/docs/Model/WebsocketsResponseProduct.md @@ -0,0 +1,10 @@ +# # WebsocketsResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\WebsocketsResponseProductProduct**](WebsocketsResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseProductProduct.md b/docs/Model/WebsocketsResponseProductProduct.md new file mode 100644 index 00000000..5397b816 --- /dev/null +++ b/docs/Model/WebsocketsResponseProductProduct.md @@ -0,0 +1,11 @@ +# # WebsocketsResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseService.md b/docs/Model/WebsocketsResponseService.md new file mode 100644 index 00000000..3ed158ac --- /dev/null +++ b/docs/Model/WebsocketsResponseService.md @@ -0,0 +1,10 @@ +# # WebsocketsResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/AclsInComputeApi.php b/lib/Api/AclsInComputeApi.php index 2392bbeb..d86f08ca 100644 --- a/lib/Api/AclsInComputeApi.php +++ b/lib/Api/AclsInComputeApi.php @@ -1069,7 +1069,7 @@ public function computeAclListAclEntriesRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\ComputeAclCreateAclsResponse[] + * @return \Fastly\Model\ComputeAclList */ public function computeAclListAcls($options) { @@ -1090,7 +1090,7 @@ public function computeAclListAcls($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\ComputeAclCreateAclsResponse[], HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\ComputeAclList, HTTP status code, HTTP response headers (array of strings) */ public function computeAclListAclsWithHttpInfo($options) { @@ -1145,20 +1145,20 @@ public function computeAclListAclsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\ComputeAclCreateAclsResponse[]' === '\SplFileObject') { + if ('\Fastly\Model\ComputeAclList' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ComputeAclCreateAclsResponse[]', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\ComputeAclList', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\ComputeAclCreateAclsResponse[]'; + $returnType = '\Fastly\Model\ComputeAclList'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1176,7 +1176,7 @@ public function computeAclListAclsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ComputeAclCreateAclsResponse[]', + '\Fastly\Model\ComputeAclList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1226,7 +1226,7 @@ function ($response) { */ public function computeAclListAclsAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\ComputeAclCreateAclsResponse[]'; + $returnType = '\Fastly\Model\ComputeAclList'; $request = $this->computeAclListAclsRequest($options); return $this->client diff --git a/lib/Api/BackendApi.php b/lib/Api/BackendApi.php index 3cf6d6bb..76cb8c6b 100644 --- a/lib/Api/BackendApi.php +++ b/lib/Api/BackendApi.php @@ -132,7 +132,7 @@ public function getConfig() * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -190,7 +190,7 @@ public function createBackend($options) * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -336,7 +336,7 @@ public function createBackendWithHttpInfo($options) * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -397,7 +397,7 @@ function ($response) { * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -484,7 +484,7 @@ function ($exception) { * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -1895,7 +1895,7 @@ public function listBackendsRequest($options) * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -1954,7 +1954,7 @@ public function updateBackend($options) * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -2101,7 +2101,7 @@ public function updateBackendWithHttpInfo($options) * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -2163,7 +2163,7 @@ function ($response) { * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) @@ -2251,7 +2251,7 @@ function ($exception) { * @param string $hostname The hostname of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv4 IPv4 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) * @param string $ipv6 IPv6 address of the backend. May be used as an alternative to `address` to set the backend location. (optional) - * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. (optional) + * @param int $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. (optional) * @param int $max_conn Maximum number of concurrent connections this backend will accept. (optional) * @param string $max_tls_version Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) * @param string $min_tls_version Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. (optional) diff --git a/lib/Api/BillingApi.php b/lib/Api/BillingApi.php index b798a5b7..3a6f10ef 100644 --- a/lib/Api/BillingApi.php +++ b/lib/Api/BillingApi.php @@ -125,6 +125,7 @@ public function getConfig() * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Fastly\Model\BillingResponse + * @deprecated */ public function getInvoice($options) { @@ -148,6 +149,7 @@ public function getInvoice($options) * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Fastly\Model\BillingResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function getInvoiceWithHttpInfo($options) { @@ -258,6 +260,7 @@ public function getInvoiceWithHttpInfo($options) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getInvoiceAsync($options) { @@ -284,6 +287,7 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getInvoiceAsyncWithHttpInfo($options) { @@ -336,6 +340,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function getInvoiceRequest($options) { @@ -467,6 +472,7 @@ public function getInvoiceRequest($options) * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Fastly\Model\BillingResponse + * @deprecated */ public function getInvoiceById($options) { @@ -490,6 +496,7 @@ public function getInvoiceById($options) * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Fastly\Model\BillingResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function getInvoiceByIdWithHttpInfo($options) { @@ -600,6 +607,7 @@ public function getInvoiceByIdWithHttpInfo($options) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getInvoiceByIdAsync($options) { @@ -626,6 +634,7 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getInvoiceByIdAsyncWithHttpInfo($options) { @@ -678,6 +687,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function getInvoiceByIdRequest($options) { @@ -810,6 +820,7 @@ public function getInvoiceByIdRequest($options) * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Fastly\Model\BillingEstimateResponse + * @deprecated */ public function getInvoiceMtd($options) { @@ -834,6 +845,7 @@ public function getInvoiceMtd($options) * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Fastly\Model\BillingEstimateResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function getInvoiceMtdWithHttpInfo($options) { @@ -945,6 +957,7 @@ public function getInvoiceMtdWithHttpInfo($options) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getInvoiceMtdAsync($options) { @@ -972,6 +985,7 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function getInvoiceMtdAsyncWithHttpInfo($options) { @@ -1025,6 +1039,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function getInvoiceMtdRequest($options) { diff --git a/lib/Api/BillingUsageMetricsApi.php b/lib/Api/BillingUsageMetricsApi.php index 9c79a09a..f57550f5 100644 --- a/lib/Api/BillingUsageMetricsApi.php +++ b/lib/Api/BillingUsageMetricsApi.php @@ -119,8 +119,8 @@ public function getConfig() * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) * @param string $start_month start_month (optional) * @param string $end_month end_month (optional) * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') @@ -146,8 +146,8 @@ public function getServiceLevelUsage($options) * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) * @param string $start_month (optional) * @param string $end_month (optional) * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') @@ -321,8 +321,8 @@ public function getServiceLevelUsageWithHttpInfo($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) * @param string $start_month (optional) * @param string $end_month (optional) * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') @@ -351,8 +351,8 @@ function ($response) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) * @param string $start_month (optional) * @param string $end_month (optional) * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') @@ -407,8 +407,8 @@ function ($exception) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This field is not required for CSV requests. (required) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This field is not required for CSV requests. (required) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) * @param string $start_month (optional) * @param string $end_month (optional) * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') @@ -427,18 +427,6 @@ public function getServiceLevelUsageRequest($options) $limit = array_key_exists('limit', $options) ? $options['limit'] : '5'; $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; - // verify the required parameter 'product_id' is set - if ($product_id === null || (is_array($product_id) && count($product_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $product_id when calling getServiceLevelUsage' - ); - } - // verify the required parameter 'usage_type_name' is set - if ($usage_type_name === null || (is_array($usage_type_name) && count($usage_type_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $usage_type_name when calling getServiceLevelUsage' - ); - } if ($start_month !== null && !preg_match("/^[0-9]{4}-[0-9]{2}$/", $start_month)) { throw new \InvalidArgumentException("invalid value for \"start_month\" when calling BillingUsageMetricsApi.getServiceLevelUsage, must conform to the pattern /^[0-9]{4}-[0-9]{2}$/."); } @@ -603,8 +591,8 @@ public function getServiceLevelUsageRequest($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $start_month start_month (optional) - * @param string $end_month end_month (optional) + * @param string $start_month start_month (required) + * @param string $end_month end_month (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -626,8 +614,8 @@ public function getUsageMetrics($options) * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $start_month (optional) - * @param string $end_month (optional) + * @param string $start_month (required) + * @param string $end_month (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -797,8 +785,8 @@ public function getUsageMetricsWithHttpInfo($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $start_month (optional) - * @param string $end_month (optional) + * @param string $start_month (required) + * @param string $end_month (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -823,8 +811,8 @@ function ($response) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $start_month (optional) - * @param string $end_month (optional) + * @param string $start_month (required) + * @param string $end_month (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -875,8 +863,8 @@ function ($exception) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $start_month (optional) - * @param string $end_month (optional) + * @param string $start_month (required) + * @param string $end_month (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -887,11 +875,23 @@ public function getUsageMetricsRequest($options) $start_month = array_key_exists('start_month', $options) ? $options['start_month'] : null; $end_month = array_key_exists('end_month', $options) ? $options['end_month'] : null; - if ($start_month !== null && !preg_match("/^[0-9]{4}-[0-9]{2}$/", $start_month)) { + // verify the required parameter 'start_month' is set + if ($start_month === null || (is_array($start_month) && count($start_month) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $start_month when calling getUsageMetrics' + ); + } + if (!preg_match("/^[0-9]{4}-[0-9]{2}$/", $start_month)) { throw new \InvalidArgumentException("invalid value for \"start_month\" when calling BillingUsageMetricsApi.getUsageMetrics, must conform to the pattern /^[0-9]{4}-[0-9]{2}$/."); } - if ($end_month !== null && !preg_match("/^[0-9]{4}-[0-9]{2}$/", $end_month)) { + // verify the required parameter 'end_month' is set + if ($end_month === null || (is_array($end_month) && count($end_month) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $end_month when calling getUsageMetrics' + ); + } + if (!preg_match("/^[0-9]{4}-[0-9]{2}$/", $end_month)) { throw new \InvalidArgumentException("invalid value for \"end_month\" when calling BillingUsageMetricsApi.getUsageMetrics, must conform to the pattern /^[0-9]{4}-[0-9]{2}$/."); } diff --git a/lib/Api/KvStoreApi.php b/lib/Api/KvStoreApi.php index e9ef725f..22664f2b 100644 --- a/lib/Api/KvStoreApi.php +++ b/lib/Api/KvStoreApi.php @@ -110,7 +110,7 @@ public function getConfig() } /** - * Operation createStore + * Operation kvStoreCreate * * Create a KV store. * @@ -120,20 +120,20 @@ public function getConfig() * URL: https://api.fastly.com * * @param string $location location (optional) - * @param \Fastly\Model\Store $store store (optional) + * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create kv_store_request_create (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\StoreResponse + * @return \Fastly\Model\KvStoreDetails */ - public function createStore($options) + public function kvStoreCreate($options) { - list($response) = $this->createStoreWithHttpInfo($options); + list($response) = $this->kvStoreCreateWithHttpInfo($options); return $response; } /** - * Operation createStoreWithHttpInfo + * Operation kvStoreCreateWithHttpInfo * * Create a KV store. * @@ -143,15 +143,15 @@ public function createStore($options) * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\Store $store (optional) + * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\StoreResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\KvStoreDetails, HTTP status code, HTTP response headers (array of strings) */ - public function createStoreWithHttpInfo($options) + public function kvStoreCreateWithHttpInfo($options) { - $request = $this->createStoreRequest($options); + $request = $this->kvStoreCreateRequest($options); try { $options = $this->createHttpClientOption(); @@ -202,20 +202,20 @@ public function createStoreWithHttpInfo($options) switch($statusCode) { case 201: - if ('\Fastly\Model\StoreResponse' === '\SplFileObject') { + if ('\Fastly\Model\KvStoreDetails' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\StoreResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\KvStoreDetails', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\StoreResponse'; + $returnType = '\Fastly\Model\KvStoreDetails'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -233,7 +233,7 @@ public function createStoreWithHttpInfo($options) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\StoreResponse', + '\Fastly\Model\KvStoreDetails', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -244,7 +244,7 @@ public function createStoreWithHttpInfo($options) } /** - * Operation createStoreAsync + * Operation kvStoreCreateAsync * * Create a KV store. * @@ -254,14 +254,14 @@ public function createStoreWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\Store $store (optional) + * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createStoreAsync($options) + public function kvStoreCreateAsync($options) { - return $this->createStoreAsyncWithHttpInfo($options) + return $this->kvStoreCreateAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -270,7 +270,7 @@ function ($response) { } /** - * Operation createStoreAsyncWithHttpInfo + * Operation kvStoreCreateAsyncWithHttpInfo * * Create a KV store. * @@ -280,15 +280,15 @@ function ($response) { * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\Store $store (optional) + * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createStoreAsyncWithHttpInfo($options) + public function kvStoreCreateAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\StoreResponse'; - $request = $this->createStoreRequest($options); + $returnType = '\Fastly\Model\KvStoreDetails'; + $request = $this->kvStoreCreateRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -324,7 +324,7 @@ function ($exception) { } /** - * Create request for operation 'createStore' + * Create request for operation 'kvStoreCreate' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -332,16 +332,16 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\Store $store (optional) + * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createStoreRequest($options) + public function kvStoreCreateRequest($options) { // unbox the parameters from the associative array $location = array_key_exists('location', $options) ? $options['location'] : null; - $store = array_key_exists('store', $options) ? $options['store'] : null; + $kv_store_request_create = array_key_exists('kv_store_request_create', $options) ? $options['kv_store_request_create'] : null; $resourcePath = '/resources/stores/kv'; @@ -378,11 +378,11 @@ public function createStoreRequest($options) } // for model (json/xml) - if (isset($store)) { + if (isset($kv_store_request_create)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($store)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($kv_store_request_create)); } else { - $httpBody = $store; + $httpBody = $kv_store_request_create; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -441,7 +441,7 @@ public function createStoreRequest($options) } /** - * Operation deleteStore + * Operation kvStoreDelete * * Delete a KV store. * @@ -456,13 +456,13 @@ public function createStoreRequest($options) * @throws \InvalidArgumentException * @return void */ - public function deleteStore($options) + public function kvStoreDelete($options) { - $this->deleteStoreWithHttpInfo($options); + $this->kvStoreDeleteWithHttpInfo($options); } /** - * Operation deleteStoreWithHttpInfo + * Operation kvStoreDeleteWithHttpInfo * * Delete a KV store. * @@ -477,9 +477,9 @@ public function deleteStore($options) * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteStoreWithHttpInfo($options) + public function kvStoreDeleteWithHttpInfo($options) { - $request = $this->deleteStoreRequest($options); + $request = $this->kvStoreDeleteRequest($options); try { $options = $this->createHttpClientOption(); @@ -538,7 +538,7 @@ public function deleteStoreWithHttpInfo($options) } /** - * Operation deleteStoreAsync + * Operation kvStoreDeleteAsync * * Delete a KV store. * @@ -552,9 +552,9 @@ public function deleteStoreWithHttpInfo($options) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteStoreAsync($options) + public function kvStoreDeleteAsync($options) { - return $this->deleteStoreAsyncWithHttpInfo($options) + return $this->kvStoreDeleteAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -563,7 +563,7 @@ function ($response) { } /** - * Operation deleteStoreAsyncWithHttpInfo + * Operation kvStoreDeleteAsyncWithHttpInfo * * Delete a KV store. * @@ -577,10 +577,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteStoreAsyncWithHttpInfo($options) + public function kvStoreDeleteAsyncWithHttpInfo($options) { $returnType = ''; - $request = $this->deleteStoreRequest($options); + $request = $this->kvStoreDeleteRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -606,7 +606,7 @@ function ($exception) { } /** - * Create request for operation 'deleteStore' + * Create request for operation 'kvStoreDelete' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -618,7 +618,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteStoreRequest($options) + public function kvStoreDeleteRequest($options) { // unbox the parameters from the associative array $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; @@ -626,7 +626,7 @@ public function deleteStoreRequest($options) // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling deleteStore' + 'Missing the required parameter $store_id when calling kvStoreDelete' ); } @@ -718,7 +718,7 @@ public function deleteStoreRequest($options) } /** - * Operation getStore + * Operation kvStoreGet * * Describe a KV store. * @@ -731,16 +731,16 @@ public function deleteStoreRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\StoreResponse + * @return \Fastly\Model\KvStoreDetails */ - public function getStore($options) + public function kvStoreGet($options) { - list($response) = $this->getStoreWithHttpInfo($options); + list($response) = $this->kvStoreGetWithHttpInfo($options); return $response; } /** - * Operation getStoreWithHttpInfo + * Operation kvStoreGetWithHttpInfo * * Describe a KV store. * @@ -753,11 +753,11 @@ public function getStore($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\StoreResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\KvStoreDetails, HTTP status code, HTTP response headers (array of strings) */ - public function getStoreWithHttpInfo($options) + public function kvStoreGetWithHttpInfo($options) { - $request = $this->getStoreRequest($options); + $request = $this->kvStoreGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -808,20 +808,20 @@ public function getStoreWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\StoreResponse' === '\SplFileObject') { + if ('\Fastly\Model\KvStoreDetails' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\StoreResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\KvStoreDetails', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\StoreResponse'; + $returnType = '\Fastly\Model\KvStoreDetails'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -839,7 +839,7 @@ public function getStoreWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\StoreResponse', + '\Fastly\Model\KvStoreDetails', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -850,7 +850,7 @@ public function getStoreWithHttpInfo($options) } /** - * Operation getStoreAsync + * Operation kvStoreGetAsync * * Describe a KV store. * @@ -864,9 +864,9 @@ public function getStoreWithHttpInfo($options) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStoreAsync($options) + public function kvStoreGetAsync($options) { - return $this->getStoreAsyncWithHttpInfo($options) + return $this->kvStoreGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -875,7 +875,7 @@ function ($response) { } /** - * Operation getStoreAsyncWithHttpInfo + * Operation kvStoreGetAsyncWithHttpInfo * * Describe a KV store. * @@ -889,10 +889,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStoreAsyncWithHttpInfo($options) + public function kvStoreGetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\StoreResponse'; - $request = $this->getStoreRequest($options); + $returnType = '\Fastly\Model\KvStoreDetails'; + $request = $this->kvStoreGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -928,7 +928,7 @@ function ($exception) { } /** - * Create request for operation 'getStore' + * Create request for operation 'kvStoreGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -940,7 +940,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getStoreRequest($options) + public function kvStoreGetRequest($options) { // unbox the parameters from the associative array $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; @@ -948,7 +948,7 @@ public function getStoreRequest($options) // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling getStore' + 'Missing the required parameter $store_id when calling kvStoreGet' ); } @@ -1040,9 +1040,9 @@ public function getStoreRequest($options) } /** - * Operation getStores + * Operation kvStoreList * - * List KV stores. + * List all KV stores. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1056,16 +1056,16 @@ public function getStoreRequest($options) * @throws \InvalidArgumentException * @return \Fastly\Model\InlineResponse2003 */ - public function getStores($options) + public function kvStoreList($options) { - list($response) = $this->getStoresWithHttpInfo($options); + list($response) = $this->kvStoreListWithHttpInfo($options); return $response; } /** - * Operation getStoresWithHttpInfo + * Operation kvStoreListWithHttpInfo * - * List KV stores. + * List all KV stores. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1079,9 +1079,9 @@ public function getStores($options) * @throws \InvalidArgumentException * @return array of \Fastly\Model\InlineResponse2003, HTTP status code, HTTP response headers (array of strings) */ - public function getStoresWithHttpInfo($options) + public function kvStoreListWithHttpInfo($options) { - $request = $this->getStoresRequest($options); + $request = $this->kvStoreListRequest($options); try { $options = $this->createHttpClientOption(); @@ -1174,9 +1174,9 @@ public function getStoresWithHttpInfo($options) } /** - * Operation getStoresAsync + * Operation kvStoreListAsync * - * List KV stores. + * List all KV stores. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1189,9 +1189,9 @@ public function getStoresWithHttpInfo($options) * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStoresAsync($options) + public function kvStoreListAsync($options) { - return $this->getStoresAsyncWithHttpInfo($options) + return $this->kvStoreListAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1200,9 +1200,9 @@ function ($response) { } /** - * Operation getStoresAsyncWithHttpInfo + * Operation kvStoreListAsyncWithHttpInfo * - * List KV stores. + * List all KV stores. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1215,10 +1215,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getStoresAsyncWithHttpInfo($options) + public function kvStoreListAsyncWithHttpInfo($options) { $returnType = '\Fastly\Model\InlineResponse2003'; - $request = $this->getStoresRequest($options); + $request = $this->kvStoreListRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1254,7 +1254,7 @@ function ($exception) { } /** - * Create request for operation 'getStores' + * Create request for operation 'kvStoreList' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1267,12 +1267,16 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getStoresRequest($options) + public function kvStoreListRequest($options) { // unbox the parameters from the associative array $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; $limit = array_key_exists('limit', $options) ? $options['limit'] : 1000; + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling KvStoreApi.kvStoreList, must be bigger than or equal to 1.'); + } + $resourcePath = '/resources/stores/kv'; $formParams = []; diff --git a/lib/Api/KvStoreItemApi.php b/lib/Api/KvStoreItemApi.php index e7b69d00..c4278d06 100644 --- a/lib/Api/KvStoreItemApi.php +++ b/lib/Api/KvStoreItemApi.php @@ -110,9 +110,9 @@ public function getConfig() } /** - * Operation deleteKeyFromStore + * Operation kvStoreDeleteItem * - * Delete kv store item. + * Delete an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -120,21 +120,23 @@ public function getConfig() * URL: https://api.fastly.com * * @param string $store_id store_id (required) - * @param string $key_name key_name (required) + * @param string $key key (required) + * @param int $if_generation_match if_generation_match (optional) + * @param bool $force force (optional, default to false) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteKeyFromStore($options) + public function kvStoreDeleteItem($options) { - $this->deleteKeyFromStoreWithHttpInfo($options); + $this->kvStoreDeleteItemWithHttpInfo($options); } /** - * Operation deleteKeyFromStoreWithHttpInfo + * Operation kvStoreDeleteItemWithHttpInfo * - * Delete kv store item. + * Delete an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -142,15 +144,17 @@ public function deleteKeyFromStore($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) + * @param int $if_generation_match (optional) + * @param bool $force (optional, default to false) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteKeyFromStoreWithHttpInfo($options) + public function kvStoreDeleteItemWithHttpInfo($options) { - $request = $this->deleteKeyFromStoreRequest($options); + $request = $this->kvStoreDeleteItemRequest($options); try { $options = $this->createHttpClientOption(); @@ -209,9 +213,9 @@ public function deleteKeyFromStoreWithHttpInfo($options) } /** - * Operation deleteKeyFromStoreAsync + * Operation kvStoreDeleteItemAsync * - * Delete kv store item. + * Delete an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -219,14 +223,16 @@ public function deleteKeyFromStoreWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) + * @param int $if_generation_match (optional) + * @param bool $force (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteKeyFromStoreAsync($options) + public function kvStoreDeleteItemAsync($options) { - return $this->deleteKeyFromStoreAsyncWithHttpInfo($options) + return $this->kvStoreDeleteItemAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -235,9 +241,9 @@ function ($response) { } /** - * Operation deleteKeyFromStoreAsyncWithHttpInfo + * Operation kvStoreDeleteItemAsyncWithHttpInfo * - * Delete kv store item. + * Delete an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -245,15 +251,17 @@ function ($response) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) + * @param int $if_generation_match (optional) + * @param bool $force (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteKeyFromStoreAsyncWithHttpInfo($options) + public function kvStoreDeleteItemAsyncWithHttpInfo($options) { $returnType = ''; - $request = $this->deleteKeyFromStoreRequest($options); + $request = $this->kvStoreDeleteItemRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -279,7 +287,7 @@ function ($exception) { } /** - * Create request for operation 'deleteKeyFromStore' + * Create request for operation 'kvStoreDeleteItem' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -287,38 +295,57 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) + * @param int $if_generation_match (optional) + * @param bool $force (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteKeyFromStoreRequest($options) + public function kvStoreDeleteItemRequest($options) { // unbox the parameters from the associative array $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; - $key_name = array_key_exists('key_name', $options) ? $options['key_name'] : null; + $key = array_key_exists('key', $options) ? $options['key'] : null; + $if_generation_match = array_key_exists('if_generation_match', $options) ? $options['if_generation_match'] : null; + $force = array_key_exists('force', $options) ? $options['force'] : false; // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling deleteKeyFromStore' + 'Missing the required parameter $store_id when calling kvStoreDeleteItem' ); } - // verify the required parameter 'key_name' is set - if ($key_name === null || (is_array($key_name) && count($key_name) === 0)) { + // verify the required parameter 'key' is set + if ($key === null || (is_array($key) && count($key) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $key_name when calling deleteKeyFromStore' + 'Missing the required parameter $key when calling kvStoreDeleteItem' ); } - $resourcePath = '/resources/stores/kv/{store_id}/keys/{key_name}'; + $resourcePath = '/resources/stores/kv/{store_id}/keys/{key}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if ($force !== null) { + if('form' === 'form' && is_array($force)) { + foreach($force as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['force'] = ObjectSerializer::toString($force); + } + } + // header params + if ($if_generation_match !== null) { + $headerParams['if-generation-match'] = ObjectSerializer::toHeaderValue($if_generation_match); + } // path params if ($store_id !== null) { @@ -329,10 +356,10 @@ public function deleteKeyFromStoreRequest($options) ); } // path params - if ($key_name !== null) { + if ($key !== null) { $resourcePath = str_replace( - '{' . 'key_name' . '}', - ObjectSerializer::toPathValue($key_name), + '{' . 'key' . '}', + ObjectSerializer::toPathValue($key), $resourcePath ); } @@ -407,9 +434,9 @@ public function deleteKeyFromStoreRequest($options) } /** - * Operation getKeys + * Operation kvStoreGetItem * - * List kv store keys. + * Get an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -417,25 +444,22 @@ public function deleteKeyFromStoreRequest($options) * URL: https://api.fastly.com * * @param string $store_id store_id (required) - * @param string $cursor cursor (optional) - * @param int $limit limit (optional, default to 100) - * @param string $prefix prefix (optional) - * @param string $consistency consistency (optional) + * @param string $key key (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2004 + * @return \SplFileObject */ - public function getKeys($options) + public function kvStoreGetItem($options) { - list($response) = $this->getKeysWithHttpInfo($options); + list($response) = $this->kvStoreGetItemWithHttpInfo($options); return $response; } /** - * Operation getKeysWithHttpInfo + * Operation kvStoreGetItemWithHttpInfo * - * List kv store keys. + * Get an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -443,18 +467,15 @@ public function getKeys($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor (optional) - * @param int $limit (optional, default to 100) - * @param string $prefix (optional) - * @param string $consistency (optional) + * @param string $key (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) */ - public function getKeysWithHttpInfo($options) + public function kvStoreGetItemWithHttpInfo($options) { - $request = $this->getKeysRequest($options); + $request = $this->kvStoreGetItemRequest($options); try { $options = $this->createHttpClientOption(); @@ -505,20 +526,20 @@ public function getKeysWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2004' === '\SplFileObject') { + if ('\SplFileObject' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2004', []), + ObjectSerializer::deserialize($content, '\SplFileObject', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2004'; + $returnType = '\SplFileObject'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -536,7 +557,7 @@ public function getKeysWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2004', + '\SplFileObject', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -547,9 +568,9 @@ public function getKeysWithHttpInfo($options) } /** - * Operation getKeysAsync + * Operation kvStoreGetItemAsync * - * List kv store keys. + * Get an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -557,17 +578,14 @@ public function getKeysWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor (optional) - * @param int $limit (optional, default to 100) - * @param string $prefix (optional) - * @param string $consistency (optional) + * @param string $key (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getKeysAsync($options) + public function kvStoreGetItemAsync($options) { - return $this->getKeysAsyncWithHttpInfo($options) + return $this->kvStoreGetItemAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -576,9 +594,9 @@ function ($response) { } /** - * Operation getKeysAsyncWithHttpInfo + * Operation kvStoreGetItemAsyncWithHttpInfo * - * List kv store keys. + * Get an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -586,18 +604,15 @@ function ($response) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor (optional) - * @param int $limit (optional, default to 100) - * @param string $prefix (optional) - * @param string $consistency (optional) + * @param string $key (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getKeysAsyncWithHttpInfo($options) + public function kvStoreGetItemAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2004'; - $request = $this->getKeysRequest($options); + $returnType = '\SplFileObject'; + $request = $this->kvStoreGetItemRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -633,7 +648,7 @@ function ($exception) { } /** - * Create request for operation 'getKeys' + * Create request for operation 'kvStoreGetItem' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -641,81 +656,37 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $cursor (optional) - * @param int $limit (optional, default to 100) - * @param string $prefix (optional) - * @param string $consistency (optional) + * @param string $key (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getKeysRequest($options) + public function kvStoreGetItemRequest($options) { // unbox the parameters from the associative array $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; - $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; - $limit = array_key_exists('limit', $options) ? $options['limit'] : 100; - $prefix = array_key_exists('prefix', $options) ? $options['prefix'] : null; - $consistency = array_key_exists('consistency', $options) ? $options['consistency'] : null; + $key = array_key_exists('key', $options) ? $options['key'] : null; // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling getKeys' + 'Missing the required parameter $store_id when calling kvStoreGetItem' + ); + } + // verify the required parameter 'key' is set + if ($key === null || (is_array($key) && count($key) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $key when calling kvStoreGetItem' ); } - $resourcePath = '/resources/stores/kv/{store_id}/keys'; + $resourcePath = '/resources/stores/kv/{store_id}/keys/{key}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($cursor !== null) { - if('form' === 'form' && is_array($cursor)) { - foreach($cursor as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['cursor'] = ObjectSerializer::toString($cursor); - } - } - // query params - if ($limit !== null) { - if('form' === 'form' && is_array($limit)) { - foreach($limit as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['limit'] = ObjectSerializer::toString($limit); - } - } - // query params - if ($prefix !== null) { - if('form' === 'form' && is_array($prefix)) { - foreach($prefix as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['prefix'] = ObjectSerializer::toString($prefix); - } - } - // query params - if ($consistency !== null) { - if('form' === 'form' && is_array($consistency)) { - foreach($consistency as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['consistency'] = ObjectSerializer::toString($consistency); - } - } // path params @@ -726,15 +697,23 @@ public function getKeysRequest($options) $resourcePath ); } + // path params + if ($key !== null) { + $resourcePath = str_replace( + '{' . 'key' . '}', + ObjectSerializer::toPathValue($key), + $resourcePath + ); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/octet-stream'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/octet-stream'], [] ); } @@ -797,9 +776,9 @@ public function getKeysRequest($options) } /** - * Operation getValueForKey + * Operation kvStoreListItemKeys * - * Get the value of an kv store item + * List item keys. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -807,22 +786,25 @@ public function getKeysRequest($options) * URL: https://api.fastly.com * * @param string $store_id store_id (required) - * @param string $key_name key_name (required) + * @param string $cursor cursor (optional) + * @param int $limit limit (optional, default to 100) + * @param string $prefix prefix (optional) + * @param string $consistency consistency (optional, default to 'strong') * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string + * @return \Fastly\Model\InlineResponse2004 */ - public function getValueForKey($options) + public function kvStoreListItemKeys($options) { - list($response) = $this->getValueForKeyWithHttpInfo($options); + list($response) = $this->kvStoreListItemKeysWithHttpInfo($options); return $response; } /** - * Operation getValueForKeyWithHttpInfo + * Operation kvStoreListItemKeysWithHttpInfo * - * Get the value of an kv store item + * List item keys. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -830,15 +812,18 @@ public function getValueForKey($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $cursor (optional) + * @param int $limit (optional, default to 100) + * @param string $prefix (optional) + * @param string $consistency (optional, default to 'strong') * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) */ - public function getValueForKeyWithHttpInfo($options) + public function kvStoreListItemKeysWithHttpInfo($options) { - $request = $this->getValueForKeyRequest($options); + $request = $this->kvStoreListItemKeysRequest($options); try { $options = $this->createHttpClientOption(); @@ -889,20 +874,20 @@ public function getValueForKeyWithHttpInfo($options) switch($statusCode) { case 200: - if ('string' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2004' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'string', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'string'; + $returnType = '\Fastly\Model\InlineResponse2004'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -920,7 +905,7 @@ public function getValueForKeyWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'string', + '\Fastly\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -931,9 +916,9 @@ public function getValueForKeyWithHttpInfo($options) } /** - * Operation getValueForKeyAsync + * Operation kvStoreListItemKeysAsync * - * Get the value of an kv store item + * List item keys. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -941,14 +926,17 @@ public function getValueForKeyWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $cursor (optional) + * @param int $limit (optional, default to 100) + * @param string $prefix (optional) + * @param string $consistency (optional, default to 'strong') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getValueForKeyAsync($options) + public function kvStoreListItemKeysAsync($options) { - return $this->getValueForKeyAsyncWithHttpInfo($options) + return $this->kvStoreListItemKeysAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -957,9 +945,9 @@ function ($response) { } /** - * Operation getValueForKeyAsyncWithHttpInfo + * Operation kvStoreListItemKeysAsyncWithHttpInfo * - * Get the value of an kv store item + * List item keys. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -967,15 +955,18 @@ function ($response) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $cursor (optional) + * @param int $limit (optional, default to 100) + * @param string $prefix (optional) + * @param string $consistency (optional, default to 'strong') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getValueForKeyAsyncWithHttpInfo($options) + public function kvStoreListItemKeysAsyncWithHttpInfo($options) { - $returnType = 'string'; - $request = $this->getValueForKeyRequest($options); + $returnType = '\Fastly\Model\InlineResponse2004'; + $request = $this->kvStoreListItemKeysRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1011,7 +1002,7 @@ function ($exception) { } /** - * Create request for operation 'getValueForKey' + * Create request for operation 'kvStoreListItemKeys' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1019,37 +1010,85 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $cursor (optional) + * @param int $limit (optional, default to 100) + * @param string $prefix (optional) + * @param string $consistency (optional, default to 'strong') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getValueForKeyRequest($options) + public function kvStoreListItemKeysRequest($options) { // unbox the parameters from the associative array $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; - $key_name = array_key_exists('key_name', $options) ? $options['key_name'] : null; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : 100; + $prefix = array_key_exists('prefix', $options) ? $options['prefix'] : null; + $consistency = array_key_exists('consistency', $options) ? $options['consistency'] : 'strong'; // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling getValueForKey' + 'Missing the required parameter $store_id when calling kvStoreListItemKeys' ); } - // verify the required parameter 'key_name' is set - if ($key_name === null || (is_array($key_name) && count($key_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $key_name when calling getValueForKey' - ); + if ($limit !== null && $limit < 1) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling KvStoreItemApi.kvStoreListItemKeys, must be bigger than or equal to 1.'); } - $resourcePath = '/resources/stores/kv/{store_id}/keys/{key_name}'; + + $resourcePath = '/resources/stores/kv/{store_id}/keys'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } + } + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } + } + // query params + if ($prefix !== null) { + if('form' === 'form' && is_array($prefix)) { + foreach($prefix as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['prefix'] = ObjectSerializer::toString($prefix); + } + } + // query params + if ($consistency !== null) { + if('form' === 'form' && is_array($consistency)) { + foreach($consistency as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['consistency'] = ObjectSerializer::toString($consistency); + } + } // path params @@ -1060,23 +1099,15 @@ public function getValueForKeyRequest($options) $resourcePath ); } - // path params - if ($key_name !== null) { - $resourcePath = str_replace( - '{' . 'key_name' . '}', - ObjectSerializer::toPathValue($key_name), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/octet-stream'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/octet-stream'], + ['application/json'], [] ); } @@ -1139,9 +1170,9 @@ public function getValueForKeyRequest($options) } /** - * Operation setValueForKey + * Operation kvStoreUpsertItem * - * Insert an item into an kv store + * Insert or update an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1149,30 +1180,29 @@ public function getValueForKeyRequest($options) * URL: https://api.fastly.com * * @param string $store_id store_id (required) - * @param string $key_name key_name (required) + * @param string $key key (required) * @param int $if_generation_match if_generation_match (optional) * @param int $time_to_live_sec time_to_live_sec (optional) * @param string $metadata metadata (optional) - * @param bool $add add (optional) - * @param bool $append append (optional) - * @param bool $prepend prepend (optional) - * @param bool $background_fetch background_fetch (optional) - * @param string $body body (optional) + * @param bool $add add (optional, default to false) + * @param bool $append append (optional, default to false) + * @param bool $prepend prepend (optional, default to false) + * @param bool $background_fetch background_fetch (optional, default to false) + * @param \SplFileObject $body body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string + * @return void */ - public function setValueForKey($options) + public function kvStoreUpsertItem($options) { - list($response) = $this->setValueForKeyWithHttpInfo($options); - return $response; + $this->kvStoreUpsertItemWithHttpInfo($options); } /** - * Operation setValueForKeyWithHttpInfo + * Operation kvStoreUpsertItemWithHttpInfo * - * Insert an item into an kv store + * Insert or update an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1180,23 +1210,23 @@ public function setValueForKey($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) * @param int $if_generation_match (optional) * @param int $time_to_live_sec (optional) * @param string $metadata (optional) - * @param bool $add (optional) - * @param bool $append (optional) - * @param bool $prepend (optional) - * @param bool $background_fetch (optional) - * @param string $body (optional) + * @param bool $add (optional, default to false) + * @param bool $append (optional, default to false) + * @param bool $prepend (optional, default to false) + * @param bool $background_fetch (optional, default to false) + * @param \SplFileObject $body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function setValueForKeyWithHttpInfo($options) + public function kvStoreUpsertItemWithHttpInfo($options) { - $request = $this->setValueForKeyRequest($options); + $request = $this->kvStoreUpsertItemRequest($options); try { $options = $this->createHttpClientOption(); @@ -1245,53 +1275,19 @@ public function setValueForKeyWithHttpInfo($options) ); } - switch($statusCode) { - case 200: - if ('string' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'string', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'string'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'string', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation setValueForKeyAsync + * Operation kvStoreUpsertItemAsync * - * Insert an item into an kv store + * Insert or update an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1299,22 +1295,22 @@ public function setValueForKeyWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) * @param int $if_generation_match (optional) * @param int $time_to_live_sec (optional) * @param string $metadata (optional) - * @param bool $add (optional) - * @param bool $append (optional) - * @param bool $prepend (optional) - * @param bool $background_fetch (optional) - * @param string $body (optional) + * @param bool $add (optional, default to false) + * @param bool $append (optional, default to false) + * @param bool $prepend (optional, default to false) + * @param bool $background_fetch (optional, default to false) + * @param \SplFileObject $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setValueForKeyAsync($options) + public function kvStoreUpsertItemAsync($options) { - return $this->setValueForKeyAsyncWithHttpInfo($options) + return $this->kvStoreUpsertItemAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1323,9 +1319,9 @@ function ($response) { } /** - * Operation setValueForKeyAsyncWithHttpInfo + * Operation kvStoreUpsertItemAsyncWithHttpInfo * - * Insert an item into an kv store + * Insert or update an item. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1333,39 +1329,29 @@ function ($response) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) * @param int $if_generation_match (optional) * @param int $time_to_live_sec (optional) * @param string $metadata (optional) - * @param bool $add (optional) - * @param bool $append (optional) - * @param bool $prepend (optional) - * @param bool $background_fetch (optional) - * @param string $body (optional) + * @param bool $add (optional, default to false) + * @param bool $append (optional, default to false) + * @param bool $prepend (optional, default to false) + * @param bool $background_fetch (optional, default to false) + * @param \SplFileObject $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setValueForKeyAsyncWithHttpInfo($options) + public function kvStoreUpsertItemAsyncWithHttpInfo($options) { - $returnType = 'string'; - $request = $this->setValueForKeyRequest($options); + $returnType = ''; + $request = $this->kvStoreUpsertItemRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1385,7 +1371,7 @@ function ($exception) { } /** - * Create request for operation 'setValueForKey' + * Create request for operation 'kvStoreUpsertItem' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1393,47 +1379,47 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $store_id (required) - * @param string $key_name (required) + * @param string $key (required) * @param int $if_generation_match (optional) * @param int $time_to_live_sec (optional) * @param string $metadata (optional) - * @param bool $add (optional) - * @param bool $append (optional) - * @param bool $prepend (optional) - * @param bool $background_fetch (optional) - * @param string $body (optional) + * @param bool $add (optional, default to false) + * @param bool $append (optional, default to false) + * @param bool $prepend (optional, default to false) + * @param bool $background_fetch (optional, default to false) + * @param \SplFileObject $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setValueForKeyRequest($options) + public function kvStoreUpsertItemRequest($options) { // unbox the parameters from the associative array $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; - $key_name = array_key_exists('key_name', $options) ? $options['key_name'] : null; + $key = array_key_exists('key', $options) ? $options['key'] : null; $if_generation_match = array_key_exists('if_generation_match', $options) ? $options['if_generation_match'] : null; $time_to_live_sec = array_key_exists('time_to_live_sec', $options) ? $options['time_to_live_sec'] : null; $metadata = array_key_exists('metadata', $options) ? $options['metadata'] : null; - $add = array_key_exists('add', $options) ? $options['add'] : null; - $append = array_key_exists('append', $options) ? $options['append'] : null; - $prepend = array_key_exists('prepend', $options) ? $options['prepend'] : null; - $background_fetch = array_key_exists('background_fetch', $options) ? $options['background_fetch'] : null; + $add = array_key_exists('add', $options) ? $options['add'] : false; + $append = array_key_exists('append', $options) ? $options['append'] : false; + $prepend = array_key_exists('prepend', $options) ? $options['prepend'] : false; + $background_fetch = array_key_exists('background_fetch', $options) ? $options['background_fetch'] : false; $body = array_key_exists('body', $options) ? $options['body'] : null; // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $store_id when calling setValueForKey' + 'Missing the required parameter $store_id when calling kvStoreUpsertItem' ); } - // verify the required parameter 'key_name' is set - if ($key_name === null || (is_array($key_name) && count($key_name) === 0)) { + // verify the required parameter 'key' is set + if ($key === null || (is_array($key) && count($key) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $key_name when calling setValueForKey' + 'Missing the required parameter $key when calling kvStoreUpsertItem' ); } - $resourcePath = '/resources/stores/kv/{store_id}/keys/{key_name}'; + $resourcePath = '/resources/stores/kv/{store_id}/keys/{key}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1507,10 +1493,10 @@ public function setValueForKeyRequest($options) ); } // path params - if ($key_name !== null) { + if ($key !== null) { $resourcePath = str_replace( - '{' . 'key_name' . '}', - ObjectSerializer::toPathValue($key_name), + '{' . 'key' . '}', + ObjectSerializer::toPathValue($key), $resourcePath ); } @@ -1518,11 +1504,11 @@ public function setValueForKeyRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/octet-stream'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/octet-stream'], + [], ['application/octet-stream'] ); } diff --git a/lib/Api/LegacyWafFirewallApi.php b/lib/Api/LegacyWafFirewallApi.php deleted file mode 100644 index 6c484427..00000000 --- a/lib/Api/LegacyWafFirewallApi.php +++ /dev/null @@ -1,3044 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation createLegacyWafFirewallService - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function createLegacyWafFirewallService($options) - { - list($response) = $this->createLegacyWafFirewallServiceWithHttpInfo($options); - return $response; - } - - /** - * Operation createLegacyWafFirewallServiceWithHttpInfo - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function createLegacyWafFirewallServiceWithHttpInfo($options) - { - $request = $this->createLegacyWafFirewallServiceRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('POST' != 'GET' && 'POST' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createLegacyWafFirewallServiceAsync - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createLegacyWafFirewallServiceAsync($options) - { - return $this->createLegacyWafFirewallServiceAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createLegacyWafFirewallServiceAsyncWithHttpInfo - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createLegacyWafFirewallServiceAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->createLegacyWafFirewallServiceRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createLegacyWafFirewallService' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function createLegacyWafFirewallServiceRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling createLegacyWafFirewallService' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling createLegacyWafFirewallService' - ); - } - - $resourcePath = '/service/{service_id}/version/{version_id}/wafs'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation disableLegacyWafFirewall - * - * Disable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function disableLegacyWafFirewall($options) - { - list($response) = $this->disableLegacyWafFirewallWithHttpInfo($options); - return $response; - } - - /** - * Operation disableLegacyWafFirewallWithHttpInfo - * - * Disable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function disableLegacyWafFirewallWithHttpInfo($options) - { - $request = $this->disableLegacyWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 202: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 202: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation disableLegacyWafFirewallAsync - * - * Disable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function disableLegacyWafFirewallAsync($options) - { - return $this->disableLegacyWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation disableLegacyWafFirewallAsyncWithHttpInfo - * - * Disable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function disableLegacyWafFirewallAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->disableLegacyWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'disableLegacyWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function disableLegacyWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling disableLegacyWafFirewall' - ); - } - - $resourcePath = '/wafs/{firewall_id}/disable'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation enableLegacyWafFirewall - * - * Enable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function enableLegacyWafFirewall($options) - { - list($response) = $this->enableLegacyWafFirewallWithHttpInfo($options); - return $response; - } - - /** - * Operation enableLegacyWafFirewallWithHttpInfo - * - * Enable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function enableLegacyWafFirewallWithHttpInfo($options) - { - $request = $this->enableLegacyWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 202: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 202: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation enableLegacyWafFirewallAsync - * - * Enable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function enableLegacyWafFirewallAsync($options) - { - return $this->enableLegacyWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation enableLegacyWafFirewallAsyncWithHttpInfo - * - * Enable a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function enableLegacyWafFirewallAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->enableLegacyWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'enableLegacyWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function enableLegacyWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling enableLegacyWafFirewall' - ); - } - - $resourcePath = '/wafs/{firewall_id}/enable'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getLegacyWafFirewall - * - * Get a firewall object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function getLegacyWafFirewall($options) - { - list($response) = $this->getLegacyWafFirewallWithHttpInfo($options); - return $response; - } - - /** - * Operation getLegacyWafFirewallWithHttpInfo - * - * Get a firewall object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getLegacyWafFirewallWithHttpInfo($options) - { - $request = $this->getLegacyWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getLegacyWafFirewallAsync - * - * Get a firewall object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getLegacyWafFirewallAsync($options) - { - return $this->getLegacyWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getLegacyWafFirewallAsyncWithHttpInfo - * - * Get a firewall object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getLegacyWafFirewallAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->getLegacyWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getLegacyWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getLegacyWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getLegacyWafFirewall' - ); - } - - $resourcePath = '/wafs/{firewall_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getLegacyWafFirewallService - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function getLegacyWafFirewallService($options) - { - list($response) = $this->getLegacyWafFirewallServiceWithHttpInfo($options); - return $response; - } - - /** - * Operation getLegacyWafFirewallServiceWithHttpInfo - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getLegacyWafFirewallServiceWithHttpInfo($options) - { - $request = $this->getLegacyWafFirewallServiceRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getLegacyWafFirewallServiceAsync - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getLegacyWafFirewallServiceAsync($options) - { - return $this->getLegacyWafFirewallServiceAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getLegacyWafFirewallServiceAsyncWithHttpInfo - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getLegacyWafFirewallServiceAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->getLegacyWafFirewallServiceRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getLegacyWafFirewallService' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getLegacyWafFirewallServiceRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getLegacyWafFirewallService' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling getLegacyWafFirewallService' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getLegacyWafFirewallService' - ); - } - - $resourcePath = '/service/{service_id}/version/{version_id}/wafs/{firewall_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listLegacyWafFirewalls - * - * List active firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_rules_rule_id Limit the returned firewalls to a specific rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function listLegacyWafFirewalls($options) - { - list($response) = $this->listLegacyWafFirewallsWithHttpInfo($options); - return $response; - } - - /** - * Operation listLegacyWafFirewallsWithHttpInfo - * - * List active firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_rules_rule_id Limit the returned firewalls to a specific rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listLegacyWafFirewallsWithHttpInfo($options) - { - $request = $this->listLegacyWafFirewallsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listLegacyWafFirewallsAsync - * - * List active firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_rules_rule_id Limit the returned firewalls to a specific rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listLegacyWafFirewallsAsync($options) - { - return $this->listLegacyWafFirewallsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listLegacyWafFirewallsAsyncWithHttpInfo - * - * List active firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_rules_rule_id Limit the returned firewalls to a specific rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listLegacyWafFirewallsAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->listLegacyWafFirewallsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listLegacyWafFirewalls' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_rules_rule_id Limit the returned firewalls to a specific rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listLegacyWafFirewallsRequest($options) - { - // unbox the parameters from the associative array - $filter_rules_rule_id = array_key_exists('filter_rules_rule_id', $options) ? $options['filter_rules_rule_id'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafFirewallApi.listLegacyWafFirewalls, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafFirewallApi.listLegacyWafFirewalls, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/wafs'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter_rules_rule_id !== null) { - if('form' === 'form' && is_array($filter_rules_rule_id)) { - foreach($filter_rules_rule_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[rules][rule_id]'] = ObjectSerializer::toString($filter_rules_rule_id); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listLegacyWafFirewallsService - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function listLegacyWafFirewallsService($options) - { - list($response) = $this->listLegacyWafFirewallsServiceWithHttpInfo($options); - return $response; - } - - /** - * Operation listLegacyWafFirewallsServiceWithHttpInfo - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listLegacyWafFirewallsServiceWithHttpInfo($options) - { - $request = $this->listLegacyWafFirewallsServiceRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listLegacyWafFirewallsServiceAsync - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listLegacyWafFirewallsServiceAsync($options) - { - return $this->listLegacyWafFirewallsServiceAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listLegacyWafFirewallsServiceAsyncWithHttpInfo - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listLegacyWafFirewallsServiceAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->listLegacyWafFirewallsServiceRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listLegacyWafFirewallsService' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listLegacyWafFirewallsServiceRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling listLegacyWafFirewallsService' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling listLegacyWafFirewallsService' - ); - } - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafFirewallApi.listLegacyWafFirewallsService, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafFirewallApi.listLegacyWafFirewallsService, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/service/{service_id}/version/{version_id}/wafs'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateLegacyWafFirewallService - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function updateLegacyWafFirewallService($options) - { - list($response) = $this->updateLegacyWafFirewallServiceWithHttpInfo($options); - return $response; - } - - /** - * Operation updateLegacyWafFirewallServiceWithHttpInfo - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function updateLegacyWafFirewallServiceWithHttpInfo($options) - { - $request = $this->updateLegacyWafFirewallServiceRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateLegacyWafFirewallServiceAsync - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateLegacyWafFirewallServiceAsync($options) - { - return $this->updateLegacyWafFirewallServiceAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateLegacyWafFirewallServiceAsyncWithHttpInfo - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateLegacyWafFirewallServiceAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->updateLegacyWafFirewallServiceRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateLegacyWafFirewallService' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function updateLegacyWafFirewallServiceRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling updateLegacyWafFirewallService' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling updateLegacyWafFirewallService' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateLegacyWafFirewallService' - ); - } - - $resourcePath = '/service/{service_id}/version/{version_id}/wafs/{firewall_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/LegacyWafRuleStatusApi.php b/lib/Api/LegacyWafRuleStatusApi.php deleted file mode 100644 index 7726caf0..00000000 --- a/lib/Api/LegacyWafRuleStatusApi.php +++ /dev/null @@ -1,1759 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getWafFirewallRuleStatus - * - * Get the status of a rule on a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function getWafFirewallRuleStatus($options) - { - list($response) = $this->getWafFirewallRuleStatusWithHttpInfo($options); - return $response; - } - - /** - * Operation getWafFirewallRuleStatusWithHttpInfo - * - * Get the status of a rule on a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getWafFirewallRuleStatusWithHttpInfo($options) - { - $request = $this->getWafFirewallRuleStatusRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getWafFirewallRuleStatusAsync - * - * Get the status of a rule on a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafFirewallRuleStatusAsync($options) - { - return $this->getWafFirewallRuleStatusAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getWafFirewallRuleStatusAsyncWithHttpInfo - * - * Get the status of a rule on a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafFirewallRuleStatusAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->getWafFirewallRuleStatusRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getWafFirewallRuleStatus' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getWafFirewallRuleStatusRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getWafFirewallRuleStatus' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafFirewallRuleStatus' - ); - } - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getWafFirewallRuleStatus' - ); - } - - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/rules/{waf_rule_id}/rule_status'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listWafFirewallRuleStatuses - * - * List rule statuses - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $filter_status Limit results to rule statuses with the specified status. (optional) - * @param string $filter_rule_message Limit results to rule statuses whose rules have the specified message. (optional) - * @param string $filter_rule_rule_id Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. (optional) - * @param string $filter_rule_tags Limit results to rule statuses whose rules relate to the specified tag IDs. (optional) - * @param string $filter_rule_tags_name Limit results to rule statuses whose rules related to the named tags. (optional) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `tags`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function listWafFirewallRuleStatuses($options) - { - list($response) = $this->listWafFirewallRuleStatusesWithHttpInfo($options); - return $response; - } - - /** - * Operation listWafFirewallRuleStatusesWithHttpInfo - * - * List rule statuses - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $filter_status Limit results to rule statuses with the specified status. (optional) - * @param string $filter_rule_message Limit results to rule statuses whose rules have the specified message. (optional) - * @param string $filter_rule_rule_id Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. (optional) - * @param string $filter_rule_tags Limit results to rule statuses whose rules relate to the specified tag IDs. (optional) - * @param string $filter_rule_tags_name Limit results to rule statuses whose rules related to the named tags. (optional) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `tags`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listWafFirewallRuleStatusesWithHttpInfo($options) - { - $request = $this->listWafFirewallRuleStatusesRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listWafFirewallRuleStatusesAsync - * - * List rule statuses - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $filter_status Limit results to rule statuses with the specified status. (optional) - * @param string $filter_rule_message Limit results to rule statuses whose rules have the specified message. (optional) - * @param string $filter_rule_rule_id Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. (optional) - * @param string $filter_rule_tags Limit results to rule statuses whose rules relate to the specified tag IDs. (optional) - * @param string $filter_rule_tags_name Limit results to rule statuses whose rules related to the named tags. (optional) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `tags`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafFirewallRuleStatusesAsync($options) - { - return $this->listWafFirewallRuleStatusesAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listWafFirewallRuleStatusesAsyncWithHttpInfo - * - * List rule statuses - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $filter_status Limit results to rule statuses with the specified status. (optional) - * @param string $filter_rule_message Limit results to rule statuses whose rules have the specified message. (optional) - * @param string $filter_rule_rule_id Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. (optional) - * @param string $filter_rule_tags Limit results to rule statuses whose rules relate to the specified tag IDs. (optional) - * @param string $filter_rule_tags_name Limit results to rule statuses whose rules related to the named tags. (optional) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `tags`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafFirewallRuleStatusesAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->listWafFirewallRuleStatusesRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listWafFirewallRuleStatuses' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $filter_status Limit results to rule statuses with the specified status. (optional) - * @param string $filter_rule_message Limit results to rule statuses whose rules have the specified message. (optional) - * @param string $filter_rule_rule_id Limit results to rule statuses whose rules represent the specified ModSecurity rule_id. (optional) - * @param string $filter_rule_tags Limit results to rule statuses whose rules relate to the specified tag IDs. (optional) - * @param string $filter_rule_tags_name Limit results to rule statuses whose rules related to the named tags. (optional) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `tags`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listWafFirewallRuleStatusesRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $filter_status = array_key_exists('filter_status', $options) ? $options['filter_status'] : null; - $filter_rule_message = array_key_exists('filter_rule_message', $options) ? $options['filter_rule_message'] : null; - $filter_rule_rule_id = array_key_exists('filter_rule_rule_id', $options) ? $options['filter_rule_rule_id'] : null; - $filter_rule_tags = array_key_exists('filter_rule_tags', $options) ? $options['filter_rule_tags'] : null; - $filter_rule_tags_name = array_key_exists('filter_rule_tags_name', $options) ? $options['filter_rule_tags_name'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling listWafFirewallRuleStatuses' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling listWafFirewallRuleStatuses' - ); - } - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafRuleStatusApi.listWafFirewallRuleStatuses, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafRuleStatusApi.listWafFirewallRuleStatuses, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/rule_statuses'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter_status !== null) { - if('form' === 'form' && is_array($filter_status)) { - foreach($filter_status as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[status]'] = ObjectSerializer::toString($filter_status); - } - } - // query params - if ($filter_rule_message !== null) { - if('form' === 'form' && is_array($filter_rule_message)) { - foreach($filter_rule_message as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[rule][message]'] = ObjectSerializer::toString($filter_rule_message); - } - } - // query params - if ($filter_rule_rule_id !== null) { - if('form' === 'form' && is_array($filter_rule_rule_id)) { - foreach($filter_rule_rule_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[rule][rule_id]'] = ObjectSerializer::toString($filter_rule_rule_id); - } - } - // query params - if ($filter_rule_tags !== null) { - if('form' === 'form' && is_array($filter_rule_tags)) { - foreach($filter_rule_tags as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[rule][tags]'] = ObjectSerializer::toString($filter_rule_tags); - } - } - // query params - if ($filter_rule_tags_name !== null) { - if('form' === 'form' && is_array($filter_rule_tags_name)) { - foreach($filter_rule_tags_name as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[rule][tags][name]'] = ObjectSerializer::toString($filter_rule_tags_name); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateWafFirewallRuleStatus - * - * Update the status of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function updateWafFirewallRuleStatus($options) - { - list($response) = $this->updateWafFirewallRuleStatusWithHttpInfo($options); - return $response; - } - - /** - * Operation updateWafFirewallRuleStatusWithHttpInfo - * - * Update the status of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function updateWafFirewallRuleStatusWithHttpInfo($options) - { - $request = $this->updateWafFirewallRuleStatusRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateWafFirewallRuleStatusAsync - * - * Update the status of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallRuleStatusAsync($options) - { - return $this->updateWafFirewallRuleStatusAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateWafFirewallRuleStatusAsyncWithHttpInfo - * - * Update the status of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallRuleStatusAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->updateWafFirewallRuleStatusRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateWafFirewallRuleStatus' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function updateWafFirewallRuleStatusRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling updateWafFirewallRuleStatus' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafFirewallRuleStatus' - ); - } - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling updateWafFirewallRuleStatus' - ); - } - - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/rules/{waf_rule_id}/rule_status'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateWafFirewallRuleStatusesTag - * - * Create or update status of a tagged group of rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $name The tag name to use to determine the set of rules to update. For example, OWASP or language-php. (optional) - * @param string $force Whether or not to update rule statuses for disabled rules. Optional. (optional) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function updateWafFirewallRuleStatusesTag($options) - { - list($response) = $this->updateWafFirewallRuleStatusesTagWithHttpInfo($options); - return $response; - } - - /** - * Operation updateWafFirewallRuleStatusesTagWithHttpInfo - * - * Create or update status of a tagged group of rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $name The tag name to use to determine the set of rules to update. For example, OWASP or language-php. (optional) - * @param string $force Whether or not to update rule statuses for disabled rules. Optional. (optional) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function updateWafFirewallRuleStatusesTagWithHttpInfo($options) - { - $request = $this->updateWafFirewallRuleStatusesTagRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('POST' != 'GET' && 'POST' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateWafFirewallRuleStatusesTagAsync - * - * Create or update status of a tagged group of rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $name The tag name to use to determine the set of rules to update. For example, OWASP or language-php. (optional) - * @param string $force Whether or not to update rule statuses for disabled rules. Optional. (optional) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallRuleStatusesTagAsync($options) - { - return $this->updateWafFirewallRuleStatusesTagAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateWafFirewallRuleStatusesTagAsyncWithHttpInfo - * - * Create or update status of a tagged group of rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $name The tag name to use to determine the set of rules to update. For example, OWASP or language-php. (optional) - * @param string $force Whether or not to update rule statuses for disabled rules. Optional. (optional) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallRuleStatusesTagAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->updateWafFirewallRuleStatusesTagRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateWafFirewallRuleStatusesTag' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $name The tag name to use to determine the set of rules to update. For example, OWASP or language-php. (optional) - * @param string $force Whether or not to update rule statuses for disabled rules. Optional. (optional) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function updateWafFirewallRuleStatusesTagRequest($options) - { - // unbox the parameters from the associative array - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $name = array_key_exists('name', $options) ? $options['name'] : null; - $force = array_key_exists('force', $options) ? $options['force'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling updateWafFirewallRuleStatusesTag' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafFirewallRuleStatusesTag' - ); - } - - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/rule_statuses'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($name !== null) { - if('form' === 'form' && is_array($name)) { - foreach($name as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['name'] = ObjectSerializer::toString($name); - } - } - // query params - if ($force !== null) { - if('form' === 'form' && is_array($force)) { - foreach($force as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['force'] = ObjectSerializer::toString($force); - } - } - - - // path params - if ($service_id !== null) { - $resourcePath = str_replace( - '{' . 'service_id' . '}', - ObjectSerializer::toPathValue($service_id), - $resourcePath - ); - } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/LegacyWafTagApi.php b/lib/Api/LegacyWafTagApi.php deleted file mode 100644 index a1443f7e..00000000 --- a/lib/Api/LegacyWafTagApi.php +++ /dev/null @@ -1,512 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation listLegacyWafTags - * - * List WAF tags - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `rules`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function listLegacyWafTags($options) - { - list($response) = $this->listLegacyWafTagsWithHttpInfo($options); - return $response; - } - - /** - * Operation listLegacyWafTagsWithHttpInfo - * - * List WAF tags - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `rules`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listLegacyWafTagsWithHttpInfo($options) - { - $request = $this->listLegacyWafTagsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listLegacyWafTagsAsync - * - * List WAF tags - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `rules`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listLegacyWafTagsAsync($options) - { - return $this->listLegacyWafTagsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listLegacyWafTagsAsyncWithHttpInfo - * - * List WAF tags - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `rules`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listLegacyWafTagsAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->listLegacyWafTagsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listLegacyWafTags' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `rules`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listLegacyWafTagsRequest($options) - { - // unbox the parameters from the associative array - $filter_name = array_key_exists('filter_name', $options) ? $options['filter_name'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafTagApi.listLegacyWafTags, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafTagApi.listLegacyWafTags, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/wafs/tags'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter_name !== null) { - if('form' === 'form' && is_array($filter_name)) { - foreach($filter_name as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[name]'] = ObjectSerializer::toString($filter_name); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/ProductAiAcceleratorApi.php b/lib/Api/ProductAiAcceleratorApi.php new file mode 100644 index 00000000..c5cbf3a0 --- /dev/null +++ b/lib/Api/ProductAiAcceleratorApi.php @@ -0,0 +1,991 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductAiAccelerator + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductAiAccelerator($options) + { + $this->disableProductAiAcceleratorWithHttpInfo($options); + } + + /** + * Operation disableProductAiAcceleratorWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductAiAcceleratorWithHttpInfo($options) + { + $request = $this->disableProductAiAcceleratorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductAiAcceleratorAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductAiAcceleratorAsync($options) + { + return $this->disableProductAiAcceleratorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductAiAcceleratorAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductAiAcceleratorAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductAiAcceleratorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductAiAccelerator' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductAiAcceleratorRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/ai_accelerator'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableAiAccelerator + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\AiAcceleratorResponseBodyEnable + */ + public function enableAiAccelerator($options) + { + list($response) = $this->enableAiAcceleratorWithHttpInfo($options); + return $response; + } + + /** + * Operation enableAiAcceleratorWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\AiAcceleratorResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableAiAcceleratorWithHttpInfo($options) + { + $request = $this->enableAiAcceleratorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\AiAcceleratorResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\AiAcceleratorResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\AiAcceleratorResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\AiAcceleratorResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableAiAcceleratorAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableAiAcceleratorAsync($options) + { + return $this->enableAiAcceleratorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableAiAcceleratorAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableAiAcceleratorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\AiAcceleratorResponseBodyEnable'; + $request = $this->enableAiAcceleratorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableAiAccelerator' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableAiAcceleratorRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/ai_accelerator'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getAiAccelerator + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\AiAcceleratorResponseBodyEnable + */ + public function getAiAccelerator($options) + { + list($response) = $this->getAiAcceleratorWithHttpInfo($options); + return $response; + } + + /** + * Operation getAiAcceleratorWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\AiAcceleratorResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getAiAcceleratorWithHttpInfo($options) + { + $request = $this->getAiAcceleratorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\AiAcceleratorResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\AiAcceleratorResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\AiAcceleratorResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\AiAcceleratorResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAiAcceleratorAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAiAcceleratorAsync($options) + { + return $this->getAiAcceleratorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAiAcceleratorAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAiAcceleratorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\AiAcceleratorResponseBodyEnable'; + $request = $this->getAiAcceleratorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAiAccelerator' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAiAcceleratorRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/ai_accelerator'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/LegacyWafRulesetApi.php b/lib/Api/ProductBotManagementApi.php similarity index 75% rename from lib/Api/LegacyWafRulesetApi.php rename to lib/Api/ProductBotManagementApi.php index d7a9d986..bee3282a 100644 --- a/lib/Api/LegacyWafRulesetApi.php +++ b/lib/Api/ProductBotManagementApi.php @@ -1,6 +1,6 @@ getWafRulesetWithHttpInfo($options); - return $response; + $this->disableProductBotManagementWithHttpInfo($options); } /** - * Operation getWafRulesetWithHttpInfo + * Operation disableProductBotManagementWithHttpInfo * - * Get a WAF ruleset + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -144,16 +141,14 @@ public function getWafRuleset($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getWafRulesetWithHttpInfo($options) + public function disableProductBotManagementWithHttpInfo($options) { - $request = $this->getWafRulesetRequest($options); + $request = $this->disableProductBotManagementRequest($options); try { $options = $this->createHttpClientOption(); @@ -175,7 +170,7 @@ public function getWafRulesetWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -202,53 +197,19 @@ public function getWafRulesetWithHttpInfo($options) ); } - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation getWafRulesetAsync + * Operation disableProductBotManagementAsync * - * Get a WAF ruleset + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -256,15 +217,13 @@ public function getWafRulesetWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafRulesetAsync($options) + public function disableProductBotManagementAsync($options) { - return $this->getWafRulesetAsyncWithHttpInfo($options) + return $this->disableProductBotManagementAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -273,9 +232,9 @@ function ($response) { } /** - * Operation getWafRulesetAsyncWithHttpInfo + * Operation disableProductBotManagementAsyncWithHttpInfo * - * Get a WAF ruleset + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -283,32 +242,20 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafRulesetAsyncWithHttpInfo($options) + public function disableProductBotManagementAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getWafRulesetRequest($options); + $returnType = ''; + $request = $this->disableProductBotManagementRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -328,7 +275,7 @@ function ($exception) { } /** - * Create request for operation 'getWafRuleset' + * Create request for operation 'disableProductBotManagement' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -336,32 +283,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getWafRulesetRequest($options) + public function disableProductBotManagementRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getWafRuleset' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafRuleset' + 'Missing the required parameter $service_id when calling disableProductBotManagement' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/ruleset'; + $resourcePath = '/enabled-products/v1/bot_management/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -378,23 +316,15 @@ public function getWafRulesetRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + [], [] ); } @@ -449,7 +379,7 @@ public function getWafRulesetRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -457,9 +387,9 @@ public function getWafRulesetRequest($options) } /** - * Operation getWafRulesetVcl + * Operation enableProductBotManagement * - * Generate WAF ruleset VCL + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -467,23 +397,21 @@ public function getWafRulesetRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\BotManagementResponseBodyEnable */ - public function getWafRulesetVcl($options) + public function enableProductBotManagement($options) { - list($response) = $this->getWafRulesetVclWithHttpInfo($options); + list($response) = $this->enableProductBotManagementWithHttpInfo($options); return $response; } /** - * Operation getWafRulesetVclWithHttpInfo + * Operation enableProductBotManagementWithHttpInfo * - * Generate WAF ruleset VCL + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -491,16 +419,14 @@ public function getWafRulesetVcl($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\BotManagementResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function getWafRulesetVclWithHttpInfo($options) + public function enableProductBotManagementWithHttpInfo($options) { - $request = $this->getWafRulesetVclRequest($options); + $request = $this->enableProductBotManagementRequest($options); try { $options = $this->createHttpClientOption(); @@ -522,7 +448,7 @@ public function getWafRulesetVclWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -550,21 +476,21 @@ public function getWafRulesetVclWithHttpInfo($options) } switch($statusCode) { - case 202: - if ('object' === '\SplFileObject') { + case 200: + if ('\Fastly\Model\BotManagementResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\BotManagementResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\BotManagementResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -579,10 +505,10 @@ public function getWafRulesetVclWithHttpInfo($options) } catch (ApiException $e) { switch ($e->getCode()) { - case 202: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\BotManagementResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -593,9 +519,9 @@ public function getWafRulesetVclWithHttpInfo($options) } /** - * Operation getWafRulesetVclAsync + * Operation enableProductBotManagementAsync * - * Generate WAF ruleset VCL + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -603,15 +529,13 @@ public function getWafRulesetVclWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafRulesetVclAsync($options) + public function enableProductBotManagementAsync($options) { - return $this->getWafRulesetVclAsyncWithHttpInfo($options) + return $this->enableProductBotManagementAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -620,9 +544,9 @@ function ($response) { } /** - * Operation getWafRulesetVclAsyncWithHttpInfo + * Operation enableProductBotManagementAsyncWithHttpInfo * - * Generate WAF ruleset VCL + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -630,16 +554,14 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafRulesetVclAsyncWithHttpInfo($options) + public function enableProductBotManagementAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getWafRulesetVclRequest($options); + $returnType = '\Fastly\Model\BotManagementResponseBodyEnable'; + $request = $this->enableProductBotManagementRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -675,7 +597,7 @@ function ($exception) { } /** - * Create request for operation 'getWafRulesetVcl' + * Create request for operation 'enableProductBotManagement' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -683,32 +605,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getWafRulesetVclRequest($options) + public function enableProductBotManagementRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getWafRulesetVcl' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafRulesetVcl' + 'Missing the required parameter $service_id when calling enableProductBotManagement' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/ruleset/preview'; + $resourcePath = '/enabled-products/v1/bot_management/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -725,23 +638,15 @@ public function getWafRulesetVclRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -796,7 +701,7 @@ public function getWafRulesetVclRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -804,9 +709,9 @@ public function getWafRulesetVclRequest($options) } /** - * Operation updateWafRuleset + * Operation getProductBotManagement * - * Update a WAF ruleset + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -814,24 +719,21 @@ public function getWafRulesetVclRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body request_body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\BotManagementResponseBodyEnable */ - public function updateWafRuleset($options) + public function getProductBotManagement($options) { - list($response) = $this->updateWafRulesetWithHttpInfo($options); + list($response) = $this->getProductBotManagementWithHttpInfo($options); return $response; } /** - * Operation updateWafRulesetWithHttpInfo + * Operation getProductBotManagementWithHttpInfo * - * Update a WAF ruleset + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -839,17 +741,14 @@ public function updateWafRuleset($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\BotManagementResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function updateWafRulesetWithHttpInfo($options) + public function getProductBotManagementWithHttpInfo($options) { - $request = $this->updateWafRulesetRequest($options); + $request = $this->getProductBotManagementRequest($options); try { $options = $this->createHttpClientOption(); @@ -871,7 +770,7 @@ public function updateWafRulesetWithHttpInfo($options) ); } - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -899,21 +798,21 @@ public function updateWafRulesetWithHttpInfo($options) } switch($statusCode) { - case 202: - if ('object' === '\SplFileObject') { + case 200: + if ('\Fastly\Model\BotManagementResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\BotManagementResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\BotManagementResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -928,10 +827,10 @@ public function updateWafRulesetWithHttpInfo($options) } catch (ApiException $e) { switch ($e->getCode()) { - case 202: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\BotManagementResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -942,9 +841,9 @@ public function updateWafRulesetWithHttpInfo($options) } /** - * Operation updateWafRulesetAsync + * Operation getProductBotManagementAsync * - * Update a WAF ruleset + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -952,16 +851,13 @@ public function updateWafRulesetWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function updateWafRulesetAsync($options) + public function getProductBotManagementAsync($options) { - return $this->updateWafRulesetAsyncWithHttpInfo($options) + return $this->getProductBotManagementAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -970,9 +866,9 @@ function ($response) { } /** - * Operation updateWafRulesetAsyncWithHttpInfo + * Operation getProductBotManagementAsyncWithHttpInfo * - * Update a WAF ruleset + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -980,17 +876,14 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function updateWafRulesetAsyncWithHttpInfo($options) + public function getProductBotManagementAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->updateWafRulesetRequest($options); + $returnType = '\Fastly\Model\BotManagementResponseBodyEnable'; + $request = $this->getProductBotManagementRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1026,7 +919,7 @@ function ($exception) { } /** - * Create request for operation 'updateWafRuleset' + * Create request for operation 'getProductBotManagement' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1034,34 +927,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function updateWafRulesetRequest($options) + public function getProductBotManagementRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling updateWafRuleset' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafRuleset' + 'Missing the required parameter $service_id when calling getProductBotManagement' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/ruleset'; + $resourcePath = '/enabled-products/v1/bot_management/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1078,35 +960,21 @@ public function updateWafRulesetRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + ['application/json'], + [] ); } // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1155,7 +1023,7 @@ public function updateWafRulesetRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'PATCH', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/LegacyWafOwaspApi.php b/lib/Api/ProductBrotliCompressionApi.php similarity index 73% rename from lib/Api/LegacyWafOwaspApi.php rename to lib/Api/ProductBrotliCompressionApi.php index eef1985a..f5c8ef68 100644 --- a/lib/Api/LegacyWafOwaspApi.php +++ b/lib/Api/ProductBrotliCompressionApi.php @@ -1,6 +1,6 @@ $request_body request_body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return void */ - public function createOwaspSettings($options) + public function disableProductBrotliCompression($options) { - list($response) = $this->createOwaspSettingsWithHttpInfo($options); - return $response; + $this->disableProductBrotliCompressionWithHttpInfo($options); } /** - * Operation createOwaspSettingsWithHttpInfo + * Operation disableProductBrotliCompressionWithHttpInfo * - * Create an OWASP settings object + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -145,17 +141,14 @@ public function createOwaspSettings($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createOwaspSettingsWithHttpInfo($options) + public function disableProductBrotliCompressionWithHttpInfo($options) { - $request = $this->createOwaspSettingsRequest($options); + $request = $this->disableProductBrotliCompressionRequest($options); try { $options = $this->createHttpClientOption(); @@ -177,7 +170,7 @@ public function createOwaspSettingsWithHttpInfo($options) ); } - if ('POST' != 'GET' && 'POST' != 'HEAD') { + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -204,53 +197,19 @@ public function createOwaspSettingsWithHttpInfo($options) ); } - switch($statusCode) { - case 201: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation createOwaspSettingsAsync + * Operation disableProductBrotliCompressionAsync * - * Create an OWASP settings object + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -258,16 +217,13 @@ public function createOwaspSettingsWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function createOwaspSettingsAsync($options) + public function disableProductBrotliCompressionAsync($options) { - return $this->createOwaspSettingsAsyncWithHttpInfo($options) + return $this->disableProductBrotliCompressionAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -276,9 +232,9 @@ function ($response) { } /** - * Operation createOwaspSettingsAsyncWithHttpInfo + * Operation disableProductBrotliCompressionAsyncWithHttpInfo * - * Create an OWASP settings object + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -286,33 +242,20 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function createOwaspSettingsAsyncWithHttpInfo($options) + public function disableProductBrotliCompressionAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->createOwaspSettingsRequest($options); + $returnType = ''; + $request = $this->disableProductBrotliCompressionRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -332,7 +275,7 @@ function ($exception) { } /** - * Create request for operation 'createOwaspSettings' + * Create request for operation 'disableProductBrotliCompression' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -340,34 +283,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function createOwaspSettingsRequest($options) + public function disableProductBrotliCompressionRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling createOwaspSettings' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling createOwaspSettings' + 'Missing the required parameter $service_id when calling disableProductBrotliCompression' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/owasp'; + $resourcePath = '/enabled-products/v1/brotli_compression/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -384,35 +316,21 @@ public function createOwaspSettingsRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + [], + [] ); } // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -461,7 +379,7 @@ public function createOwaspSettingsRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'POST', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -469,9 +387,9 @@ public function createOwaspSettingsRequest($options) } /** - * Operation getOwaspSettings + * Operation enableProductBrotliCompression * - * Get the OWASP settings object + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -479,23 +397,21 @@ public function createOwaspSettingsRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\BrotliCompressionResponseBodyEnable */ - public function getOwaspSettings($options) + public function enableProductBrotliCompression($options) { - list($response) = $this->getOwaspSettingsWithHttpInfo($options); + list($response) = $this->enableProductBrotliCompressionWithHttpInfo($options); return $response; } /** - * Operation getOwaspSettingsWithHttpInfo + * Operation enableProductBrotliCompressionWithHttpInfo * - * Get the OWASP settings object + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -503,16 +419,14 @@ public function getOwaspSettings($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\BrotliCompressionResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function getOwaspSettingsWithHttpInfo($options) + public function enableProductBrotliCompressionWithHttpInfo($options) { - $request = $this->getOwaspSettingsRequest($options); + $request = $this->enableProductBrotliCompressionRequest($options); try { $options = $this->createHttpClientOption(); @@ -534,7 +448,7 @@ public function getOwaspSettingsWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -563,20 +477,20 @@ public function getOwaspSettingsWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\BrotliCompressionResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\BrotliCompressionResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\BrotliCompressionResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -594,7 +508,7 @@ public function getOwaspSettingsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\BrotliCompressionResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -605,9 +519,9 @@ public function getOwaspSettingsWithHttpInfo($options) } /** - * Operation getOwaspSettingsAsync + * Operation enableProductBrotliCompressionAsync * - * Get the OWASP settings object + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -615,15 +529,13 @@ public function getOwaspSettingsWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getOwaspSettingsAsync($options) + public function enableProductBrotliCompressionAsync($options) { - return $this->getOwaspSettingsAsyncWithHttpInfo($options) + return $this->enableProductBrotliCompressionAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -632,9 +544,9 @@ function ($response) { } /** - * Operation getOwaspSettingsAsyncWithHttpInfo + * Operation enableProductBrotliCompressionAsyncWithHttpInfo * - * Get the OWASP settings object + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -642,16 +554,14 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getOwaspSettingsAsyncWithHttpInfo($options) + public function enableProductBrotliCompressionAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getOwaspSettingsRequest($options); + $returnType = '\Fastly\Model\BrotliCompressionResponseBodyEnable'; + $request = $this->enableProductBrotliCompressionRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -687,7 +597,7 @@ function ($exception) { } /** - * Create request for operation 'getOwaspSettings' + * Create request for operation 'enableProductBrotliCompression' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -695,32 +605,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getOwaspSettingsRequest($options) + public function enableProductBrotliCompressionRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getOwaspSettings' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getOwaspSettings' + 'Missing the required parameter $service_id when calling enableProductBrotliCompression' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/owasp'; + $resourcePath = '/enabled-products/v1/brotli_compression/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -737,23 +638,15 @@ public function getOwaspSettingsRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -808,7 +701,7 @@ public function getOwaspSettingsRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -816,9 +709,9 @@ public function getOwaspSettingsRequest($options) } /** - * Operation updateOwaspSettings + * Operation getProductBrotliCompression * - * Update the OWASP settings object + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -826,24 +719,21 @@ public function getOwaspSettingsRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body request_body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\BrotliCompressionResponseBodyEnable */ - public function updateOwaspSettings($options) + public function getProductBrotliCompression($options) { - list($response) = $this->updateOwaspSettingsWithHttpInfo($options); + list($response) = $this->getProductBrotliCompressionWithHttpInfo($options); return $response; } /** - * Operation updateOwaspSettingsWithHttpInfo + * Operation getProductBrotliCompressionWithHttpInfo * - * Update the OWASP settings object + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -851,17 +741,14 @@ public function updateOwaspSettings($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\BrotliCompressionResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function updateOwaspSettingsWithHttpInfo($options) + public function getProductBrotliCompressionWithHttpInfo($options) { - $request = $this->updateOwaspSettingsRequest($options); + $request = $this->getProductBrotliCompressionRequest($options); try { $options = $this->createHttpClientOption(); @@ -883,7 +770,7 @@ public function updateOwaspSettingsWithHttpInfo($options) ); } - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -912,20 +799,20 @@ public function updateOwaspSettingsWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\BrotliCompressionResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\BrotliCompressionResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\BrotliCompressionResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -943,7 +830,7 @@ public function updateOwaspSettingsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\BrotliCompressionResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -954,9 +841,9 @@ public function updateOwaspSettingsWithHttpInfo($options) } /** - * Operation updateOwaspSettingsAsync + * Operation getProductBrotliCompressionAsync * - * Update the OWASP settings object + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -964,16 +851,13 @@ public function updateOwaspSettingsWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function updateOwaspSettingsAsync($options) + public function getProductBrotliCompressionAsync($options) { - return $this->updateOwaspSettingsAsyncWithHttpInfo($options) + return $this->getProductBrotliCompressionAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -982,9 +866,9 @@ function ($response) { } /** - * Operation updateOwaspSettingsAsyncWithHttpInfo + * Operation getProductBrotliCompressionAsyncWithHttpInfo * - * Update the OWASP settings object + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -992,17 +876,14 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function updateOwaspSettingsAsyncWithHttpInfo($options) + public function getProductBrotliCompressionAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->updateOwaspSettingsRequest($options); + $returnType = '\Fastly\Model\BrotliCompressionResponseBodyEnable'; + $request = $this->getProductBrotliCompressionRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1038,7 +919,7 @@ function ($exception) { } /** - * Create request for operation 'updateOwaspSettings' + * Create request for operation 'getProductBrotliCompression' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1046,34 +927,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param array $request_body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function updateOwaspSettingsRequest($options) + public function getProductBrotliCompressionRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling updateOwaspSettings' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateOwaspSettings' + 'Missing the required parameter $service_id when calling getProductBrotliCompression' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/owasp'; + $resourcePath = '/enabled-products/v1/brotli_compression/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1090,35 +960,21 @@ public function updateOwaspSettingsRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + ['application/json'], + [] ); } // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1167,7 +1023,7 @@ public function updateOwaspSettingsRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'PATCH', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/LegacyWafRuleApi.php b/lib/Api/ProductDdosProtectionApi.php similarity index 64% rename from lib/Api/LegacyWafRuleApi.php rename to lib/Api/ProductDdosProtectionApi.php index 756f2551..4dfaf0c7 100644 --- a/lib/Api/LegacyWafRuleApi.php +++ b/lib/Api/ProductDdosProtectionApi.php @@ -1,6 +1,6 @@ getLegacyWafFirewallRuleVclWithHttpInfo($options); + $this->disableProductDdosProtectionWithHttpInfo($options); + } + + /** + * Operation disableProductDdosProtectionWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductDdosProtectionWithHttpInfo($options) + { + $request = $this->disableProductDdosProtectionRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductDdosProtectionAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductDdosProtectionAsync($options) + { + return $this->disableProductDdosProtectionAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductDdosProtectionAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductDdosProtectionAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductDdosProtectionRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductDdosProtection' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductDdosProtectionRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductDdosProtection' + ); + } + + $resourcePath = '/enabled-products/v1/ddos_protection/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductDdosProtection + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DdosProtectionResponseEnable + */ + public function enableProductDdosProtection($options) + { + list($response) = $this->enableProductDdosProtectionWithHttpInfo($options); return $response; } /** - * Operation getLegacyWafFirewallRuleVclWithHttpInfo + * Operation enableProductDdosProtectionWithHttpInfo * - * Get VCL for a rule associated with a firewall + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionResponseEnable, HTTP status code, HTTP response headers (array of strings) */ - public function getLegacyWafFirewallRuleVclWithHttpInfo($options) + public function enableProductDdosProtectionWithHttpInfo($options) { - $request = $this->getLegacyWafFirewallRuleVclRequest($options); + $request = $this->enableProductDdosProtectionRequest($options); try { $options = $this->createHttpClientOption(); @@ -175,7 +448,7 @@ public function getLegacyWafFirewallRuleVclWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -204,20 +477,20 @@ public function getLegacyWafFirewallRuleVclWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\DdosProtectionResponseEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionResponseEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\DdosProtectionResponseEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -235,7 +508,7 @@ public function getLegacyWafFirewallRuleVclWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\DdosProtectionResponseEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -246,25 +519,23 @@ public function getLegacyWafFirewallRuleVclWithHttpInfo($options) } /** - * Operation getLegacyWafFirewallRuleVclAsync + * Operation enableProductDdosProtectionAsync * - * Get VCL for a rule associated with a firewall + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getLegacyWafFirewallRuleVclAsync($options) + public function enableProductDdosProtectionAsync($options) { - return $this->getLegacyWafFirewallRuleVclAsyncWithHttpInfo($options) + return $this->enableProductDdosProtectionAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -273,26 +544,24 @@ function ($response) { } /** - * Operation getLegacyWafFirewallRuleVclAsyncWithHttpInfo + * Operation enableProductDdosProtectionAsyncWithHttpInfo * - * Get VCL for a rule associated with a firewall + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getLegacyWafFirewallRuleVclAsyncWithHttpInfo($options) + public function enableProductDdosProtectionAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getLegacyWafFirewallRuleVclRequest($options); + $returnType = '\Fastly\Model\DdosProtectionResponseEnable'; + $request = $this->enableProductDdosProtectionRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -328,40 +597,31 @@ function ($exception) { } /** - * Create request for operation 'getLegacyWafFirewallRuleVcl' + * Create request for operation 'enableProductDdosProtection' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getLegacyWafFirewallRuleVclRequest($options) + public function enableProductDdosProtectionRequest($options) { // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getLegacyWafFirewallRuleVcl' - ); - } - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getLegacyWafFirewallRuleVcl' + 'Missing the required parameter $service_id when calling enableProductDdosProtection' ); } - $resourcePath = '/wafs/{firewall_id}/rules/{waf_rule_id}/vcl'; + $resourcePath = '/enabled-products/v1/ddos_protection/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -371,18 +631,10 @@ public function getLegacyWafFirewallRuleVclRequest($options) // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($waf_rule_id !== null) { + if ($service_id !== null) { $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), $resourcePath ); } @@ -390,11 +642,11 @@ public function getLegacyWafFirewallRuleVclRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -449,7 +701,7 @@ public function getLegacyWafFirewallRuleVclRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -457,52 +709,46 @@ public function getLegacyWafFirewallRuleVclRequest($options) } /** - * Operation getLegacyWafRule + * Operation getProductDdosProtection * - * Get a rule + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_configuration_set_id Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. (optional) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\DdosProtectionResponseEnable */ - public function getLegacyWafRule($options) + public function getProductDdosProtection($options) { - list($response) = $this->getLegacyWafRuleWithHttpInfo($options); + list($response) = $this->getProductDdosProtectionWithHttpInfo($options); return $response; } /** - * Operation getLegacyWafRuleWithHttpInfo + * Operation getProductDdosProtectionWithHttpInfo * - * Get a rule + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_configuration_set_id Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. (optional) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionResponseEnable, HTTP status code, HTTP response headers (array of strings) */ - public function getLegacyWafRuleWithHttpInfo($options) + public function getProductDdosProtectionWithHttpInfo($options) { - $request = $this->getLegacyWafRuleRequest($options); + $request = $this->getProductDdosProtectionRequest($options); try { $options = $this->createHttpClientOption(); @@ -553,20 +799,20 @@ public function getLegacyWafRuleWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\DdosProtectionResponseEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionResponseEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\DdosProtectionResponseEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -584,7 +830,7 @@ public function getLegacyWafRuleWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\DdosProtectionResponseEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -595,26 +841,23 @@ public function getLegacyWafRuleWithHttpInfo($options) } /** - * Operation getLegacyWafRuleAsync + * Operation getProductDdosProtectionAsync * - * Get a rule + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_configuration_set_id Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. (optional) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getLegacyWafRuleAsync($options) + public function getProductDdosProtectionAsync($options) { - return $this->getLegacyWafRuleAsyncWithHttpInfo($options) + return $this->getProductDdosProtectionAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -623,27 +866,24 @@ function ($response) { } /** - * Operation getLegacyWafRuleAsyncWithHttpInfo + * Operation getProductDdosProtectionAsyncWithHttpInfo * - * Get a rule + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_configuration_set_id Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. (optional) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getLegacyWafRuleAsyncWithHttpInfo($options) + public function getProductDdosProtectionAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getLegacyWafRuleRequest($options); + $returnType = '\Fastly\Model\DdosProtectionResponseEnable'; + $request = $this->getProductDdosProtectionRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -679,71 +919,44 @@ function ($exception) { } /** - * Create request for operation 'getLegacyWafRule' + * Create request for operation 'getProductDdosProtection' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_configuration_set_id Optional. Limit rule to a specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, `source`, and `vcl`. (optional) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getLegacyWafRuleRequest($options) + public function getProductDdosProtectionRequest($options) { // unbox the parameters from the associative array - $filter_configuration_set_id = array_key_exists('filter_configuration_set_id', $options) ? $options['filter_configuration_set_id'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getLegacyWafRule' + 'Missing the required parameter $service_id when calling getProductDdosProtection' ); } - $resourcePath = '/wafs/rules/{waf_rule_id}'; + $resourcePath = '/enabled-products/v1/ddos_protection/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($filter_configuration_set_id !== null) { - if('form' === 'form' && is_array($filter_configuration_set_id)) { - foreach($filter_configuration_set_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[configuration_set_id]'] = ObjectSerializer::toString($filter_configuration_set_id); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } // path params - if ($waf_rule_id !== null) { + if ($service_id !== null) { $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), $resourcePath ); } @@ -751,11 +964,11 @@ public function getLegacyWafRuleRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -818,48 +1031,46 @@ public function getLegacyWafRuleRequest($options) } /** - * Operation getLegacyWafRuleVcl + * Operation getProductDdosProtectionConfiguration * - * Get VCL for a rule + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\DdosProtectionResponseConfigure */ - public function getLegacyWafRuleVcl($options) + public function getProductDdosProtectionConfiguration($options) { - list($response) = $this->getLegacyWafRuleVclWithHttpInfo($options); + list($response) = $this->getProductDdosProtectionConfigurationWithHttpInfo($options); return $response; } /** - * Operation getLegacyWafRuleVclWithHttpInfo + * Operation getProductDdosProtectionConfigurationWithHttpInfo * - * Get VCL for a rule + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionResponseConfigure, HTTP status code, HTTP response headers (array of strings) */ - public function getLegacyWafRuleVclWithHttpInfo($options) + public function getProductDdosProtectionConfigurationWithHttpInfo($options) { - $request = $this->getLegacyWafRuleVclRequest($options); + $request = $this->getProductDdosProtectionConfigurationRequest($options); try { $options = $this->createHttpClientOption(); @@ -910,20 +1121,20 @@ public function getLegacyWafRuleVclWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\DdosProtectionResponseConfigure' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionResponseConfigure', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\DdosProtectionResponseConfigure'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -941,7 +1152,7 @@ public function getLegacyWafRuleVclWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\DdosProtectionResponseConfigure', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -952,24 +1163,23 @@ public function getLegacyWafRuleVclWithHttpInfo($options) } /** - * Operation getLegacyWafRuleVclAsync + * Operation getProductDdosProtectionConfigurationAsync * - * Get VCL for a rule + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getLegacyWafRuleVclAsync($options) + public function getProductDdosProtectionConfigurationAsync($options) { - return $this->getLegacyWafRuleVclAsyncWithHttpInfo($options) + return $this->getProductDdosProtectionConfigurationAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -978,25 +1188,24 @@ function ($response) { } /** - * Operation getLegacyWafRuleVclAsyncWithHttpInfo + * Operation getProductDdosProtectionConfigurationAsyncWithHttpInfo * - * Get VCL for a rule + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getLegacyWafRuleVclAsyncWithHttpInfo($options) + public function getProductDdosProtectionConfigurationAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getLegacyWafRuleVclRequest($options); + $returnType = '\Fastly\Model\DdosProtectionResponseConfigure'; + $request = $this->getProductDdosProtectionConfigurationRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1032,32 +1241,31 @@ function ($exception) { } /** - * Create request for operation 'getLegacyWafRuleVcl' + * Create request for operation 'getProductDdosProtectionConfiguration' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getLegacyWafRuleVclRequest($options) + public function getProductDdosProtectionConfigurationRequest($options) { // unbox the parameters from the associative array - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getLegacyWafRuleVcl' + 'Missing the required parameter $service_id when calling getProductDdosProtectionConfiguration' ); } - $resourcePath = '/wafs/rules/{waf_rule_id}/vcl'; + $resourcePath = '/enabled-products/v1/ddos_protection/services/{service_id}/configuration'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1067,10 +1275,10 @@ public function getLegacyWafRuleVclRequest($options) // path params - if ($waf_rule_id !== null) { + if ($service_id !== null) { $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), $resourcePath ); } @@ -1078,11 +1286,11 @@ public function getLegacyWafRuleVclRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -1145,60 +1353,48 @@ public function getLegacyWafRuleVclRequest($options) } /** - * Operation listLegacyWafRules + * Operation setProductDdosProtectionConfiguration * - * List rules in the latest configuration set + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_rule_id Limit the returned rules to a specific rule ID. (optional) - * @param string $filter_severity Limit the returned rules to a specific severity. (optional) - * @param string $filter_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_configuration_set_id Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestUpdateConfiguration $ddos_protection_request_update_configuration ddos_protection_request_update_configuration (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object[] - * @deprecated + * @return \Fastly\Model\DdosProtectionResponseConfigure */ - public function listLegacyWafRules($options) + public function setProductDdosProtectionConfiguration($options) { - list($response) = $this->listLegacyWafRulesWithHttpInfo($options); + list($response) = $this->setProductDdosProtectionConfigurationWithHttpInfo($options); return $response; } /** - * Operation listLegacyWafRulesWithHttpInfo + * Operation setProductDdosProtectionConfigurationWithHttpInfo * - * List rules in the latest configuration set + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_rule_id Limit the returned rules to a specific rule ID. (optional) - * @param string $filter_severity Limit the returned rules to a specific severity. (optional) - * @param string $filter_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_configuration_set_id Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestUpdateConfiguration $ddos_protection_request_update_configuration (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object[], HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionResponseConfigure, HTTP status code, HTTP response headers (array of strings) */ - public function listLegacyWafRulesWithHttpInfo($options) + public function setProductDdosProtectionConfigurationWithHttpInfo($options) { - $request = $this->listLegacyWafRulesRequest($options); + $request = $this->setProductDdosProtectionConfigurationRequest($options); try { $options = $this->createHttpClientOption(); @@ -1220,7 +1416,7 @@ public function listLegacyWafRulesWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -1249,20 +1445,20 @@ public function listLegacyWafRulesWithHttpInfo($options) switch($statusCode) { case 200: - if ('object[]' === '\SplFileObject') { + if ('\Fastly\Model\DdosProtectionResponseConfigure' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object[]', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionResponseConfigure', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object[]'; + $returnType = '\Fastly\Model\DdosProtectionResponseConfigure'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1280,7 +1476,7 @@ public function listLegacyWafRulesWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object[]', + '\Fastly\Model\DdosProtectionResponseConfigure', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1291,30 +1487,24 @@ public function listLegacyWafRulesWithHttpInfo($options) } /** - * Operation listLegacyWafRulesAsync + * Operation setProductDdosProtectionConfigurationAsync * - * List rules in the latest configuration set + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_rule_id Limit the returned rules to a specific rule ID. (optional) - * @param string $filter_severity Limit the returned rules to a specific severity. (optional) - * @param string $filter_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_configuration_set_id Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestUpdateConfiguration $ddos_protection_request_update_configuration (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listLegacyWafRulesAsync($options) + public function setProductDdosProtectionConfigurationAsync($options) { - return $this->listLegacyWafRulesAsyncWithHttpInfo($options) + return $this->setProductDdosProtectionConfigurationAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1323,31 +1513,25 @@ function ($response) { } /** - * Operation listLegacyWafRulesAsyncWithHttpInfo + * Operation setProductDdosProtectionConfigurationAsyncWithHttpInfo * - * List rules in the latest configuration set + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_rule_id Limit the returned rules to a specific rule ID. (optional) - * @param string $filter_severity Limit the returned rules to a specific severity. (optional) - * @param string $filter_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_configuration_set_id Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestUpdateConfiguration $ddos_protection_request_update_configuration (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listLegacyWafRulesAsyncWithHttpInfo($options) + public function setProductDdosProtectionConfigurationAsyncWithHttpInfo($options) { - $returnType = 'object[]'; - $request = $this->listLegacyWafRulesRequest($options); + $returnType = '\Fastly\Model\DdosProtectionResponseConfigure'; + $request = $this->setProductDdosProtectionConfigurationRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1383,145 +1567,70 @@ function ($exception) { } /** - * Create request for operation 'listLegacyWafRules' + * Create request for operation 'setProductDdosProtectionConfiguration' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_rule_id Limit the returned rules to a specific rule ID. (optional) - * @param string $filter_severity Limit the returned rules to a specific severity. (optional) - * @param string $filter_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_configuration_set_id Optional. Limit rules to specific configuration set or pass \"all\" to search all configuration sets, including stale ones. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. Comma separated values. Permitted values: `tags`, `rule_statuses`, and `source`. (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestUpdateConfiguration $ddos_protection_request_update_configuration (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function listLegacyWafRulesRequest($options) + public function setProductDdosProtectionConfigurationRequest($options) { // unbox the parameters from the associative array - $filter_rule_id = array_key_exists('filter_rule_id', $options) ? $options['filter_rule_id'] : null; - $filter_severity = array_key_exists('filter_severity', $options) ? $options['filter_severity'] : null; - $filter_tags_name = array_key_exists('filter_tags_name', $options) ? $options['filter_tags_name'] : null; - $filter_configuration_set_id = array_key_exists('filter_configuration_set_id', $options) ? $options['filter_configuration_set_id'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafRuleApi.listLegacyWafRules, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafRuleApi.listLegacyWafRules, must be bigger than or equal to 1.'); - } + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $ddos_protection_request_update_configuration = array_key_exists('ddos_protection_request_update_configuration', $options) ? $options['ddos_protection_request_update_configuration'] : null; + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling setProductDdosProtectionConfiguration' + ); + } - $resourcePath = '/wafs/rules'; + $resourcePath = '/enabled-products/v1/ddos_protection/services/{service_id}/configuration'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($filter_rule_id !== null) { - if('form' === 'form' && is_array($filter_rule_id)) { - foreach($filter_rule_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[rule_id]'] = ObjectSerializer::toString($filter_rule_id); - } - } - // query params - if ($filter_severity !== null) { - if('form' === 'form' && is_array($filter_severity)) { - foreach($filter_severity as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[severity]'] = ObjectSerializer::toString($filter_severity); - } - } - // query params - if ($filter_tags_name !== null) { - if('form' === 'form' && is_array($filter_tags_name)) { - foreach($filter_tags_name as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[tags][name]'] = ObjectSerializer::toString($filter_tags_name); - } - } - // query params - if ($filter_configuration_set_id !== null) { - if('form' === 'form' && is_array($filter_configuration_set_id)) { - foreach($filter_configuration_set_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[configuration_set_id]'] = ObjectSerializer::toString($filter_configuration_set_id); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] + ['application/json'], + ['application/json'] ); } // for model (json/xml) - if (count($formParams) > 0) { + if (isset($ddos_protection_request_update_configuration)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($ddos_protection_request_update_configuration)); + } else { + $httpBody = $ddos_protection_request_update_configuration; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1570,7 +1679,7 @@ public function listLegacyWafRulesRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'PATCH', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/ProductDomainInspectorApi.php b/lib/Api/ProductDomainInspectorApi.php new file mode 100644 index 00000000..677e3d48 --- /dev/null +++ b/lib/Api/ProductDomainInspectorApi.php @@ -0,0 +1,1051 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductDomainInspector + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductDomainInspector($options) + { + $this->disableProductDomainInspectorWithHttpInfo($options); + } + + /** + * Operation disableProductDomainInspectorWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductDomainInspectorWithHttpInfo($options) + { + $request = $this->disableProductDomainInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductDomainInspectorAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductDomainInspectorAsync($options) + { + return $this->disableProductDomainInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductDomainInspectorAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductDomainInspectorAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductDomainInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductDomainInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductDomainInspectorRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductDomainInspector' + ); + } + + $resourcePath = '/enabled-products/v1/domain_inspector/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductDomainInspector + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DomainInspectorResponseBodyEnable + */ + public function enableProductDomainInspector($options) + { + list($response) = $this->enableProductDomainInspectorWithHttpInfo($options); + return $response; + } + + /** + * Operation enableProductDomainInspectorWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DomainInspectorResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableProductDomainInspectorWithHttpInfo($options) + { + $request = $this->enableProductDomainInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DomainInspectorResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DomainInspectorResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DomainInspectorResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DomainInspectorResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableProductDomainInspectorAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductDomainInspectorAsync($options) + { + return $this->enableProductDomainInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableProductDomainInspectorAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductDomainInspectorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DomainInspectorResponseBodyEnable'; + $request = $this->enableProductDomainInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableProductDomainInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableProductDomainInspectorRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling enableProductDomainInspector' + ); + } + + $resourcePath = '/enabled-products/v1/domain_inspector/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProductDomainInspector + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DomainInspectorResponseBodyEnable + */ + public function getProductDomainInspector($options) + { + list($response) = $this->getProductDomainInspectorWithHttpInfo($options); + return $response; + } + + /** + * Operation getProductDomainInspectorWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DomainInspectorResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductDomainInspectorWithHttpInfo($options) + { + $request = $this->getProductDomainInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DomainInspectorResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DomainInspectorResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DomainInspectorResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DomainInspectorResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductDomainInspectorAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductDomainInspectorAsync($options) + { + return $this->getProductDomainInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductDomainInspectorAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductDomainInspectorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DomainInspectorResponseBodyEnable'; + $request = $this->getProductDomainInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProductDomainInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getProductDomainInspectorRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling getProductDomainInspector' + ); + } + + $resourcePath = '/enabled-products/v1/domain_inspector/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/LegacyWafUpdateStatusApi.php b/lib/Api/ProductFanoutApi.php similarity index 64% rename from lib/Api/LegacyWafUpdateStatusApi.php rename to lib/Api/ProductFanoutApi.php index 423bdc89..3a6a3ced 100644 --- a/lib/Api/LegacyWafUpdateStatusApi.php +++ b/lib/Api/ProductFanoutApi.php @@ -1,6 +1,6 @@ getWafUpdateStatusWithHttpInfo($options); + $this->disableProductFanoutWithHttpInfo($options); + } + + /** + * Operation disableProductFanoutWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductFanoutWithHttpInfo($options) + { + $request = $this->disableProductFanoutRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductFanoutAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductFanoutAsync($options) + { + return $this->disableProductFanoutAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductFanoutAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductFanoutAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductFanoutRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductFanout' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductFanoutRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductFanout' + ); + } + + $resourcePath = '/enabled-products/v1/fanout/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductFanout + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\FanoutResponseBodyEnable + */ + public function enableProductFanout($options) + { + list($response) = $this->enableProductFanoutWithHttpInfo($options); return $response; } /** - * Operation getWafUpdateStatusWithHttpInfo + * Operation enableProductFanoutWithHttpInfo * - * Get the status of a WAF update + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -145,17 +419,14 @@ public function getWafUpdateStatus($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $update_status_id Alphanumeric string identifying a WAF update status. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\FanoutResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function getWafUpdateStatusWithHttpInfo($options) + public function enableProductFanoutWithHttpInfo($options) { - $request = $this->getWafUpdateStatusRequest($options); + $request = $this->enableProductFanoutRequest($options); try { $options = $this->createHttpClientOption(); @@ -177,7 +448,7 @@ public function getWafUpdateStatusWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -206,20 +477,20 @@ public function getWafUpdateStatusWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\FanoutResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\FanoutResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\FanoutResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -237,7 +508,7 @@ public function getWafUpdateStatusWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\FanoutResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -248,9 +519,9 @@ public function getWafUpdateStatusWithHttpInfo($options) } /** - * Operation getWafUpdateStatusAsync + * Operation enableProductFanoutAsync * - * Get the status of a WAF update + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -258,16 +529,13 @@ public function getWafUpdateStatusWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $update_status_id Alphanumeric string identifying a WAF update status. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafUpdateStatusAsync($options) + public function enableProductFanoutAsync($options) { - return $this->getWafUpdateStatusAsyncWithHttpInfo($options) + return $this->enableProductFanoutAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -276,9 +544,9 @@ function ($response) { } /** - * Operation getWafUpdateStatusAsyncWithHttpInfo + * Operation enableProductFanoutAsyncWithHttpInfo * - * Get the status of a WAF update + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -286,17 +554,14 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $update_status_id Alphanumeric string identifying a WAF update status. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafUpdateStatusAsyncWithHttpInfo($options) + public function enableProductFanoutAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->getWafUpdateStatusRequest($options); + $returnType = '\Fastly\Model\FanoutResponseBodyEnable'; + $request = $this->enableProductFanoutRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -332,7 +597,7 @@ function ($exception) { } /** - * Create request for operation 'getWafUpdateStatus' + * Create request for operation 'enableProductFanout' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -340,40 +605,23 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) - * @param string $update_status_id Alphanumeric string identifying a WAF update status. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getWafUpdateStatusRequest($options) + public function enableProductFanoutRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $update_status_id = array_key_exists('update_status_id', $options) ? $options['update_status_id'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getWafUpdateStatus' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafUpdateStatus' - ); - } - // verify the required parameter 'update_status_id' is set - if ($update_status_id === null || (is_array($update_status_id) && count($update_status_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $update_status_id when calling getWafUpdateStatus' + 'Missing the required parameter $service_id when calling enableProductFanout' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/update_statuses/{update_status_id}'; + $resourcePath = '/enabled-products/v1/fanout/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -390,31 +638,15 @@ public function getWafUpdateStatusRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($update_status_id !== null) { - $resourcePath = str_replace( - '{' . 'update_status_id' . '}', - ObjectSerializer::toPathValue($update_status_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -469,7 +701,7 @@ public function getWafUpdateStatusRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -477,56 +709,46 @@ public function getWafUpdateStatusRequest($options) } /** - * Operation listWafUpdateStatuses + * Operation getProductFanout * - * List update statuses + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `waf`. (optional) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\FanoutResponseBodyEnable */ - public function listWafUpdateStatuses($options) + public function getProductFanout($options) { - list($response) = $this->listWafUpdateStatusesWithHttpInfo($options); + list($response) = $this->getProductFanoutWithHttpInfo($options); return $response; } /** - * Operation listWafUpdateStatusesWithHttpInfo + * Operation getProductFanoutWithHttpInfo * - * List update statuses + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `waf`. (optional) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\FanoutResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function listWafUpdateStatusesWithHttpInfo($options) + public function getProductFanoutWithHttpInfo($options) { - $request = $this->listWafUpdateStatusesRequest($options); + $request = $this->getProductFanoutRequest($options); try { $options = $this->createHttpClientOption(); @@ -577,20 +799,20 @@ public function listWafUpdateStatusesWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\FanoutResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\FanoutResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\FanoutResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -608,7 +830,7 @@ public function listWafUpdateStatusesWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\FanoutResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -619,28 +841,23 @@ public function listWafUpdateStatusesWithHttpInfo($options) } /** - * Operation listWafUpdateStatusesAsync + * Operation getProductFanoutAsync * - * List update statuses + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `waf`. (optional) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafUpdateStatusesAsync($options) + public function getProductFanoutAsync($options) { - return $this->listWafUpdateStatusesAsyncWithHttpInfo($options) + return $this->getProductFanoutAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -649,29 +866,24 @@ function ($response) { } /** - * Operation listWafUpdateStatusesAsyncWithHttpInfo + * Operation getProductFanoutAsyncWithHttpInfo * - * List update statuses + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `waf`. (optional) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafUpdateStatusesAsyncWithHttpInfo($options) + public function getProductFanoutAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->listWafUpdateStatusesRequest($options); + $returnType = '\Fastly\Model\FanoutResponseBodyEnable'; + $request = $this->getProductFanoutRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -707,92 +919,37 @@ function ($exception) { } /** - * Create request for operation 'listWafUpdateStatuses' + * Create request for operation 'getProductFanout' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma separated values. Permitted values: `waf`. (optional) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $firewall_id Alphanumeric string identifying a Firewall. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function listWafUpdateStatusesRequest($options) + public function getProductFanoutRequest($options) { // unbox the parameters from the associative array - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafUpdateStatusApi.listWafUpdateStatuses, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling LegacyWafUpdateStatusApi.listWafUpdateStatuses, must be bigger than or equal to 1.'); - } // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling listWafUpdateStatuses' - ); - } - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling listWafUpdateStatuses' + 'Missing the required parameter $service_id when calling getProductFanout' ); } - $resourcePath = '/service/{service_id}/wafs/{firewall_id}/update_statuses'; + $resourcePath = '/enabled-products/v1/fanout/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } // path params @@ -803,23 +960,15 @@ public function listWafUpdateStatusesRequest($options) $resourcePath ); } - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } diff --git a/lib/Api/ProductImageOptimizerApi.php b/lib/Api/ProductImageOptimizerApi.php new file mode 100644 index 00000000..00778dea --- /dev/null +++ b/lib/Api/ProductImageOptimizerApi.php @@ -0,0 +1,1051 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductImageOptimizer + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductImageOptimizer($options) + { + $this->disableProductImageOptimizerWithHttpInfo($options); + } + + /** + * Operation disableProductImageOptimizerWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductImageOptimizerWithHttpInfo($options) + { + $request = $this->disableProductImageOptimizerRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductImageOptimizerAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductImageOptimizerAsync($options) + { + return $this->disableProductImageOptimizerAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductImageOptimizerAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductImageOptimizerAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductImageOptimizerRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductImageOptimizer' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductImageOptimizerRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductImageOptimizer' + ); + } + + $resourcePath = '/enabled-products/v1/image_optimizer/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductImageOptimizer + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ImageOptimizerResponseBodyEnable + */ + public function enableProductImageOptimizer($options) + { + list($response) = $this->enableProductImageOptimizerWithHttpInfo($options); + return $response; + } + + /** + * Operation enableProductImageOptimizerWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ImageOptimizerResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableProductImageOptimizerWithHttpInfo($options) + { + $request = $this->enableProductImageOptimizerRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ImageOptimizerResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ImageOptimizerResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ImageOptimizerResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ImageOptimizerResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableProductImageOptimizerAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductImageOptimizerAsync($options) + { + return $this->enableProductImageOptimizerAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableProductImageOptimizerAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductImageOptimizerAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ImageOptimizerResponseBodyEnable'; + $request = $this->enableProductImageOptimizerRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableProductImageOptimizer' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableProductImageOptimizerRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling enableProductImageOptimizer' + ); + } + + $resourcePath = '/enabled-products/v1/image_optimizer/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProductImageOptimizer + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ImageOptimizerResponseBodyEnable + */ + public function getProductImageOptimizer($options) + { + list($response) = $this->getProductImageOptimizerWithHttpInfo($options); + return $response; + } + + /** + * Operation getProductImageOptimizerWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ImageOptimizerResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductImageOptimizerWithHttpInfo($options) + { + $request = $this->getProductImageOptimizerRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ImageOptimizerResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ImageOptimizerResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ImageOptimizerResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ImageOptimizerResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductImageOptimizerAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductImageOptimizerAsync($options) + { + return $this->getProductImageOptimizerAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductImageOptimizerAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductImageOptimizerAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ImageOptimizerResponseBodyEnable'; + $request = $this->getProductImageOptimizerRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProductImageOptimizer' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getProductImageOptimizerRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling getProductImageOptimizer' + ); + } + + $resourcePath = '/enabled-products/v1/image_optimizer/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/LegacyWafConfigurationSetsApi.php b/lib/Api/ProductLogExplorerInsightsApi.php similarity index 75% rename from lib/Api/LegacyWafConfigurationSetsApi.php rename to lib/Api/ProductLogExplorerInsightsApi.php index 791540b2..35982ba7 100644 --- a/lib/Api/LegacyWafConfigurationSetsApi.php +++ b/lib/Api/ProductLogExplorerInsightsApi.php @@ -1,6 +1,6 @@ listWafConfigSetsWithHttpInfo($options); - return $response; + $this->disableProductLogExplorerInsightsWithHttpInfo($options); } /** - * Operation listWafConfigSetsWithHttpInfo + * Operation disableProductLogExplorerInsightsWithHttpInfo * - * List configuration sets + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function listWafConfigSetsWithHttpInfo($options) + public function disableProductLogExplorerInsightsWithHttpInfo($options) { - $request = $this->listWafConfigSetsRequest($options); + $request = $this->disableProductLogExplorerInsightsRequest($options); try { $options = $this->createHttpClientOption(); @@ -171,7 +170,7 @@ public function listWafConfigSetsWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -198,67 +197,33 @@ public function listWafConfigSetsWithHttpInfo($options) ); } - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation listWafConfigSetsAsync + * Operation disableProductLogExplorerInsightsAsync * - * List configuration sets + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafConfigSetsAsync($options) + public function disableProductLogExplorerInsightsAsync($options) { - return $this->listWafConfigSetsAsyncWithHttpInfo($options) + return $this->disableProductLogExplorerInsightsAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -267,40 +232,30 @@ function ($response) { } /** - * Operation listWafConfigSetsAsyncWithHttpInfo + * Operation disableProductLogExplorerInsightsAsyncWithHttpInfo * - * List configuration sets + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafConfigSetsAsyncWithHttpInfo($options) + public function disableProductLogExplorerInsightsAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->listWafConfigSetsRequest($options); + $returnType = ''; + $request = $this->disableProductLogExplorerInsightsRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -320,24 +275,31 @@ function ($exception) { } /** - * Create request for operation 'listWafConfigSets' + * Create request for operation 'disableProductLogExplorerInsights' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function listWafConfigSetsRequest($options) + public function disableProductLogExplorerInsightsRequest($options) { // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductLogExplorerInsights' + ); + } - $resourcePath = '/wafs/configuration_sets'; + $resourcePath = '/enabled-products/v1/log_explorer_insights/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -346,15 +308,23 @@ public function listWafConfigSetsRequest($options) + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + [], [] ); } @@ -409,7 +379,7 @@ public function listWafConfigSetsRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -417,48 +387,46 @@ public function listWafConfigSetsRequest($options) } /** - * Operation listWafsConfigSet + * Operation enableProductLogExplorerInsights * - * List WAFs currently using a configuration set + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\LogExplorerInsightsResponseBodyEnable */ - public function listWafsConfigSet($options) + public function enableProductLogExplorerInsights($options) { - list($response) = $this->listWafsConfigSetWithHttpInfo($options); + list($response) = $this->enableProductLogExplorerInsightsWithHttpInfo($options); return $response; } /** - * Operation listWafsConfigSetWithHttpInfo + * Operation enableProductLogExplorerInsightsWithHttpInfo * - * List WAFs currently using a configuration set + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\LogExplorerInsightsResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function listWafsConfigSetWithHttpInfo($options) + public function enableProductLogExplorerInsightsWithHttpInfo($options) { - $request = $this->listWafsConfigSetRequest($options); + $request = $this->enableProductLogExplorerInsightsRequest($options); try { $options = $this->createHttpClientOption(); @@ -480,7 +448,7 @@ public function listWafsConfigSetWithHttpInfo($options) ); } - if ('GET' != 'GET' && 'GET' != 'HEAD') { + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -509,20 +477,20 @@ public function listWafsConfigSetWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\LogExplorerInsightsResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\LogExplorerInsightsResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\LogExplorerInsightsResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -540,7 +508,7 @@ public function listWafsConfigSetWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\LogExplorerInsightsResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -551,24 +519,23 @@ public function listWafsConfigSetWithHttpInfo($options) } /** - * Operation listWafsConfigSetAsync + * Operation enableProductLogExplorerInsightsAsync * - * List WAFs currently using a configuration set + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafsConfigSetAsync($options) + public function enableProductLogExplorerInsightsAsync($options) { - return $this->listWafsConfigSetAsyncWithHttpInfo($options) + return $this->enableProductLogExplorerInsightsAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -577,25 +544,24 @@ function ($response) { } /** - * Operation listWafsConfigSetAsyncWithHttpInfo + * Operation enableProductLogExplorerInsightsAsyncWithHttpInfo * - * List WAFs currently using a configuration set + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafsConfigSetAsyncWithHttpInfo($options) + public function enableProductLogExplorerInsightsAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->listWafsConfigSetRequest($options); + $returnType = '\Fastly\Model\LogExplorerInsightsResponseBodyEnable'; + $request = $this->enableProductLogExplorerInsightsRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -631,32 +597,31 @@ function ($exception) { } /** - * Create request for operation 'listWafsConfigSet' + * Create request for operation 'enableProductLogExplorerInsights' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function listWafsConfigSetRequest($options) + public function enableProductLogExplorerInsightsRequest($options) { // unbox the parameters from the associative array - $configuration_set_id = array_key_exists('configuration_set_id', $options) ? $options['configuration_set_id'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'configuration_set_id' is set - if ($configuration_set_id === null || (is_array($configuration_set_id) && count($configuration_set_id) === 0)) { + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $configuration_set_id when calling listWafsConfigSet' + 'Missing the required parameter $service_id when calling enableProductLogExplorerInsights' ); } - $resourcePath = '/wafs/configuration_sets/{configuration_set_id}/relationships/wafs'; + $resourcePath = '/enabled-products/v1/log_explorer_insights/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -666,10 +631,10 @@ public function listWafsConfigSetRequest($options) // path params - if ($configuration_set_id !== null) { + if ($service_id !== null) { $resourcePath = str_replace( - '{' . 'configuration_set_id' . '}', - ObjectSerializer::toPathValue($configuration_set_id), + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), $resourcePath ); } @@ -677,11 +642,11 @@ public function listWafsConfigSetRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } @@ -736,7 +701,7 @@ public function listWafsConfigSetRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -744,50 +709,46 @@ public function listWafsConfigSetRequest($options) } /** - * Operation useWafConfigSet + * Operation getProductLogExplorerInsights * - * Apply a configuration set to a WAF + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) - * @param array $request_body request_body (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object - * @deprecated + * @return \Fastly\Model\LogExplorerInsightsResponseBodyEnable */ - public function useWafConfigSet($options) + public function getProductLogExplorerInsights($options) { - list($response) = $this->useWafConfigSetWithHttpInfo($options); + list($response) = $this->getProductLogExplorerInsightsWithHttpInfo($options); return $response; } /** - * Operation useWafConfigSetWithHttpInfo + * Operation getProductLogExplorerInsightsWithHttpInfo * - * Apply a configuration set to a WAF + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) - * @param array $request_body (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\LogExplorerInsightsResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) */ - public function useWafConfigSetWithHttpInfo($options) + public function getProductLogExplorerInsightsWithHttpInfo($options) { - $request = $this->useWafConfigSetRequest($options); + $request = $this->getProductLogExplorerInsightsRequest($options); try { $options = $this->createHttpClientOption(); @@ -809,7 +770,7 @@ public function useWafConfigSetWithHttpInfo($options) ); } - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -838,20 +799,20 @@ public function useWafConfigSetWithHttpInfo($options) switch($statusCode) { case 200: - if ('object' === '\SplFileObject') { + if ('\Fastly\Model\LogExplorerInsightsResponseBodyEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\LogExplorerInsightsResponseBodyEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\LogExplorerInsightsResponseBodyEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -869,7 +830,7 @@ public function useWafConfigSetWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\LogExplorerInsightsResponseBodyEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -880,25 +841,23 @@ public function useWafConfigSetWithHttpInfo($options) } /** - * Operation useWafConfigSetAsync + * Operation getProductLogExplorerInsightsAsync * - * Apply a configuration set to a WAF + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) - * @param array $request_body (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function useWafConfigSetAsync($options) + public function getProductLogExplorerInsightsAsync($options) { - return $this->useWafConfigSetAsyncWithHttpInfo($options) + return $this->getProductLogExplorerInsightsAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -907,26 +866,24 @@ function ($response) { } /** - * Operation useWafConfigSetAsyncWithHttpInfo + * Operation getProductLogExplorerInsightsAsyncWithHttpInfo * - * Apply a configuration set to a WAF + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) - * @param array $request_body (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function useWafConfigSetAsyncWithHttpInfo($options) + public function getProductLogExplorerInsightsAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->useWafConfigSetRequest($options); + $returnType = '\Fastly\Model\LogExplorerInsightsResponseBodyEnable'; + $request = $this->getProductLogExplorerInsightsRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -962,34 +919,31 @@ function ($exception) { } /** - * Create request for operation 'useWafConfigSet' + * Create request for operation 'getProductLogExplorerInsights' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $configuration_set_id Alphanumeric string identifying a WAF configuration set. (required) - * @param array $request_body (optional) + * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function useWafConfigSetRequest($options) + public function getProductLogExplorerInsightsRequest($options) { // unbox the parameters from the associative array - $configuration_set_id = array_key_exists('configuration_set_id', $options) ? $options['configuration_set_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'configuration_set_id' is set - if ($configuration_set_id === null || (is_array($configuration_set_id) && count($configuration_set_id) === 0)) { + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $configuration_set_id when calling useWafConfigSet' + 'Missing the required parameter $service_id when calling getProductLogExplorerInsights' ); } - $resourcePath = '/wafs/configuration_sets/{configuration_set_id}/relationships/wafs'; + $resourcePath = '/enabled-products/v1/log_explorer_insights/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -999,10 +953,10 @@ public function useWafConfigSetRequest($options) // path params - if ($configuration_set_id !== null) { + if ($service_id !== null) { $resourcePath = str_replace( - '{' . 'configuration_set_id' . '}', - ObjectSerializer::toPathValue($configuration_set_id), + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), $resourcePath ); } @@ -1010,23 +964,17 @@ public function useWafConfigSetRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + ['application/json'], + [] ); } // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1075,7 +1023,7 @@ public function useWafConfigSetRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'PATCH', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/EnabledProductsApi.php b/lib/Api/ProductNgwafApi.php similarity index 80% rename from lib/Api/EnabledProductsApi.php rename to lib/Api/ProductNgwafApi.php index ab235269..317cad8f 100644 --- a/lib/Api/EnabledProductsApi.php +++ b/lib/Api/ProductNgwafApi.php @@ -1,6 +1,6 @@ disableProductWithHttpInfo($options); + $this->disableProductNgwafWithHttpInfo($options); } /** - * Operation disableProductWithHttpInfo + * Operation disableProductNgwafWithHttpInfo * - * Disable a product + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function disableProductWithHttpInfo($options) + public function disableProductNgwafWithHttpInfo($options) { - $request = $this->disableProductRequest($options); + $request = $this->disableProductNgwafRequest($options); try { $options = $this->createHttpClientOption(); @@ -209,24 +207,23 @@ public function disableProductWithHttpInfo($options) } /** - * Operation disableProductAsync + * Operation disableProductNgwafAsync * - * Disable a product + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableProductAsync($options) + public function disableProductNgwafAsync($options) { - return $this->disableProductAsyncWithHttpInfo($options) + return $this->disableProductNgwafAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -235,25 +232,24 @@ function ($response) { } /** - * Operation disableProductAsyncWithHttpInfo + * Operation disableProductNgwafAsyncWithHttpInfo * - * Disable a product + * Disable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function disableProductAsyncWithHttpInfo($options) + public function disableProductNgwafAsyncWithHttpInfo($options) { $returnType = ''; - $request = $this->disableProductRequest($options); + $request = $this->disableProductNgwafRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -279,39 +275,31 @@ function ($exception) { } /** - * Create request for operation 'disableProduct' + * Create request for operation 'disableProductNgwaf' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function disableProductRequest($options) + public function disableProductNgwafRequest($options) { // unbox the parameters from the associative array - $product_id = array_key_exists('product_id', $options) ? $options['product_id'] : null; $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'product_id' is set - if ($product_id === null || (is_array($product_id) && count($product_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $product_id when calling disableProduct' - ); - } // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling disableProduct' + 'Missing the required parameter $service_id when calling disableProductNgwaf' ); } - $resourcePath = '/enabled-products/v1/{product_id}/services/{service_id}'; + $resourcePath = '/enabled-products/v1/ngwaf/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -320,14 +308,6 @@ public function disableProductRequest($options) - // path params - if ($product_id !== null) { - $resourcePath = str_replace( - '{' . 'product_id' . '}', - ObjectSerializer::toPathValue($product_id), - $resourcePath - ); - } // path params if ($service_id !== null) { $resourcePath = str_replace( @@ -407,50 +387,48 @@ public function disableProductRequest($options) } /** - * Operation enableProduct + * Operation enableProductNgwaf * - * Enable a product + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetWorkspaceId $set_workspace_id set_workspace_id (optional) + * @param \Fastly\Model\NgwafRequestEnable $ngwaf_request_enable ngwaf_request_enable (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\EnabledProductResponse + * @return \Fastly\Model\NgwafResponseEnable */ - public function enableProduct($options) + public function enableProductNgwaf($options) { - list($response) = $this->enableProductWithHttpInfo($options); + list($response) = $this->enableProductNgwafWithHttpInfo($options); return $response; } /** - * Operation enableProductWithHttpInfo + * Operation enableProductNgwafWithHttpInfo * - * Enable a product + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetWorkspaceId $set_workspace_id (optional) + * @param \Fastly\Model\NgwafRequestEnable $ngwaf_request_enable (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\EnabledProductResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\NgwafResponseEnable, HTTP status code, HTTP response headers (array of strings) */ - public function enableProductWithHttpInfo($options) + public function enableProductNgwafWithHttpInfo($options) { - $request = $this->enableProductRequest($options); + $request = $this->enableProductNgwafRequest($options); try { $options = $this->createHttpClientOption(); @@ -501,20 +479,20 @@ public function enableProductWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\EnabledProductResponse' === '\SplFileObject') { + if ('\Fastly\Model\NgwafResponseEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\EnabledProductResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\NgwafResponseEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\EnabledProductResponse'; + $returnType = '\Fastly\Model\NgwafResponseEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -532,7 +510,7 @@ public function enableProductWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\EnabledProductResponse', + '\Fastly\Model\NgwafResponseEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -543,25 +521,24 @@ public function enableProductWithHttpInfo($options) } /** - * Operation enableProductAsync + * Operation enableProductNgwafAsync * - * Enable a product + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetWorkspaceId $set_workspace_id (optional) + * @param \Fastly\Model\NgwafRequestEnable $ngwaf_request_enable (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableProductAsync($options) + public function enableProductNgwafAsync($options) { - return $this->enableProductAsyncWithHttpInfo($options) + return $this->enableProductNgwafAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -570,26 +547,25 @@ function ($response) { } /** - * Operation enableProductAsyncWithHttpInfo + * Operation enableProductNgwafAsyncWithHttpInfo * - * Enable a product + * Enable product * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetWorkspaceId $set_workspace_id (optional) + * @param \Fastly\Model\NgwafRequestEnable $ngwaf_request_enable (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function enableProductAsyncWithHttpInfo($options) + public function enableProductNgwafAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\EnabledProductResponse'; - $request = $this->enableProductRequest($options); + $returnType = '\Fastly\Model\NgwafResponseEnable'; + $request = $this->enableProductNgwafRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -625,41 +601,33 @@ function ($exception) { } /** - * Create request for operation 'enableProduct' + * Create request for operation 'enableProductNgwaf' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetWorkspaceId $set_workspace_id (optional) + * @param \Fastly\Model\NgwafRequestEnable $ngwaf_request_enable (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function enableProductRequest($options) + public function enableProductNgwafRequest($options) { // unbox the parameters from the associative array - $product_id = array_key_exists('product_id', $options) ? $options['product_id'] : null; $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $set_workspace_id = array_key_exists('set_workspace_id', $options) ? $options['set_workspace_id'] : null; + $ngwaf_request_enable = array_key_exists('ngwaf_request_enable', $options) ? $options['ngwaf_request_enable'] : null; - // verify the required parameter 'product_id' is set - if ($product_id === null || (is_array($product_id) && count($product_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $product_id when calling enableProduct' - ); - } // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling enableProduct' + 'Missing the required parameter $service_id when calling enableProductNgwaf' ); } - $resourcePath = '/enabled-products/v1/{product_id}/services/{service_id}'; + $resourcePath = '/enabled-products/v1/ngwaf/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -668,14 +636,6 @@ public function enableProductRequest($options) - // path params - if ($product_id !== null) { - $resourcePath = str_replace( - '{' . 'product_id' . '}', - ObjectSerializer::toPathValue($product_id), - $resourcePath - ); - } // path params if ($service_id !== null) { $resourcePath = str_replace( @@ -698,11 +658,11 @@ public function enableProductRequest($options) } // for model (json/xml) - if (isset($set_workspace_id)) { + if (isset($ngwaf_request_enable)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($set_workspace_id)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($ngwaf_request_enable)); } else { - $httpBody = $set_workspace_id; + $httpBody = $ngwaf_request_enable; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -761,48 +721,46 @@ public function enableProductRequest($options) } /** - * Operation getEnabledProduct + * Operation getProductNgwaf * - * Get enabled product + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\EnabledProductResponse + * @return \Fastly\Model\NgwafResponseEnable */ - public function getEnabledProduct($options) + public function getProductNgwaf($options) { - list($response) = $this->getEnabledProductWithHttpInfo($options); + list($response) = $this->getProductNgwafWithHttpInfo($options); return $response; } /** - * Operation getEnabledProductWithHttpInfo + * Operation getProductNgwafWithHttpInfo * - * Get enabled product + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\EnabledProductResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\NgwafResponseEnable, HTTP status code, HTTP response headers (array of strings) */ - public function getEnabledProductWithHttpInfo($options) + public function getProductNgwafWithHttpInfo($options) { - $request = $this->getEnabledProductRequest($options); + $request = $this->getProductNgwafRequest($options); try { $options = $this->createHttpClientOption(); @@ -853,20 +811,20 @@ public function getEnabledProductWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\EnabledProductResponse' === '\SplFileObject') { + if ('\Fastly\Model\NgwafResponseEnable' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\EnabledProductResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\NgwafResponseEnable', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\EnabledProductResponse'; + $returnType = '\Fastly\Model\NgwafResponseEnable'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -884,7 +842,7 @@ public function getEnabledProductWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\EnabledProductResponse', + '\Fastly\Model\NgwafResponseEnable', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -895,24 +853,23 @@ public function getEnabledProductWithHttpInfo($options) } /** - * Operation getEnabledProductAsync + * Operation getProductNgwafAsync * - * Get enabled product + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEnabledProductAsync($options) + public function getProductNgwafAsync($options) { - return $this->getEnabledProductAsyncWithHttpInfo($options) + return $this->getProductNgwafAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -921,25 +878,24 @@ function ($response) { } /** - * Operation getEnabledProductAsyncWithHttpInfo + * Operation getProductNgwafAsyncWithHttpInfo * - * Get enabled product + * Get product enablement status * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEnabledProductAsyncWithHttpInfo($options) + public function getProductNgwafAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\EnabledProductResponse'; - $request = $this->getEnabledProductRequest($options); + $returnType = '\Fastly\Model\NgwafResponseEnable'; + $request = $this->getProductNgwafRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -975,39 +931,31 @@ function ($exception) { } /** - * Create request for operation 'getEnabledProduct' + * Create request for operation 'getProductNgwaf' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEnabledProductRequest($options) + public function getProductNgwafRequest($options) { // unbox the parameters from the associative array - $product_id = array_key_exists('product_id', $options) ? $options['product_id'] : null; $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'product_id' is set - if ($product_id === null || (is_array($product_id) && count($product_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $product_id when calling getEnabledProduct' - ); - } // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getEnabledProduct' + 'Missing the required parameter $service_id when calling getProductNgwaf' ); } - $resourcePath = '/enabled-products/v1/{product_id}/services/{service_id}'; + $resourcePath = '/enabled-products/v1/ngwaf/services/{service_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1016,14 +964,6 @@ public function getEnabledProductRequest($options) - // path params - if ($product_id !== null) { - $resourcePath = str_replace( - '{' . 'product_id' . '}', - ObjectSerializer::toPathValue($product_id), - $resourcePath - ); - } // path params if ($service_id !== null) { $resourcePath = str_replace( @@ -1103,48 +1043,46 @@ public function getEnabledProductRequest($options) } /** - * Operation getProductConfiguration + * Operation getProductNgwafConfiguration * - * Get configuration for a product + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\ConfiguredProductResponse + * @return \Fastly\Model\NgwafResponseConfigure */ - public function getProductConfiguration($options) + public function getProductNgwafConfiguration($options) { - list($response) = $this->getProductConfigurationWithHttpInfo($options); + list($response) = $this->getProductNgwafConfigurationWithHttpInfo($options); return $response; } /** - * Operation getProductConfigurationWithHttpInfo + * Operation getProductNgwafConfigurationWithHttpInfo * - * Get configuration for a product + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\ConfiguredProductResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\NgwafResponseConfigure, HTTP status code, HTTP response headers (array of strings) */ - public function getProductConfigurationWithHttpInfo($options) + public function getProductNgwafConfigurationWithHttpInfo($options) { - $request = $this->getProductConfigurationRequest($options); + $request = $this->getProductNgwafConfigurationRequest($options); try { $options = $this->createHttpClientOption(); @@ -1195,20 +1133,20 @@ public function getProductConfigurationWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\ConfiguredProductResponse' === '\SplFileObject') { + if ('\Fastly\Model\NgwafResponseConfigure' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ConfiguredProductResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\NgwafResponseConfigure', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\ConfiguredProductResponse'; + $returnType = '\Fastly\Model\NgwafResponseConfigure'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1226,7 +1164,7 @@ public function getProductConfigurationWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ConfiguredProductResponse', + '\Fastly\Model\NgwafResponseConfigure', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1237,24 +1175,23 @@ public function getProductConfigurationWithHttpInfo($options) } /** - * Operation getProductConfigurationAsync + * Operation getProductNgwafConfigurationAsync * - * Get configuration for a product + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProductConfigurationAsync($options) + public function getProductNgwafConfigurationAsync($options) { - return $this->getProductConfigurationAsyncWithHttpInfo($options) + return $this->getProductNgwafConfigurationAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1263,25 +1200,24 @@ function ($response) { } /** - * Operation getProductConfigurationAsyncWithHttpInfo + * Operation getProductNgwafConfigurationAsyncWithHttpInfo * - * Get configuration for a product + * Get configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getProductConfigurationAsyncWithHttpInfo($options) + public function getProductNgwafConfigurationAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\ConfiguredProductResponse'; - $request = $this->getProductConfigurationRequest($options); + $returnType = '\Fastly\Model\NgwafResponseConfigure'; + $request = $this->getProductNgwafConfigurationRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1317,39 +1253,31 @@ function ($exception) { } /** - * Create request for operation 'getProductConfiguration' + * Create request for operation 'getProductNgwafConfiguration' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getProductConfigurationRequest($options) + public function getProductNgwafConfigurationRequest($options) { // unbox the parameters from the associative array - $product_id = array_key_exists('product_id', $options) ? $options['product_id'] : null; $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - // verify the required parameter 'product_id' is set - if ($product_id === null || (is_array($product_id) && count($product_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $product_id when calling getProductConfiguration' - ); - } // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling getProductConfiguration' + 'Missing the required parameter $service_id when calling getProductNgwafConfiguration' ); } - $resourcePath = '/enabled-products/v1/{product_id}/services/{service_id}/configuration'; + $resourcePath = '/enabled-products/v1/ngwaf/services/{service_id}/configuration'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1358,14 +1286,6 @@ public function getProductConfigurationRequest($options) - // path params - if ($product_id !== null) { - $resourcePath = str_replace( - '{' . 'product_id' . '}', - ObjectSerializer::toPathValue($product_id), - $resourcePath - ); - } // path params if ($service_id !== null) { $resourcePath = str_replace( @@ -1445,50 +1365,48 @@ public function getProductConfigurationRequest($options) } /** - * Operation setProductConfiguration + * Operation setProductNgwafConfiguration * - * Update configuration for a product + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetConfiguration $set_configuration set_configuration (optional) + * @param \Fastly\Model\NgwafRequestUpdateConfiguration $ngwaf_request_update_configuration ngwaf_request_update_configuration (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\ConfiguredProductResponse + * @return \Fastly\Model\NgwafResponseConfigure */ - public function setProductConfiguration($options) + public function setProductNgwafConfiguration($options) { - list($response) = $this->setProductConfigurationWithHttpInfo($options); + list($response) = $this->setProductNgwafConfigurationWithHttpInfo($options); return $response; } /** - * Operation setProductConfigurationWithHttpInfo + * Operation setProductNgwafConfigurationWithHttpInfo * - * Update configuration for a product + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetConfiguration $set_configuration (optional) + * @param \Fastly\Model\NgwafRequestUpdateConfiguration $ngwaf_request_update_configuration (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\ConfiguredProductResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\NgwafResponseConfigure, HTTP status code, HTTP response headers (array of strings) */ - public function setProductConfigurationWithHttpInfo($options) + public function setProductNgwafConfigurationWithHttpInfo($options) { - $request = $this->setProductConfigurationRequest($options); + $request = $this->setProductNgwafConfigurationRequest($options); try { $options = $this->createHttpClientOption(); @@ -1539,20 +1457,20 @@ public function setProductConfigurationWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\ConfiguredProductResponse' === '\SplFileObject') { + if ('\Fastly\Model\NgwafResponseConfigure' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\ConfiguredProductResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\NgwafResponseConfigure', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\ConfiguredProductResponse'; + $returnType = '\Fastly\Model\NgwafResponseConfigure'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1570,7 +1488,7 @@ public function setProductConfigurationWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\ConfiguredProductResponse', + '\Fastly\Model\NgwafResponseConfigure', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1581,25 +1499,24 @@ public function setProductConfigurationWithHttpInfo($options) } /** - * Operation setProductConfigurationAsync + * Operation setProductNgwafConfigurationAsync * - * Update configuration for a product + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetConfiguration $set_configuration (optional) + * @param \Fastly\Model\NgwafRequestUpdateConfiguration $ngwaf_request_update_configuration (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setProductConfigurationAsync($options) + public function setProductNgwafConfigurationAsync($options) { - return $this->setProductConfigurationAsyncWithHttpInfo($options) + return $this->setProductNgwafConfigurationAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1608,26 +1525,25 @@ function ($response) { } /** - * Operation setProductConfigurationAsyncWithHttpInfo + * Operation setProductNgwafConfigurationAsyncWithHttpInfo * - * Update configuration for a product + * Update configuration * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetConfiguration $set_configuration (optional) + * @param \Fastly\Model\NgwafRequestUpdateConfiguration $ngwaf_request_update_configuration (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function setProductConfigurationAsyncWithHttpInfo($options) + public function setProductNgwafConfigurationAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\ConfiguredProductResponse'; - $request = $this->setProductConfigurationRequest($options); + $returnType = '\Fastly\Model\NgwafResponseConfigure'; + $request = $this->setProductNgwafConfigurationRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1663,41 +1579,33 @@ function ($exception) { } /** - * Create request for operation 'setProductConfiguration' + * Create request for operation 'setProductNgwafConfiguration' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id (required) * @param string $service_id Alphanumeric string identifying the service. (required) - * @param \Fastly\Model\SetConfiguration $set_configuration (optional) + * @param \Fastly\Model\NgwafRequestUpdateConfiguration $ngwaf_request_update_configuration (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function setProductConfigurationRequest($options) + public function setProductNgwafConfigurationRequest($options) { // unbox the parameters from the associative array - $product_id = array_key_exists('product_id', $options) ? $options['product_id'] : null; $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $set_configuration = array_key_exists('set_configuration', $options) ? $options['set_configuration'] : null; + $ngwaf_request_update_configuration = array_key_exists('ngwaf_request_update_configuration', $options) ? $options['ngwaf_request_update_configuration'] : null; - // verify the required parameter 'product_id' is set - if ($product_id === null || (is_array($product_id) && count($product_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $product_id when calling setProductConfiguration' - ); - } // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling setProductConfiguration' + 'Missing the required parameter $service_id when calling setProductNgwafConfiguration' ); } - $resourcePath = '/enabled-products/v1/{product_id}/services/{service_id}/configuration'; + $resourcePath = '/enabled-products/v1/ngwaf/services/{service_id}/configuration'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1706,14 +1614,6 @@ public function setProductConfigurationRequest($options) - // path params - if ($product_id !== null) { - $resourcePath = str_replace( - '{' . 'product_id' . '}', - ObjectSerializer::toPathValue($product_id), - $resourcePath - ); - } // path params if ($service_id !== null) { $resourcePath = str_replace( @@ -1736,11 +1636,11 @@ public function setProductConfigurationRequest($options) } // for model (json/xml) - if (isset($set_configuration)) { + if (isset($ngwaf_request_update_configuration)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($set_configuration)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($ngwaf_request_update_configuration)); } else { - $httpBody = $set_configuration; + $httpBody = $ngwaf_request_update_configuration; } } elseif (count($formParams) > 0) { if ($multipart) { diff --git a/lib/Api/ProductObjectStorageApi.php b/lib/Api/ProductObjectStorageApi.php new file mode 100644 index 00000000..a40447a6 --- /dev/null +++ b/lib/Api/ProductObjectStorageApi.php @@ -0,0 +1,991 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductObjectStorage + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductObjectStorage($options) + { + $this->disableProductObjectStorageWithHttpInfo($options); + } + + /** + * Operation disableProductObjectStorageWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductObjectStorageWithHttpInfo($options) + { + $request = $this->disableProductObjectStorageRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductObjectStorageAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductObjectStorageAsync($options) + { + return $this->disableProductObjectStorageAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductObjectStorageAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductObjectStorageAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductObjectStorageRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductObjectStorage' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductObjectStorageRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/object_storage'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableObjectStorage + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ObjectStorageResponseBodyEnable + */ + public function enableObjectStorage($options) + { + list($response) = $this->enableObjectStorageWithHttpInfo($options); + return $response; + } + + /** + * Operation enableObjectStorageWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ObjectStorageResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableObjectStorageWithHttpInfo($options) + { + $request = $this->enableObjectStorageRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ObjectStorageResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ObjectStorageResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ObjectStorageResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ObjectStorageResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableObjectStorageAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableObjectStorageAsync($options) + { + return $this->enableObjectStorageAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableObjectStorageAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableObjectStorageAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ObjectStorageResponseBodyEnable'; + $request = $this->enableObjectStorageRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableObjectStorage' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableObjectStorageRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/object_storage'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getObjectStorage + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ObjectStorageResponseBodyEnable + */ + public function getObjectStorage($options) + { + list($response) = $this->getObjectStorageWithHttpInfo($options); + return $response; + } + + /** + * Operation getObjectStorageWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ObjectStorageResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getObjectStorageWithHttpInfo($options) + { + $request = $this->getObjectStorageRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ObjectStorageResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ObjectStorageResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ObjectStorageResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ObjectStorageResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getObjectStorageAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getObjectStorageAsync($options) + { + return $this->getObjectStorageAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getObjectStorageAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getObjectStorageAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ObjectStorageResponseBodyEnable'; + $request = $this->getObjectStorageRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getObjectStorage' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getObjectStorageRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/object_storage'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/ProductOriginInspectorApi.php b/lib/Api/ProductOriginInspectorApi.php new file mode 100644 index 00000000..0a03445b --- /dev/null +++ b/lib/Api/ProductOriginInspectorApi.php @@ -0,0 +1,1051 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductOriginInspector + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductOriginInspector($options) + { + $this->disableProductOriginInspectorWithHttpInfo($options); + } + + /** + * Operation disableProductOriginInspectorWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductOriginInspectorWithHttpInfo($options) + { + $request = $this->disableProductOriginInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductOriginInspectorAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductOriginInspectorAsync($options) + { + return $this->disableProductOriginInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductOriginInspectorAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductOriginInspectorAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductOriginInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductOriginInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductOriginInspectorRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductOriginInspector' + ); + } + + $resourcePath = '/enabled-products/v1/origin_inspector/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductOriginInspector + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\OriginInspectorResponseBodyEnable + */ + public function enableProductOriginInspector($options) + { + list($response) = $this->enableProductOriginInspectorWithHttpInfo($options); + return $response; + } + + /** + * Operation enableProductOriginInspectorWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\OriginInspectorResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableProductOriginInspectorWithHttpInfo($options) + { + $request = $this->enableProductOriginInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\OriginInspectorResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\OriginInspectorResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\OriginInspectorResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\OriginInspectorResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableProductOriginInspectorAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductOriginInspectorAsync($options) + { + return $this->enableProductOriginInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableProductOriginInspectorAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductOriginInspectorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\OriginInspectorResponseBodyEnable'; + $request = $this->enableProductOriginInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableProductOriginInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableProductOriginInspectorRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling enableProductOriginInspector' + ); + } + + $resourcePath = '/enabled-products/v1/origin_inspector/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProductOriginInspector + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\OriginInspectorResponseBodyEnable + */ + public function getProductOriginInspector($options) + { + list($response) = $this->getProductOriginInspectorWithHttpInfo($options); + return $response; + } + + /** + * Operation getProductOriginInspectorWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\OriginInspectorResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductOriginInspectorWithHttpInfo($options) + { + $request = $this->getProductOriginInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\OriginInspectorResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\OriginInspectorResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\OriginInspectorResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\OriginInspectorResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductOriginInspectorAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductOriginInspectorAsync($options) + { + return $this->getProductOriginInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductOriginInspectorAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductOriginInspectorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\OriginInspectorResponseBodyEnable'; + $request = $this->getProductOriginInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProductOriginInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getProductOriginInspectorRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling getProductOriginInspector' + ); + } + + $resourcePath = '/enabled-products/v1/origin_inspector/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/ProductWebsocketsApi.php b/lib/Api/ProductWebsocketsApi.php new file mode 100644 index 00000000..0af563a1 --- /dev/null +++ b/lib/Api/ProductWebsocketsApi.php @@ -0,0 +1,1051 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductWebsockets + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductWebsockets($options) + { + $this->disableProductWebsocketsWithHttpInfo($options); + } + + /** + * Operation disableProductWebsocketsWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductWebsocketsWithHttpInfo($options) + { + $request = $this->disableProductWebsocketsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductWebsocketsAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductWebsocketsAsync($options) + { + return $this->disableProductWebsocketsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductWebsocketsAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductWebsocketsAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductWebsocketsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductWebsockets' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductWebsocketsRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductWebsockets' + ); + } + + $resourcePath = '/enabled-products/v1/websockets/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductWebsockets + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\WebsocketsResponseBodyEnable + */ + public function enableProductWebsockets($options) + { + list($response) = $this->enableProductWebsocketsWithHttpInfo($options); + return $response; + } + + /** + * Operation enableProductWebsocketsWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\WebsocketsResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableProductWebsocketsWithHttpInfo($options) + { + $request = $this->enableProductWebsocketsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\WebsocketsResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\WebsocketsResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\WebsocketsResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\WebsocketsResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableProductWebsocketsAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductWebsocketsAsync($options) + { + return $this->enableProductWebsocketsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableProductWebsocketsAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductWebsocketsAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\WebsocketsResponseBodyEnable'; + $request = $this->enableProductWebsocketsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableProductWebsockets' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableProductWebsocketsRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling enableProductWebsockets' + ); + } + + $resourcePath = '/enabled-products/v1/websockets/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProductWebsockets + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\WebsocketsResponseBodyEnable + */ + public function getProductWebsockets($options) + { + list($response) = $this->getProductWebsocketsWithHttpInfo($options); + return $response; + } + + /** + * Operation getProductWebsocketsWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\WebsocketsResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductWebsocketsWithHttpInfo($options) + { + $request = $this->getProductWebsocketsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\WebsocketsResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\WebsocketsResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\WebsocketsResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\WebsocketsResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductWebsocketsAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductWebsocketsAsync($options) + { + return $this->getProductWebsocketsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductWebsocketsAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductWebsocketsAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\WebsocketsResponseBodyEnable'; + $request = $this->getProductWebsocketsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProductWebsockets' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getProductWebsocketsRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling getProductWebsockets' + ); + } + + $resourcePath = '/enabled-products/v1/websockets/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/SnippetApi.php b/lib/Api/SnippetApi.php index 02aab73c..99d4c85b 100644 --- a/lib/Api/SnippetApi.php +++ b/lib/Api/SnippetApi.php @@ -513,7 +513,7 @@ public function createSnippetRequest($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -537,7 +537,7 @@ public function deleteSnippet($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -649,7 +649,7 @@ public function deleteSnippetWithHttpInfo($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -676,7 +676,7 @@ function ($response) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -729,7 +729,7 @@ function ($exception) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -739,7 +739,7 @@ public function deleteSnippetRequest($options) // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $snippet_name = array_key_exists('snippet_name', $options) ? $options['snippet_name'] : null; + $name = array_key_exists('name', $options) ? $options['name'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -753,14 +753,14 @@ public function deleteSnippetRequest($options) 'Missing the required parameter $version_id when calling deleteSnippet' ); } - // verify the required parameter 'snippet_name' is set - if ($snippet_name === null || (is_array($snippet_name) && count($snippet_name) === 0)) { + // verify the required parameter 'name' is set + if ($name === null || (is_array($name) && count($name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $snippet_name when calling deleteSnippet' + 'Missing the required parameter $name when calling deleteSnippet' ); } - $resourcePath = '/service/{service_id}/version/{version_id}/snippet/{snippet_name}'; + $resourcePath = '/service/{service_id}/version/{version_id}/snippet/{name}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -786,10 +786,10 @@ public function deleteSnippetRequest($options) ); } // path params - if ($snippet_name !== null) { + if ($name !== null) { $resourcePath = str_replace( - '{' . 'snippet_name' . '}', - ObjectSerializer::toPathValue($snippet_name), + '{' . 'name' . '}', + ObjectSerializer::toPathValue($name), $resourcePath ); } @@ -875,7 +875,7 @@ public function deleteSnippetRequest($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -899,7 +899,7 @@ public function getSnippet($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1011,7 +1011,7 @@ public function getSnippetWithHttpInfo($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1038,7 +1038,7 @@ function ($response) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1091,7 +1091,7 @@ function ($exception) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1101,7 +1101,7 @@ public function getSnippetRequest($options) // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $snippet_name = array_key_exists('snippet_name', $options) ? $options['snippet_name'] : null; + $name = array_key_exists('name', $options) ? $options['name'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -1115,14 +1115,14 @@ public function getSnippetRequest($options) 'Missing the required parameter $version_id when calling getSnippet' ); } - // verify the required parameter 'snippet_name' is set - if ($snippet_name === null || (is_array($snippet_name) && count($snippet_name) === 0)) { + // verify the required parameter 'name' is set + if ($name === null || (is_array($name) && count($name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $snippet_name when calling getSnippet' + 'Missing the required parameter $name when calling getSnippet' ); } - $resourcePath = '/service/{service_id}/version/{version_id}/snippet/{snippet_name}'; + $resourcePath = '/service/{service_id}/version/{version_id}/snippet/{name}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1148,10 +1148,10 @@ public function getSnippetRequest($options) ); } // path params - if ($snippet_name !== null) { + if ($name !== null) { $resourcePath = str_replace( - '{' . 'snippet_name' . '}', - ObjectSerializer::toPathValue($snippet_name), + '{' . 'name' . '}', + ObjectSerializer::toPathValue($name), $resourcePath ); } @@ -1236,7 +1236,7 @@ public function getSnippetRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1259,7 +1259,7 @@ public function getSnippetDynamic($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1370,7 +1370,7 @@ public function getSnippetDynamicWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1396,7 +1396,7 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1448,7 +1448,7 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1457,7 +1457,7 @@ public function getSnippetDynamicRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $snippet_id = array_key_exists('snippet_id', $options) ? $options['snippet_id'] : null; + $id = array_key_exists('id', $options) ? $options['id'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -1465,14 +1465,14 @@ public function getSnippetDynamicRequest($options) 'Missing the required parameter $service_id when calling getSnippetDynamic' ); } - // verify the required parameter 'snippet_id' is set - if ($snippet_id === null || (is_array($snippet_id) && count($snippet_id) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $snippet_id when calling getSnippetDynamic' + 'Missing the required parameter $id when calling getSnippetDynamic' ); } - $resourcePath = '/service/{service_id}/snippet/{snippet_id}'; + $resourcePath = '/service/{service_id}/snippet/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1490,10 +1490,10 @@ public function getSnippetDynamicRequest($options) ); } // path params - if ($snippet_id !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'snippet_id' . '}', - ObjectSerializer::toPathValue($snippet_id), + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), $resourcePath ); } @@ -1921,7 +1921,7 @@ public function listSnippetsRequest($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1945,7 +1945,7 @@ public function updateSnippet($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2057,7 +2057,7 @@ public function updateSnippetWithHttpInfo($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2084,7 +2084,7 @@ function ($response) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2137,7 +2137,7 @@ function ($exception) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param string $snippet_name The name for the snippet. (required) + * @param string $name The name for the snippet. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2147,7 +2147,7 @@ public function updateSnippetRequest($options) // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $snippet_name = array_key_exists('snippet_name', $options) ? $options['snippet_name'] : null; + $name = array_key_exists('name', $options) ? $options['name'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -2161,14 +2161,14 @@ public function updateSnippetRequest($options) 'Missing the required parameter $version_id when calling updateSnippet' ); } - // verify the required parameter 'snippet_name' is set - if ($snippet_name === null || (is_array($snippet_name) && count($snippet_name) === 0)) { + // verify the required parameter 'name' is set + if ($name === null || (is_array($name) && count($name) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $snippet_name when calling updateSnippet' + 'Missing the required parameter $name when calling updateSnippet' ); } - $resourcePath = '/service/{service_id}/version/{version_id}/snippet/{snippet_name}'; + $resourcePath = '/service/{service_id}/version/{version_id}/snippet/{name}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2194,10 +2194,10 @@ public function updateSnippetRequest($options) ); } // path params - if ($snippet_name !== null) { + if ($name !== null) { $resourcePath = str_replace( - '{' . 'snippet_name' . '}', - ObjectSerializer::toPathValue($snippet_name), + '{' . 'name' . '}', + ObjectSerializer::toPathValue($name), $resourcePath ); } @@ -2282,7 +2282,7 @@ public function updateSnippetRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * @param string $name The name for the snippet. (optional) * @param string $type The location in generated VCL where the snippet should be placed. (optional) * @param string $content The VCL code that specifies exactly what the snippet does. (optional) @@ -2310,7 +2310,7 @@ public function updateSnippetDynamic($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * @param string $name The name for the snippet. (optional) * @param string $type The location in generated VCL where the snippet should be placed. (optional) * @param string $content The VCL code that specifies exactly what the snippet does. (optional) @@ -2426,7 +2426,7 @@ public function updateSnippetDynamicWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * @param string $name The name for the snippet. (optional) * @param string $type The location in generated VCL where the snippet should be placed. (optional) * @param string $content The VCL code that specifies exactly what the snippet does. (optional) @@ -2457,7 +2457,7 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * @param string $name The name for the snippet. (optional) * @param string $type The location in generated VCL where the snippet should be placed. (optional) * @param string $content The VCL code that specifies exactly what the snippet does. (optional) @@ -2514,7 +2514,7 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) - * @param string $snippet_id Alphanumeric string identifying a VCL Snippet. (required) + * @param string $id Alphanumeric string identifying a VCL Snippet. (required) * @param string $name The name for the snippet. (optional) * @param string $type The location in generated VCL where the snippet should be placed. (optional) * @param string $content The VCL code that specifies exactly what the snippet does. (optional) @@ -2528,7 +2528,7 @@ public function updateSnippetDynamicRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $snippet_id = array_key_exists('snippet_id', $options) ? $options['snippet_id'] : null; + $id = array_key_exists('id', $options) ? $options['id'] : null; $name = array_key_exists('name', $options) ? $options['name'] : null; $type = array_key_exists('type', $options) ? $options['type'] : null; $content = array_key_exists('content', $options) ? $options['content'] : null; @@ -2541,14 +2541,14 @@ public function updateSnippetDynamicRequest($options) 'Missing the required parameter $service_id when calling updateSnippetDynamic' ); } - // verify the required parameter 'snippet_id' is set - if ($snippet_id === null || (is_array($snippet_id) && count($snippet_id) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $snippet_id when calling updateSnippetDynamic' + 'Missing the required parameter $id when calling updateSnippetDynamic' ); } - $resourcePath = '/service/{service_id}/snippet/{snippet_id}'; + $resourcePath = '/service/{service_id}/snippet/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2566,10 +2566,10 @@ public function updateSnippetDynamicRequest($options) ); } // path params - if ($snippet_id !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'snippet_id' . '}', - ObjectSerializer::toPathValue($snippet_id), + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), $resourcePath ); } diff --git a/lib/Configuration.php b/lib/Configuration.php index 4fdbebfc..039a89e2 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/6.0.0'; + protected $userAgent = 'fastly-php/7.0.0'; /** * Debug switch (default set to false) @@ -127,6 +127,13 @@ class Configuration */ protected $rate_limit_reset = NULL; + /** + * Associative array to store API key(s) + * + * @var string[] + */ + protected array $apiKeys = []; + /** * Constructor */ @@ -453,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 6.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 7.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/LegacyWafRuleStatus.php b/lib/Model/AiAcceleratorResponseBodyEnable.php similarity index 74% rename from lib/Model/LegacyWafRuleStatus.php rename to lib/Model/AiAcceleratorResponseBodyEnable.php index 9d8dd0d4..2d3449e2 100644 --- a/lib/Model/LegacyWafRuleStatus.php +++ b/lib/Model/AiAcceleratorResponseBodyEnable.php @@ -1,6 +1,6 @@ 'string', - 'modsec_rule_id' => 'string', - 'unique_rule_id' => 'string' + 'product' => '\Fastly\Model\AiAcceleratorResponseProductProduct', + 'customer' => '\Fastly\Model\AiAcceleratorResponseCustomerCustomer', + '_links' => '\Fastly\Model\AiAcceleratorResponseLinksLinks' ]; /** @@ -66,9 +66,9 @@ class LegacyWafRuleStatus implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $fastlyFormats = [ - 'status' => null, - 'modsec_rule_id' => null, - 'unique_rule_id' => null + 'product' => null, + 'customer' => null, + '_links' => null ]; /** @@ -98,9 +98,9 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'modsec_rule_id' => 'modsec_rule_id', - 'unique_rule_id' => 'unique_rule_id' + 'product' => 'product', + 'customer' => 'customer', + '_links' => '_links' ]; /** @@ -109,9 +109,9 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'modsec_rule_id' => 'setModsecRuleId', - 'unique_rule_id' => 'setUniqueRuleId' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + '_links' => 'setLinks' ]; /** @@ -120,9 +120,9 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'modsec_rule_id' => 'getModsecRuleId', - 'unique_rule_id' => 'getUniqueRuleId' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + '_links' => 'getLinks' ]; /** @@ -182,9 +182,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['modsec_rule_id'] = $data['modsec_rule_id'] ?? null; - $this->container['unique_rule_id'] = $data['unique_rule_id'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -212,73 +212,73 @@ public function valid() /** - * Gets status + * Gets product * - * @return string|null + * @return \Fastly\Model\AiAcceleratorResponseProductProduct|null */ - public function getStatus() + public function getProduct() { - return $this->container['status']; + return $this->container['product']; } /** - * Sets status + * Sets product * - * @param string|null $status Describes the behavior for the particular rule within this firewall. Permitted values: `log`, `block`, and `disabled`. + * @param \Fastly\Model\AiAcceleratorResponseProductProduct|null $product product * * @return self */ - public function setStatus($status) + public function setProduct($product) { - $this->container['status'] = $status; + $this->container['product'] = $product; return $this; } /** - * Gets modsec_rule_id + * Gets customer * - * @return string|null + * @return \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null */ - public function getModsecRuleId() + public function getCustomer() { - return $this->container['modsec_rule_id']; + return $this->container['customer']; } /** - * Sets modsec_rule_id + * Sets customer * - * @param string|null $modsec_rule_id The ModSecurity rule ID. + * @param \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null $customer customer * * @return self */ - public function setModsecRuleId($modsec_rule_id) + public function setCustomer($customer) { - $this->container['modsec_rule_id'] = $modsec_rule_id; + $this->container['customer'] = $customer; return $this; } /** - * Gets unique_rule_id + * Gets _links * - * @return string|null + * @return \Fastly\Model\AiAcceleratorResponseLinksLinks|null */ - public function getUniqueRuleId() + public function getLinks() { - return $this->container['unique_rule_id']; + return $this->container['_links']; } /** - * Sets unique_rule_id + * Sets _links * - * @param string|null $unique_rule_id The Rule ID. + * @param \Fastly\Model\AiAcceleratorResponseLinksLinks|null $_links _links * * @return self */ - public function setUniqueRuleId($unique_rule_id) + public function setLinks($_links) { - $this->container['unique_rule_id'] = $unique_rule_id; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/AiAcceleratorResponseCustomer.php b/lib/Model/AiAcceleratorResponseCustomer.php new file mode 100644 index 00000000..b4f11a54 --- /dev/null +++ b/lib/Model/AiAcceleratorResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AiAcceleratorResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ai_accelerator_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\AiAcceleratorResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AiAcceleratorResponseCustomerCustomer.php b/lib/Model/AiAcceleratorResponseCustomerCustomer.php new file mode 100644 index 00000000..46470cfb --- /dev/null +++ b/lib/Model/AiAcceleratorResponseCustomerCustomer.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AiAcceleratorResponseCustomerCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ai_accelerator_response_customer_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Customer identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AiAcceleratorResponseLinks.php b/lib/Model/AiAcceleratorResponseLinks.php new file mode 100644 index 00000000..29f29391 --- /dev/null +++ b/lib/Model/AiAcceleratorResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AiAcceleratorResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ai_accelerator_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\AiAcceleratorResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\AiAcceleratorResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\AiAcceleratorResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Store.php b/lib/Model/AiAcceleratorResponseLinksLinks.php similarity index 89% rename from lib/Model/Store.php rename to lib/Model/AiAcceleratorResponseLinksLinks.php index f3593fc5..2682509d 100644 --- a/lib/Model/Store.php +++ b/lib/Model/AiAcceleratorResponseLinksLinks.php @@ -1,6 +1,6 @@ 'string' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class Store implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'name' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'name' => 'name' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'name' => 'setName' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'name' => 'getName' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['name'] = $data['name'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets name + * Gets self * * @return string|null */ - public function getName() + public function getSelf() { - return $this->container['name']; + return $this->container['self']; } /** - * Sets name + * Sets self * - * @param string|null $name A human-readable name for the store. + * @param string|null $self Location of resource * * @return self */ - public function setName($name) + public function setSelf($self) { - $this->container['name'] = $name; + $this->container['self'] = $self; return $this; } diff --git a/lib/Model/AiAcceleratorResponseProduct.php b/lib/Model/AiAcceleratorResponseProduct.php new file mode 100644 index 00000000..33702e81 --- /dev/null +++ b/lib/Model/AiAcceleratorResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AiAcceleratorResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ai_accelerator_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\AiAcceleratorResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\AiAcceleratorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\AiAcceleratorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AiAcceleratorResponseProductProduct.php b/lib/Model/AiAcceleratorResponseProductProduct.php new file mode 100644 index 00000000..5bc8160e --- /dev/null +++ b/lib/Model/AiAcceleratorResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AiAcceleratorResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ai_accelerator_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Backend.php b/lib/Model/Backend.php index acf5a560..d65a7ed8 100644 --- a/lib/Model/Backend.php +++ b/lib/Model/Backend.php @@ -684,7 +684,7 @@ public function getKeepaliveTime() /** * Sets keepalive_time * - * @param int|null $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. + * @param int|null $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. * * @return self */ diff --git a/lib/Model/BackendResponse.php b/lib/Model/BackendResponse.php index 2351e7a3..6a969730 100644 --- a/lib/Model/BackendResponse.php +++ b/lib/Model/BackendResponse.php @@ -720,7 +720,7 @@ public function getKeepaliveTime() /** * Sets keepalive_time * - * @param int|null $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. + * @param int|null $keepalive_time How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can. * * @return self */ diff --git a/lib/Model/BotManagementResponseBodyEnable.php b/lib/Model/BotManagementResponseBodyEnable.php new file mode 100644 index 00000000..4807e64b --- /dev/null +++ b/lib/Model/BotManagementResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\BotManagementResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\BotManagementResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\BotManagementResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\BotManagementResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\BotManagementResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\BotManagementResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseLinks.php b/lib/Model/BotManagementResponseLinks.php new file mode 100644 index 00000000..d389642a --- /dev/null +++ b/lib/Model/BotManagementResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\BotManagementResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\BotManagementResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\BotManagementResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseLinksLinks.php b/lib/Model/BotManagementResponseLinksLinks.php new file mode 100644 index 00000000..cbb0244d --- /dev/null +++ b/lib/Model/BotManagementResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseProduct.php b/lib/Model/BotManagementResponseProduct.php new file mode 100644 index 00000000..44e0e7d6 --- /dev/null +++ b/lib/Model/BotManagementResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\BotManagementResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\BotManagementResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\BotManagementResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseProductProduct.php b/lib/Model/BotManagementResponseProductProduct.php new file mode 100644 index 00000000..fd7e7c5c --- /dev/null +++ b/lib/Model/BotManagementResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseService.php b/lib/Model/BotManagementResponseService.php new file mode 100644 index 00000000..90f20400 --- /dev/null +++ b/lib/Model/BotManagementResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EnabledProductResponseService.php b/lib/Model/BotManagementResponseServiceService.php similarity index 96% rename from lib/Model/EnabledProductResponseService.php rename to lib/Model/BotManagementResponseServiceService.php index 3c945f01..1387616b 100644 --- a/lib/Model/EnabledProductResponseService.php +++ b/lib/Model/BotManagementResponseServiceService.php @@ -1,6 +1,6 @@ + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\BrotliCompressionResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\BrotliCompressionResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\BrotliCompressionResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\BrotliCompressionResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\BrotliCompressionResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\BrotliCompressionResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BrotliCompressionResponseLinks.php b/lib/Model/BrotliCompressionResponseLinks.php new file mode 100644 index 00000000..16b85bd1 --- /dev/null +++ b/lib/Model/BrotliCompressionResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\BrotliCompressionResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\BrotliCompressionResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\BrotliCompressionResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BrotliCompressionResponseLinksLinks.php b/lib/Model/BrotliCompressionResponseLinksLinks.php new file mode 100644 index 00000000..d96df0f3 --- /dev/null +++ b/lib/Model/BrotliCompressionResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BrotliCompressionResponseProduct.php b/lib/Model/BrotliCompressionResponseProduct.php new file mode 100644 index 00000000..022acdec --- /dev/null +++ b/lib/Model/BrotliCompressionResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\BrotliCompressionResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\BrotliCompressionResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\BrotliCompressionResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BrotliCompressionResponseProductProduct.php b/lib/Model/BrotliCompressionResponseProductProduct.php new file mode 100644 index 00000000..d80c5237 --- /dev/null +++ b/lib/Model/BrotliCompressionResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BrotliCompressionResponseService.php b/lib/Model/BrotliCompressionResponseService.php new file mode 100644 index 00000000..142bdeff --- /dev/null +++ b/lib/Model/BrotliCompressionResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ComputeAclList.php b/lib/Model/ComputeAclList.php new file mode 100644 index 00000000..0e2547e8 --- /dev/null +++ b/lib/Model/ComputeAclList.php @@ -0,0 +1,345 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ComputeAclList implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'compute-acl-list'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\ComputeAclCreateAclsResponse[]', + 'meta' => '\Fastly\Model\ComputeAclListMeta' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null, + 'meta' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\ComputeAclCreateAclsResponse[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\ComputeAclCreateAclsResponse[]|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \Fastly\Model\ComputeAclListMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\ComputeAclListMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ReadOnlyServiceId.php b/lib/Model/ComputeAclListMeta.php similarity index 87% rename from lib/Model/ReadOnlyServiceId.php rename to lib/Model/ComputeAclListMeta.php index df465f4f..8dc6657d 100644 --- a/lib/Model/ReadOnlyServiceId.php +++ b/lib/Model/ComputeAclListMeta.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class ReadOnlyServiceId implements ModelInterface, ArrayAccess, \JsonSerializable +class ComputeAclListMeta implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class ReadOnlyServiceId implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $fastlyModelName = 'read_only_service_id'; + protected static $fastlyModelName = 'compute_acl_list_meta'; /** * Array of property to type mappings. Used for (de)serialization @@ -53,7 +54,7 @@ class ReadOnlyServiceId implements ModelInterface, ArrayAccess, \JsonSerializabl * @var string[] */ protected static $fastlyTypes = [ - + 'total' => 'int' ]; /** @@ -64,7 +65,7 @@ class ReadOnlyServiceId implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $fastlyFormats = [ - + 'total' => null ]; /** @@ -94,7 +95,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - + 'total' => 'total' ]; /** @@ -103,7 +104,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - + 'total' => 'setTotal' ]; /** @@ -112,7 +113,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - + 'total' => 'getTotal' ]; /** @@ -172,6 +173,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['total'] = $data['total'] ?? null; } /** @@ -197,6 +199,30 @@ public function valid() return count($this->listInvalidProperties()) === 0; } + + /** + * Gets total + * + * @return int|null + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int|null $total Total of ACLs. + * + * @return self + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ComputeAclLookup.php b/lib/Model/ComputeAclLookup.php index d57721db..d709dcd0 100644 --- a/lib/Model/ComputeAclLookup.php +++ b/lib/Model/ComputeAclLookup.php @@ -55,7 +55,6 @@ class ComputeAclLookup implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyTypes = [ 'prefix' => 'string', - 'length' => 'int', 'action' => 'string' ]; @@ -68,7 +67,6 @@ class ComputeAclLookup implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'prefix' => null, - 'length' => null, 'action' => null ]; @@ -100,7 +98,6 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'prefix' => 'prefix', - 'length' => 'length', 'action' => 'action' ]; @@ -111,7 +108,6 @@ public static function fastlyFormats() */ protected static $setters = [ 'prefix' => 'setPrefix', - 'length' => 'setLength', 'action' => 'setAction' ]; @@ -122,7 +118,6 @@ public static function fastlyFormats() */ protected static $getters = [ 'prefix' => 'getPrefix', - 'length' => 'getLength', 'action' => 'getAction' ]; @@ -184,7 +179,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['prefix'] = $data['prefix'] ?? null; - $this->container['length'] = $data['length'] ?? null; $this->container['action'] = $data['action'] ?? null; } @@ -225,7 +219,7 @@ public function getPrefix() /** * Sets prefix * - * @param string|null $prefix A valid IPv4 or IPv6 address. + * @param string|null $prefix A valid IPv4 or IPv6 address and prefix in CIDR notation. * * @return self */ @@ -236,30 +230,6 @@ public function setPrefix($prefix) return $this; } - /** - * Gets length - * - * @return int|null - */ - public function getLength() - { - return $this->container['length']; - } - - /** - * Sets length - * - * @param int|null $length The length of address in the IP addressing space. - * - * @return self - */ - public function setLength($length) - { - $this->container['length'] = $length; - - return $this; - } - /** * Gets action * diff --git a/lib/Model/DdosProtectionRequestUpdateConfiguration.php b/lib/Model/DdosProtectionRequestUpdateConfiguration.php new file mode 100644 index 00000000..68fdad61 --- /dev/null +++ b/lib/Model/DdosProtectionRequestUpdateConfiguration.php @@ -0,0 +1,353 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionRequestUpdateConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_request_update_configuration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'mode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'mode' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'mode' => 'mode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mode' => 'setMode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mode' => 'getMode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + const MODE_FALSE = 'false'; + const MODE_LOG = 'log'; + const MODE_BLOCK = 'block'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModeAllowableValues() + { + return [ + self::MODE_FALSE, + self::MODE_LOG, + self::MODE_BLOCK, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['mode'] = $data['mode'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['mode'] === null) { + $invalidProperties[] = "'mode' can't be null"; + } + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($this->container['mode']) && !in_array($this->container['mode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'mode', must be one of '%s'", + $this->container['mode'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mode + * + * @return string + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string $mode Operation mode + * + * @return self + */ + public function setMode($mode) + { + $allowedValues = $this->getModeAllowableValues(); + if (!in_array($mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'mode', must be one of '%s'", + $mode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['mode'] = $mode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseConfiguration.php b/lib/Model/DdosProtectionResponseConfiguration.php new file mode 100644 index 00000000..db8d487a --- /dev/null +++ b/lib/Model/DdosProtectionResponseConfiguration.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_configuration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'configuration' => '\Fastly\Model\DdosProtectionResponseConfigurationConfiguration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'configuration' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'configuration' => 'configuration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'configuration' => 'setConfiguration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'configuration' => 'getConfiguration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['configuration'] = $data['configuration'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets configuration + * + * @return \Fastly\Model\DdosProtectionResponseConfigurationConfiguration|null + */ + public function getConfiguration() + { + return $this->container['configuration']; + } + + /** + * Sets configuration + * + * @param \Fastly\Model\DdosProtectionResponseConfigurationConfiguration|null $configuration configuration + * + * @return self + */ + public function setConfiguration($configuration) + { + $this->container['configuration'] = $configuration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseConfigurationConfiguration.php b/lib/Model/DdosProtectionResponseConfigurationConfiguration.php new file mode 100644 index 00000000..e9ce3bc2 --- /dev/null +++ b/lib/Model/DdosProtectionResponseConfigurationConfiguration.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseConfigurationConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_configuration_configuration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'mode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'mode' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'mode' => 'mode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mode' => 'setMode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mode' => 'getMode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['mode'] = $data['mode'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mode + * + * @return string|null + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string|null $mode Operation mode + * + * @return self + */ + public function setMode($mode) + { + $this->container['mode'] = $mode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseConfigure.php b/lib/Model/DdosProtectionResponseConfigure.php new file mode 100644 index 00000000..7a59fcde --- /dev/null +++ b/lib/Model/DdosProtectionResponseConfigure.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseConfigure implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_configure'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DdosProtectionResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'configuration' => '\Fastly\Model\DdosProtectionResponseConfigurationConfiguration', + '_links' => '\Fastly\Model\DdosProtectionResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + 'configuration' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + 'configuration' => 'configuration', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + 'configuration' => 'setConfiguration', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + 'configuration' => 'getConfiguration', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['configuration'] = $data['configuration'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DdosProtectionResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DdosProtectionResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets configuration + * + * @return \Fastly\Model\DdosProtectionResponseConfigurationConfiguration|null + */ + public function getConfiguration() + { + return $this->container['configuration']; + } + + /** + * Sets configuration + * + * @param \Fastly\Model\DdosProtectionResponseConfigurationConfiguration|null $configuration configuration + * + * @return self + */ + public function setConfiguration($configuration) + { + $this->container['configuration'] = $configuration; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\DdosProtectionResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DdosProtectionResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseEnable.php b/lib/Model/DdosProtectionResponseEnable.php new file mode 100644 index 00000000..1f92ead9 --- /dev/null +++ b/lib/Model/DdosProtectionResponseEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DdosProtectionResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\DdosProtectionResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DdosProtectionResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DdosProtectionResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\DdosProtectionResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DdosProtectionResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseLinks.php b/lib/Model/DdosProtectionResponseLinks.php new file mode 100644 index 00000000..f1636e9b --- /dev/null +++ b/lib/Model/DdosProtectionResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\DdosProtectionResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\DdosProtectionResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DdosProtectionResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseLinksLinks.php b/lib/Model/DdosProtectionResponseLinksLinks.php new file mode 100644 index 00000000..e142b544 --- /dev/null +++ b/lib/Model/DdosProtectionResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseProduct.php b/lib/Model/DdosProtectionResponseProduct.php new file mode 100644 index 00000000..6f017e40 --- /dev/null +++ b/lib/Model/DdosProtectionResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DdosProtectionResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DdosProtectionResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DdosProtectionResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseProductProduct.php b/lib/Model/DdosProtectionResponseProductProduct.php new file mode 100644 index 00000000..f5e636d3 --- /dev/null +++ b/lib/Model/DdosProtectionResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseService.php b/lib/Model/DdosProtectionResponseService.php new file mode 100644 index 00000000..37e41e9a --- /dev/null +++ b/lib/Model/DdosProtectionResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorMeasurements.php b/lib/Model/DomainInspectorMeasurements.php index 40a3c0ae..c9defd7a 100644 --- a/lib/Model/DomainInspectorMeasurements.php +++ b/lib/Model/DomainInspectorMeasurements.php @@ -80,6 +80,7 @@ class DomainInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'requests' => 'int', 'resp_header_bytes' => 'int', 'resp_body_bytes' => 'int', @@ -111,6 +112,7 @@ class DomainInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS 'origin_status_503' => 'int', 'origin_status_504' => 'int', 'origin_status_505' => 'int', + 'origin_status_530' => 'int', 'origin_status_1xx' => 'int', 'origin_status_2xx' => 'int', 'origin_status_3xx' => 'int', @@ -126,68 +128,70 @@ class DomainInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $fastlyFormats = [ - 'edge_requests' => null, - 'edge_resp_header_bytes' => null, - 'edge_resp_body_bytes' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'requests' => null, - 'resp_header_bytes' => null, - 'resp_body_bytes' => null, - 'bereq_header_bytes' => null, - 'bereq_body_bytes' => null, - 'edge_hit_requests' => null, - 'edge_miss_requests' => null, - 'origin_fetches' => null, - 'origin_fetch_resp_header_bytes' => null, - 'origin_fetch_resp_body_bytes' => null, - 'bandwidth' => null, + 'edge_requests' => 'int64', + 'edge_resp_header_bytes' => 'int64', + 'edge_resp_body_bytes' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'requests' => 'int64', + 'resp_header_bytes' => 'int64', + 'resp_body_bytes' => 'int64', + 'bereq_header_bytes' => 'int64', + 'bereq_body_bytes' => 'int64', + 'edge_hit_requests' => 'int64', + 'edge_miss_requests' => 'int64', + 'origin_fetches' => 'int64', + 'origin_fetch_resp_header_bytes' => 'int64', + 'origin_fetch_resp_body_bytes' => 'int64', + 'bandwidth' => 'int64', 'edge_hit_ratio' => null, 'origin_offload' => null, - 'origin_status_200' => null, - 'origin_status_204' => null, - 'origin_status_206' => null, - 'origin_status_301' => null, - 'origin_status_302' => null, - 'origin_status_304' => null, - 'origin_status_400' => null, - 'origin_status_401' => null, - 'origin_status_403' => null, - 'origin_status_404' => null, - 'origin_status_416' => null, - 'origin_status_429' => null, - 'origin_status_500' => null, - 'origin_status_501' => null, - 'origin_status_502' => null, - 'origin_status_503' => null, - 'origin_status_504' => null, - 'origin_status_505' => null, - 'origin_status_1xx' => null, - 'origin_status_2xx' => null, - 'origin_status_3xx' => null, - 'origin_status_4xx' => null, - 'origin_status_5xx' => null + 'origin_status_200' => 'int64', + 'origin_status_204' => 'int64', + 'origin_status_206' => 'int64', + 'origin_status_301' => 'int64', + 'origin_status_302' => 'int64', + 'origin_status_304' => 'int64', + 'origin_status_400' => 'int64', + 'origin_status_401' => 'int64', + 'origin_status_403' => 'int64', + 'origin_status_404' => 'int64', + 'origin_status_416' => 'int64', + 'origin_status_429' => 'int64', + 'origin_status_500' => 'int64', + 'origin_status_501' => 'int64', + 'origin_status_502' => 'int64', + 'origin_status_503' => 'int64', + 'origin_status_504' => 'int64', + 'origin_status_505' => 'int64', + 'origin_status_530' => 'int64', + 'origin_status_1xx' => 'int64', + 'origin_status_2xx' => 'int64', + 'origin_status_3xx' => 'int64', + 'origin_status_4xx' => 'int64', + 'origin_status_5xx' => 'int64' ]; /** @@ -243,6 +247,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'requests' => 'requests', 'resp_header_bytes' => 'resp_header_bytes', 'resp_body_bytes' => 'resp_body_bytes', @@ -274,6 +279,7 @@ public static function fastlyFormats() 'origin_status_503' => 'origin_status_503', 'origin_status_504' => 'origin_status_504', 'origin_status_505' => 'origin_status_505', + 'origin_status_530' => 'origin_status_530', 'origin_status_1xx' => 'origin_status_1xx', 'origin_status_2xx' => 'origin_status_2xx', 'origin_status_3xx' => 'origin_status_3xx', @@ -313,6 +319,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'requests' => 'setRequests', 'resp_header_bytes' => 'setRespHeaderBytes', 'resp_body_bytes' => 'setRespBodyBytes', @@ -344,6 +351,7 @@ public static function fastlyFormats() 'origin_status_503' => 'setOriginStatus503', 'origin_status_504' => 'setOriginStatus504', 'origin_status_505' => 'setOriginStatus505', + 'origin_status_530' => 'setOriginStatus530', 'origin_status_1xx' => 'setOriginStatus1xx', 'origin_status_2xx' => 'setOriginStatus2xx', 'origin_status_3xx' => 'setOriginStatus3xx', @@ -383,6 +391,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'requests' => 'getRequests', 'resp_header_bytes' => 'getRespHeaderBytes', 'resp_body_bytes' => 'getRespBodyBytes', @@ -414,6 +423,7 @@ public static function fastlyFormats() 'origin_status_503' => 'getOriginStatus503', 'origin_status_504' => 'getOriginStatus504', 'origin_status_505' => 'getOriginStatus505', + 'origin_status_530' => 'getOriginStatus530', 'origin_status_1xx' => 'getOriginStatus1xx', 'origin_status_2xx' => 'getOriginStatus2xx', 'origin_status_3xx' => 'getOriginStatus3xx', @@ -504,6 +514,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['requests'] = $data['requests'] ?? null; $this->container['resp_header_bytes'] = $data['resp_header_bytes'] ?? null; $this->container['resp_body_bytes'] = $data['resp_body_bytes'] ?? null; @@ -535,6 +546,7 @@ public function __construct(array $data = null) $this->container['origin_status_503'] = $data['origin_status_503'] ?? null; $this->container['origin_status_504'] = $data['origin_status_504'] ?? null; $this->container['origin_status_505'] = $data['origin_status_505'] ?? null; + $this->container['origin_status_530'] = $data['origin_status_530'] ?? null; $this->container['origin_status_1xx'] = $data['origin_status_1xx'] ?? null; $this->container['origin_status_2xx'] = $data['origin_status_2xx'] ?? null; $this->container['origin_status_3xx'] = $data['origin_status_3xx'] ?? null; @@ -1190,6 +1202,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses delivered with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets requests * @@ -1934,6 +1970,30 @@ public function setOriginStatus505($origin_status_505) return $this; } + /** + * Gets origin_status_530 + * + * @return int|null + */ + public function getOriginStatus530() + { + return $this->container['origin_status_530']; + } + + /** + * Sets origin_status_530 + * + * @param int|null $origin_status_530 Number of responses received from origin with status code 530. + * + * @return self + */ + public function setOriginStatus530($origin_status_530) + { + $this->container['origin_status_530'] = $origin_status_530; + + return $this; + } + /** * Gets origin_status_1xx * diff --git a/lib/Model/DomainInspectorResponseBodyEnable.php b/lib/Model/DomainInspectorResponseBodyEnable.php new file mode 100644 index 00000000..1fb13602 --- /dev/null +++ b/lib/Model/DomainInspectorResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DomainInspectorResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\DomainInspectorResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DomainInspectorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DomainInspectorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\DomainInspectorResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DomainInspectorResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseLinks.php b/lib/Model/DomainInspectorResponseLinks.php new file mode 100644 index 00000000..2a26203f --- /dev/null +++ b/lib/Model/DomainInspectorResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\DomainInspectorResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\DomainInspectorResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DomainInspectorResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseLinksLinks.php b/lib/Model/DomainInspectorResponseLinksLinks.php new file mode 100644 index 00000000..653db0a7 --- /dev/null +++ b/lib/Model/DomainInspectorResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseProduct.php b/lib/Model/DomainInspectorResponseProduct.php new file mode 100644 index 00000000..230a526e --- /dev/null +++ b/lib/Model/DomainInspectorResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DomainInspectorResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DomainInspectorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DomainInspectorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseProductProduct.php b/lib/Model/DomainInspectorResponseProductProduct.php new file mode 100644 index 00000000..6e1727c0 --- /dev/null +++ b/lib/Model/DomainInspectorResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseService.php b/lib/Model/DomainInspectorResponseService.php new file mode 100644 index 00000000..9d96d50f --- /dev/null +++ b/lib/Model/DomainInspectorResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/FanoutResponseBodyEnable.php b/lib/Model/FanoutResponseBodyEnable.php new file mode 100644 index 00000000..4306b398 --- /dev/null +++ b/lib/Model/FanoutResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FanoutResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'fanout_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\FanoutResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\FanoutResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\FanoutResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\FanoutResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\FanoutResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\FanoutResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/FanoutResponseLinks.php b/lib/Model/FanoutResponseLinks.php new file mode 100644 index 00000000..ee6cef9e --- /dev/null +++ b/lib/Model/FanoutResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FanoutResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'fanout_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\FanoutResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\FanoutResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\FanoutResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EnabledProductResponseLinks.php b/lib/Model/FanoutResponseLinksLinks.php similarity index 96% rename from lib/Model/EnabledProductResponseLinks.php rename to lib/Model/FanoutResponseLinksLinks.php index abbc8d40..af7781b9 100644 --- a/lib/Model/EnabledProductResponseLinks.php +++ b/lib/Model/FanoutResponseLinksLinks.php @@ -1,6 +1,6 @@ + * @template TKey int|null + * @template TValue mixed|null + */ +class FanoutResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'fanout_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\FanoutResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\FanoutResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\FanoutResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EnabledProductResponseProduct.php b/lib/Model/FanoutResponseProductProduct.php similarity index 96% rename from lib/Model/EnabledProductResponseProduct.php rename to lib/Model/FanoutResponseProductProduct.php index 74820649..aa3ac030 100644 --- a/lib/Model/EnabledProductResponseProduct.php +++ b/lib/Model/FanoutResponseProductProduct.php @@ -1,6 +1,6 @@ + * @template TKey int|null + * @template TValue mixed|null + */ +class FanoutResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'fanout_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseBodyEnable.php b/lib/Model/ImageOptimizerResponseBodyEnable.php new file mode 100644 index 00000000..a4e49f74 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ImageOptimizerResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\ImageOptimizerResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ImageOptimizerResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ImageOptimizerResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\ImageOptimizerResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ImageOptimizerResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseLinks.php b/lib/Model/ImageOptimizerResponseLinks.php new file mode 100644 index 00000000..9557244f --- /dev/null +++ b/lib/Model/ImageOptimizerResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\ImageOptimizerResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\ImageOptimizerResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ImageOptimizerResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseLinksLinks.php b/lib/Model/ImageOptimizerResponseLinksLinks.php new file mode 100644 index 00000000..f4c4b56f --- /dev/null +++ b/lib/Model/ImageOptimizerResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseProduct.php b/lib/Model/ImageOptimizerResponseProduct.php new file mode 100644 index 00000000..208cd78d --- /dev/null +++ b/lib/Model/ImageOptimizerResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ImageOptimizerResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ImageOptimizerResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ImageOptimizerResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseProductProduct.php b/lib/Model/ImageOptimizerResponseProductProduct.php new file mode 100644 index 00000000..02361055 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseService.php b/lib/Model/ImageOptimizerResponseService.php new file mode 100644 index 00000000..43315469 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse2003.php b/lib/Model/InlineResponse2003.php index cc916ab1..945b25a3 100644 --- a/lib/Model/InlineResponse2003.php +++ b/lib/Model/InlineResponse2003.php @@ -53,8 +53,8 @@ class InlineResponse2003 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\StoreResponse[]', - 'meta' => '\Fastly\Model\InlineResponse2003Meta' + 'data' => '\Fastly\Model\KvStoreDetails[]', + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\StoreResponse[]|null + * @return \Fastly\Model\KvStoreDetails[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\StoreResponse[]|null $data data + * @param \Fastly\Model\KvStoreDetails[]|null $data data * * @return self */ @@ -232,7 +232,7 @@ public function setData($data) /** * Gets meta * - * @return \Fastly\Model\InlineResponse2003Meta|null + * @return \Fastly\Model\PaginationCursorMeta|null */ public function getMeta() { @@ -242,7 +242,7 @@ public function getMeta() /** * Sets meta * - * @param \Fastly\Model\InlineResponse2003Meta|null $meta meta + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta * * @return self */ diff --git a/lib/Model/InlineResponse2003Meta.php b/lib/Model/InlineResponse2003Meta.php deleted file mode 100644 index 3f5de307..00000000 --- a/lib/Model/InlineResponse2003Meta.php +++ /dev/null @@ -1,345 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class InlineResponse2003Meta implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'inline_response_200_3_meta'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'next_cursor' => 'string', - 'limit' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'next_cursor' => null, - 'limit' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'next_cursor' => 'next_cursor', - 'limit' => 'limit' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'next_cursor' => 'setNextCursor', - 'limit' => 'setLimit' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'next_cursor' => 'getNextCursor', - 'limit' => 'getLimit' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['next_cursor'] = $data['next_cursor'] ?? null; - $this->container['limit'] = $data['limit'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets next_cursor - * - * @return string|null - */ - public function getNextCursor() - { - return $this->container['next_cursor']; - } - - /** - * Sets next_cursor - * - * @param string|null $next_cursor Cursor for the next page. - * - * @return self - */ - public function setNextCursor($next_cursor) - { - $this->container['next_cursor'] = $next_cursor; - - return $this; - } - - /** - * Gets limit - * - * @return int|null - */ - public function getLimit() - { - return $this->container['limit']; - } - - /** - * Sets limit - * - * @param int|null $limit Entries returned. - * - * @return self - */ - public function setLimit($limit) - { - $this->container['limit'] = $limit; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2004.php b/lib/Model/InlineResponse2004.php index 12cc406d..640420b9 100644 --- a/lib/Model/InlineResponse2004.php +++ b/lib/Model/InlineResponse2004.php @@ -54,7 +54,7 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $fastlyTypes = [ 'data' => 'string[]', - 'meta' => '\Fastly\Model\InlineResponse2004Meta' + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -232,7 +232,7 @@ public function setData($data) /** * Gets meta * - * @return \Fastly\Model\InlineResponse2004Meta|null + * @return \Fastly\Model\PaginationCursorMeta|null */ public function getMeta() { @@ -242,7 +242,7 @@ public function getMeta() /** * Sets meta * - * @param \Fastly\Model\InlineResponse2004Meta|null $meta meta + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta * * @return self */ diff --git a/lib/Model/InlineResponse2004Meta.php b/lib/Model/InlineResponse2004Meta.php deleted file mode 100644 index 61b7829d..00000000 --- a/lib/Model/InlineResponse2004Meta.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class InlineResponse2004Meta implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'inline_response_200_4_meta'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'next_cursor' => 'string', - 'limit' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'next_cursor' => null, - 'limit' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'next_cursor' => 'next_cursor', - 'limit' => 'limit' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'next_cursor' => 'setNextCursor', - 'limit' => 'setLimit' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'next_cursor' => 'getNextCursor', - 'limit' => 'getLimit' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['next_cursor'] = $data['next_cursor'] ?? null; - $this->container['limit'] = $data['limit'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets next_cursor - * - * @return string|null - */ - public function getNextCursor() - { - return $this->container['next_cursor']; - } - - /** - * Sets next_cursor - * - * @param string|null $next_cursor next_cursor - * - * @return self - */ - public function setNextCursor($next_cursor) - { - $this->container['next_cursor'] = $next_cursor; - - return $this; - } - - /** - * Gets limit - * - * @return int|null - */ - public function getLimit() - { - return $this->container['limit']; - } - - /** - * Sets limit - * - * @param int|null $limit limit - * - * @return self - */ - public function setLimit($limit) - { - $this->container['limit'] = $limit; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Batch.php b/lib/Model/KvStoreBatchResponse.php similarity index 94% rename from lib/Model/Batch.php rename to lib/Model/KvStoreBatchResponse.php index 38427cab..2de53556 100644 --- a/lib/Model/Batch.php +++ b/lib/Model/KvStoreBatchResponse.php @@ -1,6 +1,6 @@ 'string', 'type' => 'string', - 'errors' => '\Fastly\Model\BatchErrors[]' + 'errors' => '\Fastly\Model\KvStoreBatchResponseErrors[]' ]; /** @@ -262,7 +262,7 @@ public function setType($type) /** * Gets errors * - * @return \Fastly\Model\BatchErrors[]|null + * @return \Fastly\Model\KvStoreBatchResponseErrors[]|null */ public function getErrors() { @@ -272,7 +272,7 @@ public function getErrors() /** * Sets errors * - * @param \Fastly\Model\BatchErrors[]|null $errors Per-key errors which failed to parse, validate, or otherwise transmit + * @param \Fastly\Model\KvStoreBatchResponseErrors[]|null $errors Errors which occurred while handling the items in the request * * @return self */ diff --git a/lib/Model/BatchErrors.php b/lib/Model/KvStoreBatchResponseErrors.php similarity index 93% rename from lib/Model/BatchErrors.php rename to lib/Model/KvStoreBatchResponseErrors.php index 200ff908..02215a57 100644 --- a/lib/Model/BatchErrors.php +++ b/lib/Model/KvStoreBatchResponseErrors.php @@ -1,6 +1,6 @@ container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } return $invalidProperties; } @@ -202,7 +205,7 @@ public function valid() /** * Gets name * - * @return string|null + * @return string */ public function getName() { @@ -212,7 +215,7 @@ public function getName() /** * Sets name * - * @param string|null $name Name of the tag. + * @param string $name A human-readable name for the store. Refer to https://www.fastly.com/documentation/guides/concepts/edge-state/data-stores/#limitations-and-constraints for constraints on the KV store name. * * @return self */ diff --git a/lib/Model/LegacyWafUpdateStatus.php b/lib/Model/KvStoreUpsertBatch.php similarity index 63% rename from lib/Model/LegacyWafUpdateStatus.php rename to lib/Model/KvStoreUpsertBatch.php index 75bac6be..e3c2fc98 100644 --- a/lib/Model/LegacyWafUpdateStatus.php +++ b/lib/Model/KvStoreUpsertBatch.php @@ -1,6 +1,6 @@ 'string', - 'created_at' => 'string', - 'data' => 'string', - 'message' => 'string', - 'status' => 'string', - 'updated_at' => 'string' + 'key' => 'string', + 'value' => 'string', + 'time_to_live_sec' => 'int', + 'metadata' => 'string', + 'background_fetch' => 'bool' ]; /** @@ -69,12 +68,11 @@ class LegacyWafUpdateStatus implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $fastlyFormats = [ - 'completed_at' => null, - 'created_at' => null, - 'data' => null, - 'message' => null, - 'status' => null, - 'updated_at' => null + 'key' => null, + 'value' => null, + 'time_to_live_sec' => null, + 'metadata' => null, + 'background_fetch' => null ]; /** @@ -104,12 +102,11 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'completed_at' => 'completed_at', - 'created_at' => 'created_at', - 'data' => 'data', - 'message' => 'message', - 'status' => 'status', - 'updated_at' => 'updated_at' + 'key' => 'key', + 'value' => 'value', + 'time_to_live_sec' => 'time_to_live_sec', + 'metadata' => 'metadata', + 'background_fetch' => 'background_fetch' ]; /** @@ -118,12 +115,11 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'completed_at' => 'setCompletedAt', - 'created_at' => 'setCreatedAt', - 'data' => 'setData', - 'message' => 'setMessage', - 'status' => 'setStatus', - 'updated_at' => 'setUpdatedAt' + 'key' => 'setKey', + 'value' => 'setValue', + 'time_to_live_sec' => 'setTimeToLiveSec', + 'metadata' => 'setMetadata', + 'background_fetch' => 'setBackgroundFetch' ]; /** @@ -132,12 +128,11 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'completed_at' => 'getCompletedAt', - 'created_at' => 'getCreatedAt', - 'data' => 'getData', - 'message' => 'getMessage', - 'status' => 'getStatus', - 'updated_at' => 'getUpdatedAt' + 'key' => 'getKey', + 'value' => 'getValue', + 'time_to_live_sec' => 'getTimeToLiveSec', + 'metadata' => 'getMetadata', + 'background_fetch' => 'getBackgroundFetch' ]; /** @@ -197,12 +192,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['completed_at'] = $data['completed_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['message'] = $data['message'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['key'] = $data['key'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['time_to_live_sec'] = $data['time_to_live_sec'] ?? null; + $this->container['metadata'] = $data['metadata'] ?? null; + $this->container['background_fetch'] = $data['background_fetch'] ?? false; } /** @@ -214,6 +208,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['key'] === null) { + $invalidProperties[] = "'key' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } return $invalidProperties; } @@ -230,145 +230,121 @@ public function valid() /** - * Gets completed_at + * Gets key * - * @return string|null - */ - public function getCompletedAt() - { - return $this->container['completed_at']; - } - - /** - * Sets completed_at - * - * @param string|null $completed_at Date and time that job was completed. - * - * @return self - */ - public function setCompletedAt($completed_at) - { - $this->container['completed_at'] = $completed_at; - - return $this; - } - - /** - * Gets created_at - * - * @return string|null + * @return string */ - public function getCreatedAt() + public function getKey() { - return $this->container['created_at']; + return $this->container['key']; } /** - * Sets created_at + * Sets key * - * @param string|null $created_at Date and time that job was created. + * @param string $key The key of the item to be added, updated, retrieved, or deleted. * * @return self */ - public function setCreatedAt($created_at) + public function setKey($key) { - $this->container['created_at'] = $created_at; + $this->container['key'] = $key; return $this; } /** - * Gets data + * Gets value * - * @return string|null + * @return string */ - public function getData() + public function getValue() { - return $this->container['data']; + return $this->container['value']; } /** - * Sets data + * Sets value * - * @param string|null $data This field can contain data passed to the background worker as well as output from the background job. + * @param string $value Value for the item (in Base64 encoding). * * @return self */ - public function setData($data) + public function setValue($value) { - $this->container['data'] = $data; + $this->container['value'] = $value; return $this; } /** - * Gets message + * Gets time_to_live_sec * - * @return string|null + * @return int|null */ - public function getMessage() + public function getTimeToLiveSec() { - return $this->container['message']; + return $this->container['time_to_live_sec']; } /** - * Sets message + * Sets time_to_live_sec * - * @param string|null $message Message with information about the status of the update. + * @param int|null $time_to_live_sec Indicates that the item should be deleted after the specified number of seconds have elapsed. Deletion is not immediate but will occur within 24 hours of the requested expiration. * * @return self */ - public function setMessage($message) + public function setTimeToLiveSec($time_to_live_sec) { - $this->container['message'] = $message; + $this->container['time_to_live_sec'] = $time_to_live_sec; return $this; } /** - * Gets status + * Gets metadata * * @return string|null */ - public function getStatus() + public function getMetadata() { - return $this->container['status']; + return $this->container['metadata']; } /** - * Sets status + * Sets metadata * - * @param string|null $status Current status of the update. + * @param string|null $metadata An arbitrary data field which can contain up to 2000 bytes of data. * * @return self */ - public function setStatus($status) + public function setMetadata($metadata) { - $this->container['status'] = $status; + $this->container['metadata'] = $metadata; return $this; } /** - * Gets updated_at + * Gets background_fetch * - * @return string|null + * @return bool|null */ - public function getUpdatedAt() + public function getBackgroundFetch() { - return $this->container['updated_at']; + return $this->container['background_fetch']; } /** - * Sets updated_at + * Sets background_fetch * - * @param string|null $updated_at Date and time that job was last updated. + * @param bool|null $background_fetch If set to true, the new value for the item will not be immediately visible to other users of the KV store; they will receive the existing (stale) value while the platform updates cached copies. Setting this to true ensures that other users of the KV store will receive responses to 'get' operations for this item quickly, although they will be slightly out of date. * * @return self */ - public function setUpdatedAt($updated_at) + public function setBackgroundFetch($background_fetch) { - $this->container['updated_at'] = $updated_at; + $this->container['background_fetch'] = $background_fetch; return $this; } diff --git a/lib/Model/LegacyWafConfigurationSet.php b/lib/Model/LegacyWafConfigurationSet.php deleted file mode 100644 index 73a45f38..00000000 --- a/lib/Model/LegacyWafConfigurationSet.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class LegacyWafConfigurationSet implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'legacy_waf_configuration_set'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'active' => 'bool', - 'name' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'active' => null, - 'name' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'active' => 'active', - 'name' => 'name' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'active' => 'setActive', - 'name' => 'setName' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'active' => 'getActive', - 'name' => 'getName' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['active'] = $data['active'] ?? null; - $this->container['name'] = $data['name'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets active - * - * @return bool|null - */ - public function getActive() - { - return $this->container['active']; - } - - /** - * Sets active - * - * @param bool|null $active The active configuration set is the default configuration set when creating a new WAF. When Fastly adds configuration sets, the new versions become the default (active). - * - * @return self - */ - public function setActive($active) - { - $this->container['active'] = $active; - - return $this; - } - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name of the configuration set. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LegacyWafFirewall.php b/lib/Model/LegacyWafFirewall.php deleted file mode 100644 index e14f6c89..00000000 --- a/lib/Model/LegacyWafFirewall.php +++ /dev/null @@ -1,554 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class LegacyWafFirewall implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'legacy_waf_firewall'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'last_push' => 'string', - 'prefetch_condition' => 'string', - 'response' => 'string', - 'version' => '\Fastly\Model\ReadOnlyVersion', - 'service_id' => '\Fastly\Model\ReadOnlyServiceId', - 'disabled' => 'bool', - 'rule_statuses_log_count' => 'int', - 'rule_statuses_block_count' => 'int', - 'rule_statuses_disabled_count' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'last_push' => null, - 'prefetch_condition' => null, - 'response' => null, - 'version' => null, - 'service_id' => null, - 'disabled' => null, - 'rule_statuses_log_count' => null, - 'rule_statuses_block_count' => null, - 'rule_statuses_disabled_count' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'last_push' => 'last_push', - 'prefetch_condition' => 'prefetch_condition', - 'response' => 'response', - 'version' => 'version', - 'service_id' => 'service_id', - 'disabled' => 'disabled', - 'rule_statuses_log_count' => 'rule_statuses_log_count', - 'rule_statuses_block_count' => 'rule_statuses_block_count', - 'rule_statuses_disabled_count' => 'rule_statuses_disabled_count' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'last_push' => 'setLastPush', - 'prefetch_condition' => 'setPrefetchCondition', - 'response' => 'setResponse', - 'version' => 'setVersion', - 'service_id' => 'setServiceId', - 'disabled' => 'setDisabled', - 'rule_statuses_log_count' => 'setRuleStatusesLogCount', - 'rule_statuses_block_count' => 'setRuleStatusesBlockCount', - 'rule_statuses_disabled_count' => 'setRuleStatusesDisabledCount' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'last_push' => 'getLastPush', - 'prefetch_condition' => 'getPrefetchCondition', - 'response' => 'getResponse', - 'version' => 'getVersion', - 'service_id' => 'getServiceId', - 'disabled' => 'getDisabled', - 'rule_statuses_log_count' => 'getRuleStatusesLogCount', - 'rule_statuses_block_count' => 'getRuleStatusesBlockCount', - 'rule_statuses_disabled_count' => 'getRuleStatusesDisabledCount' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['last_push'] = $data['last_push'] ?? null; - $this->container['prefetch_condition'] = $data['prefetch_condition'] ?? null; - $this->container['response'] = $data['response'] ?? null; - $this->container['version'] = $data['version'] ?? null; - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['disabled'] = $data['disabled'] ?? false; - $this->container['rule_statuses_log_count'] = $data['rule_statuses_log_count'] ?? null; - $this->container['rule_statuses_block_count'] = $data['rule_statuses_block_count'] ?? null; - $this->container['rule_statuses_disabled_count'] = $data['rule_statuses_disabled_count'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets last_push - * - * @return string|null - */ - public function getLastPush() - { - return $this->container['last_push']; - } - - /** - * Sets last_push - * - * @param string|null $last_push Date and time that VCL was last pushed to cache nodes. - * - * @return self - */ - public function setLastPush($last_push) - { - $this->container['last_push'] = $last_push; - - return $this; - } - - /** - * Gets prefetch_condition - * - * @return string|null - */ - public function getPrefetchCondition() - { - return $this->container['prefetch_condition']; - } - - /** - * Sets prefetch_condition - * - * @param string|null $prefetch_condition Name of the corresponding condition object. - * - * @return self - */ - public function setPrefetchCondition($prefetch_condition) - { - $this->container['prefetch_condition'] = $prefetch_condition; - - return $this; - } - - /** - * Gets response - * - * @return string|null - */ - public function getResponse() - { - return $this->container['response']; - } - - /** - * Sets response - * - * @param string|null $response Name of the corresponding response object. - * - * @return self - */ - public function setResponse($response) - { - $this->container['response'] = $response; - - return $this; - } - - /** - * Gets version - * - * @return \Fastly\Model\ReadOnlyVersion|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param \Fastly\Model\ReadOnlyVersion|null $version version - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - - /** - * Gets service_id - * - * @return \Fastly\Model\ReadOnlyServiceId|null - */ - public function getServiceId() - { - return $this->container['service_id']; - } - - /** - * Sets service_id - * - * @param \Fastly\Model\ReadOnlyServiceId|null $service_id service_id - * - * @return self - */ - public function setServiceId($service_id) - { - $this->container['service_id'] = $service_id; - - return $this; - } - - /** - * Gets disabled - * - * @return bool|null - */ - public function getDisabled() - { - return $this->container['disabled']; - } - - /** - * Sets disabled - * - * @param bool|null $disabled The status of the firewall. - * - * @return self - */ - public function setDisabled($disabled) - { - $this->container['disabled'] = $disabled; - - return $this; - } - - /** - * Gets rule_statuses_log_count - * - * @return int|null - */ - public function getRuleStatusesLogCount() - { - return $this->container['rule_statuses_log_count']; - } - - /** - * Sets rule_statuses_log_count - * - * @param int|null $rule_statuses_log_count The number of rule statuses set to log. - * - * @return self - */ - public function setRuleStatusesLogCount($rule_statuses_log_count) - { - $this->container['rule_statuses_log_count'] = $rule_statuses_log_count; - - return $this; - } - - /** - * Gets rule_statuses_block_count - * - * @return int|null - */ - public function getRuleStatusesBlockCount() - { - return $this->container['rule_statuses_block_count']; - } - - /** - * Sets rule_statuses_block_count - * - * @param int|null $rule_statuses_block_count The number of rule statuses set to block. - * - * @return self - */ - public function setRuleStatusesBlockCount($rule_statuses_block_count) - { - $this->container['rule_statuses_block_count'] = $rule_statuses_block_count; - - return $this; - } - - /** - * Gets rule_statuses_disabled_count - * - * @return int|null - */ - public function getRuleStatusesDisabledCount() - { - return $this->container['rule_statuses_disabled_count']; - } - - /** - * Sets rule_statuses_disabled_count - * - * @param int|null $rule_statuses_disabled_count The number of rule statuses set to disabled. - * - * @return self - */ - public function setRuleStatusesDisabledCount($rule_statuses_disabled_count) - { - $this->container['rule_statuses_disabled_count'] = $rule_statuses_disabled_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LegacyWafOwasp.php b/lib/Model/LegacyWafOwasp.php deleted file mode 100644 index 7d3049f1..00000000 --- a/lib/Model/LegacyWafOwasp.php +++ /dev/null @@ -1,1154 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class LegacyWafOwasp implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'legacy_waf_owasp'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'allowed_http_versions' => 'string', - 'allowed_methods' => 'string', - 'allowed_request_content_type' => 'string', - 'arg_length' => 'int', - 'arg_name_length' => 'int', - 'combined_file_sizes' => 'int', - 'created_at' => 'string', - 'critical_anomaly_score' => 'int', - 'crs_validate_utf8_encoding' => 'bool', - 'error_anomaly_score' => 'int', - 'high_risk_country_codes' => 'string', - 'http_violation_score_threshold' => 'int', - 'inbound_anomaly_score_threshold' => 'int', - 'lfi_score_threshold' => 'int', - 'max_file_size' => 'int', - 'max_num_args' => 'int', - 'notice_anomaly_score' => 'int', - 'paranoia_level' => 'int', - 'php_injection_score_threshold' => 'int', - 'rce_score_threshold' => 'int', - 'restricted_extensions' => 'string', - 'restricted_headers' => 'string', - 'rfi_score_threshold' => 'int', - 'session_fixation_score_threshold' => 'int', - 'sql_injection_score_threshold' => 'int', - 'total_arg_length' => 'int', - 'updated_at' => 'string', - 'warning_anomaly_score' => 'int', - 'xss_score_threshold' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'allowed_http_versions' => null, - 'allowed_methods' => null, - 'allowed_request_content_type' => null, - 'arg_length' => null, - 'arg_name_length' => null, - 'combined_file_sizes' => null, - 'created_at' => null, - 'critical_anomaly_score' => null, - 'crs_validate_utf8_encoding' => null, - 'error_anomaly_score' => null, - 'high_risk_country_codes' => null, - 'http_violation_score_threshold' => null, - 'inbound_anomaly_score_threshold' => null, - 'lfi_score_threshold' => null, - 'max_file_size' => null, - 'max_num_args' => null, - 'notice_anomaly_score' => null, - 'paranoia_level' => null, - 'php_injection_score_threshold' => null, - 'rce_score_threshold' => null, - 'restricted_extensions' => null, - 'restricted_headers' => null, - 'rfi_score_threshold' => null, - 'session_fixation_score_threshold' => null, - 'sql_injection_score_threshold' => null, - 'total_arg_length' => null, - 'updated_at' => null, - 'warning_anomaly_score' => null, - 'xss_score_threshold' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'allowed_http_versions' => 'allowed_http_versions', - 'allowed_methods' => 'allowed_methods', - 'allowed_request_content_type' => 'allowed_request_content_type', - 'arg_length' => 'arg_length', - 'arg_name_length' => 'arg_name_length', - 'combined_file_sizes' => 'combined_file_sizes', - 'created_at' => 'created_at', - 'critical_anomaly_score' => 'critical_anomaly_score', - 'crs_validate_utf8_encoding' => 'crs_validate_utf8_encoding', - 'error_anomaly_score' => 'error_anomaly_score', - 'high_risk_country_codes' => 'high_risk_country_codes', - 'http_violation_score_threshold' => 'http_violation_score_threshold', - 'inbound_anomaly_score_threshold' => 'inbound_anomaly_score_threshold', - 'lfi_score_threshold' => 'lfi_score_threshold', - 'max_file_size' => 'max_file_size', - 'max_num_args' => 'max_num_args', - 'notice_anomaly_score' => 'notice_anomaly_score', - 'paranoia_level' => 'paranoia_level', - 'php_injection_score_threshold' => 'php_injection_score_threshold', - 'rce_score_threshold' => 'rce_score_threshold', - 'restricted_extensions' => 'restricted_extensions', - 'restricted_headers' => 'restricted_headers', - 'rfi_score_threshold' => 'rfi_score_threshold', - 'session_fixation_score_threshold' => 'session_fixation_score_threshold', - 'sql_injection_score_threshold' => 'sql_injection_score_threshold', - 'total_arg_length' => 'total_arg_length', - 'updated_at' => 'updated_at', - 'warning_anomaly_score' => 'warning_anomaly_score', - 'xss_score_threshold' => 'xss_score_threshold' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'allowed_http_versions' => 'setAllowedHttpVersions', - 'allowed_methods' => 'setAllowedMethods', - 'allowed_request_content_type' => 'setAllowedRequestContentType', - 'arg_length' => 'setArgLength', - 'arg_name_length' => 'setArgNameLength', - 'combined_file_sizes' => 'setCombinedFileSizes', - 'created_at' => 'setCreatedAt', - 'critical_anomaly_score' => 'setCriticalAnomalyScore', - 'crs_validate_utf8_encoding' => 'setCrsValidateUtf8Encoding', - 'error_anomaly_score' => 'setErrorAnomalyScore', - 'high_risk_country_codes' => 'setHighRiskCountryCodes', - 'http_violation_score_threshold' => 'setHttpViolationScoreThreshold', - 'inbound_anomaly_score_threshold' => 'setInboundAnomalyScoreThreshold', - 'lfi_score_threshold' => 'setLfiScoreThreshold', - 'max_file_size' => 'setMaxFileSize', - 'max_num_args' => 'setMaxNumArgs', - 'notice_anomaly_score' => 'setNoticeAnomalyScore', - 'paranoia_level' => 'setParanoiaLevel', - 'php_injection_score_threshold' => 'setPhpInjectionScoreThreshold', - 'rce_score_threshold' => 'setRceScoreThreshold', - 'restricted_extensions' => 'setRestrictedExtensions', - 'restricted_headers' => 'setRestrictedHeaders', - 'rfi_score_threshold' => 'setRfiScoreThreshold', - 'session_fixation_score_threshold' => 'setSessionFixationScoreThreshold', - 'sql_injection_score_threshold' => 'setSqlInjectionScoreThreshold', - 'total_arg_length' => 'setTotalArgLength', - 'updated_at' => 'setUpdatedAt', - 'warning_anomaly_score' => 'setWarningAnomalyScore', - 'xss_score_threshold' => 'setXssScoreThreshold' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'allowed_http_versions' => 'getAllowedHttpVersions', - 'allowed_methods' => 'getAllowedMethods', - 'allowed_request_content_type' => 'getAllowedRequestContentType', - 'arg_length' => 'getArgLength', - 'arg_name_length' => 'getArgNameLength', - 'combined_file_sizes' => 'getCombinedFileSizes', - 'created_at' => 'getCreatedAt', - 'critical_anomaly_score' => 'getCriticalAnomalyScore', - 'crs_validate_utf8_encoding' => 'getCrsValidateUtf8Encoding', - 'error_anomaly_score' => 'getErrorAnomalyScore', - 'high_risk_country_codes' => 'getHighRiskCountryCodes', - 'http_violation_score_threshold' => 'getHttpViolationScoreThreshold', - 'inbound_anomaly_score_threshold' => 'getInboundAnomalyScoreThreshold', - 'lfi_score_threshold' => 'getLfiScoreThreshold', - 'max_file_size' => 'getMaxFileSize', - 'max_num_args' => 'getMaxNumArgs', - 'notice_anomaly_score' => 'getNoticeAnomalyScore', - 'paranoia_level' => 'getParanoiaLevel', - 'php_injection_score_threshold' => 'getPhpInjectionScoreThreshold', - 'rce_score_threshold' => 'getRceScoreThreshold', - 'restricted_extensions' => 'getRestrictedExtensions', - 'restricted_headers' => 'getRestrictedHeaders', - 'rfi_score_threshold' => 'getRfiScoreThreshold', - 'session_fixation_score_threshold' => 'getSessionFixationScoreThreshold', - 'sql_injection_score_threshold' => 'getSqlInjectionScoreThreshold', - 'total_arg_length' => 'getTotalArgLength', - 'updated_at' => 'getUpdatedAt', - 'warning_anomaly_score' => 'getWarningAnomalyScore', - 'xss_score_threshold' => 'getXssScoreThreshold' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['allowed_http_versions'] = $data['allowed_http_versions'] ?? 'HTTP/1.0 HTTP/1.1 HTTP/2'; - $this->container['allowed_methods'] = $data['allowed_methods'] ?? 'GET HEAD POST OPTIONS PUT PATCH DELETE'; - $this->container['allowed_request_content_type'] = $data['allowed_request_content_type'] ?? 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json|text/plain'; - $this->container['arg_length'] = $data['arg_length'] ?? 400; - $this->container['arg_name_length'] = $data['arg_name_length'] ?? 100; - $this->container['combined_file_sizes'] = $data['combined_file_sizes'] ?? 10000000; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['critical_anomaly_score'] = $data['critical_anomaly_score'] ?? 6; - $this->container['crs_validate_utf8_encoding'] = $data['crs_validate_utf8_encoding'] ?? null; - $this->container['error_anomaly_score'] = $data['error_anomaly_score'] ?? 5; - $this->container['high_risk_country_codes'] = $data['high_risk_country_codes'] ?? null; - $this->container['http_violation_score_threshold'] = $data['http_violation_score_threshold'] ?? null; - $this->container['inbound_anomaly_score_threshold'] = $data['inbound_anomaly_score_threshold'] ?? null; - $this->container['lfi_score_threshold'] = $data['lfi_score_threshold'] ?? null; - $this->container['max_file_size'] = $data['max_file_size'] ?? 10000000; - $this->container['max_num_args'] = $data['max_num_args'] ?? 255; - $this->container['notice_anomaly_score'] = $data['notice_anomaly_score'] ?? 4; - $this->container['paranoia_level'] = $data['paranoia_level'] ?? 1; - $this->container['php_injection_score_threshold'] = $data['php_injection_score_threshold'] ?? null; - $this->container['rce_score_threshold'] = $data['rce_score_threshold'] ?? null; - $this->container['restricted_extensions'] = $data['restricted_extensions'] ?? '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx'; - $this->container['restricted_headers'] = $data['restricted_headers'] ?? '/proxy/ /lock-token/ /content-range/ /translate/ /if/'; - $this->container['rfi_score_threshold'] = $data['rfi_score_threshold'] ?? null; - $this->container['session_fixation_score_threshold'] = $data['session_fixation_score_threshold'] ?? null; - $this->container['sql_injection_score_threshold'] = $data['sql_injection_score_threshold'] ?? null; - $this->container['total_arg_length'] = $data['total_arg_length'] ?? 6400; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['warning_anomaly_score'] = $data['warning_anomaly_score'] ?? null; - $this->container['xss_score_threshold'] = $data['xss_score_threshold'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets allowed_http_versions - * - * @return string|null - */ - public function getAllowedHttpVersions() - { - return $this->container['allowed_http_versions']; - } - - /** - * Sets allowed_http_versions - * - * @param string|null $allowed_http_versions Allowed HTTP versions. - * - * @return self - */ - public function setAllowedHttpVersions($allowed_http_versions) - { - $this->container['allowed_http_versions'] = $allowed_http_versions; - - return $this; - } - - /** - * Gets allowed_methods - * - * @return string|null - */ - public function getAllowedMethods() - { - return $this->container['allowed_methods']; - } - - /** - * Sets allowed_methods - * - * @param string|null $allowed_methods A space-separated list of HTTP method names. - * - * @return self - */ - public function setAllowedMethods($allowed_methods) - { - $this->container['allowed_methods'] = $allowed_methods; - - return $this; - } - - /** - * Gets allowed_request_content_type - * - * @return string|null - */ - public function getAllowedRequestContentType() - { - return $this->container['allowed_request_content_type']; - } - - /** - * Sets allowed_request_content_type - * - * @param string|null $allowed_request_content_type Allowed request content types. - * - * @return self - */ - public function setAllowedRequestContentType($allowed_request_content_type) - { - $this->container['allowed_request_content_type'] = $allowed_request_content_type; - - return $this; - } - - /** - * Gets arg_length - * - * @return int|null - */ - public function getArgLength() - { - return $this->container['arg_length']; - } - - /** - * Sets arg_length - * - * @param int|null $arg_length The maximum allowed length of an argument. - * - * @return self - */ - public function setArgLength($arg_length) - { - $this->container['arg_length'] = $arg_length; - - return $this; - } - - /** - * Gets arg_name_length - * - * @return int|null - */ - public function getArgNameLength() - { - return $this->container['arg_name_length']; - } - - /** - * Sets arg_name_length - * - * @param int|null $arg_name_length The maximum allowed argument name length. - * - * @return self - */ - public function setArgNameLength($arg_name_length) - { - $this->container['arg_name_length'] = $arg_name_length; - - return $this; - } - - /** - * Gets combined_file_sizes - * - * @return int|null - */ - public function getCombinedFileSizes() - { - return $this->container['combined_file_sizes']; - } - - /** - * Sets combined_file_sizes - * - * @param int|null $combined_file_sizes The maximum allowed size of all files (in bytes). - * - * @return self - */ - public function setCombinedFileSizes($combined_file_sizes) - { - $this->container['combined_file_sizes'] = $combined_file_sizes; - - return $this; - } - - /** - * Gets created_at - * - * @return string|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param string|null $created_at Date and time that the settings object was created. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets critical_anomaly_score - * - * @return int|null - */ - public function getCriticalAnomalyScore() - { - return $this->container['critical_anomaly_score']; - } - - /** - * Sets critical_anomaly_score - * - * @param int|null $critical_anomaly_score Score value to add for critical anomalies. - * - * @return self - */ - public function setCriticalAnomalyScore($critical_anomaly_score) - { - $this->container['critical_anomaly_score'] = $critical_anomaly_score; - - return $this; - } - - /** - * Gets crs_validate_utf8_encoding - * - * @return bool|null - */ - public function getCrsValidateUtf8Encoding() - { - return $this->container['crs_validate_utf8_encoding']; - } - - /** - * Sets crs_validate_utf8_encoding - * - * @param bool|null $crs_validate_utf8_encoding CRS validate UTF8 encoding. - * - * @return self - */ - public function setCrsValidateUtf8Encoding($crs_validate_utf8_encoding) - { - $this->container['crs_validate_utf8_encoding'] = $crs_validate_utf8_encoding; - - return $this; - } - - /** - * Gets error_anomaly_score - * - * @return int|null - */ - public function getErrorAnomalyScore() - { - return $this->container['error_anomaly_score']; - } - - /** - * Sets error_anomaly_score - * - * @param int|null $error_anomaly_score Score value to add for error anomalies. - * - * @return self - */ - public function setErrorAnomalyScore($error_anomaly_score) - { - $this->container['error_anomaly_score'] = $error_anomaly_score; - - return $this; - } - - /** - * Gets high_risk_country_codes - * - * @return string|null - */ - public function getHighRiskCountryCodes() - { - return $this->container['high_risk_country_codes']; - } - - /** - * Sets high_risk_country_codes - * - * @param string|null $high_risk_country_codes A space-separated list of country codes in ISO 3166-1 (two-letter) format. - * - * @return self - */ - public function setHighRiskCountryCodes($high_risk_country_codes) - { - $this->container['high_risk_country_codes'] = $high_risk_country_codes; - - return $this; - } - - /** - * Gets http_violation_score_threshold - * - * @return int|null - */ - public function getHttpViolationScoreThreshold() - { - return $this->container['http_violation_score_threshold']; - } - - /** - * Sets http_violation_score_threshold - * - * @param int|null $http_violation_score_threshold HTTP violation threshold. - * - * @return self - */ - public function setHttpViolationScoreThreshold($http_violation_score_threshold) - { - $this->container['http_violation_score_threshold'] = $http_violation_score_threshold; - - return $this; - } - - /** - * Gets inbound_anomaly_score_threshold - * - * @return int|null - */ - public function getInboundAnomalyScoreThreshold() - { - return $this->container['inbound_anomaly_score_threshold']; - } - - /** - * Sets inbound_anomaly_score_threshold - * - * @param int|null $inbound_anomaly_score_threshold Inbound anomaly threshold. - * - * @return self - */ - public function setInboundAnomalyScoreThreshold($inbound_anomaly_score_threshold) - { - $this->container['inbound_anomaly_score_threshold'] = $inbound_anomaly_score_threshold; - - return $this; - } - - /** - * Gets lfi_score_threshold - * - * @return int|null - */ - public function getLfiScoreThreshold() - { - return $this->container['lfi_score_threshold']; - } - - /** - * Sets lfi_score_threshold - * - * @param int|null $lfi_score_threshold Local file inclusion attack threshold. - * - * @return self - */ - public function setLfiScoreThreshold($lfi_score_threshold) - { - $this->container['lfi_score_threshold'] = $lfi_score_threshold; - - return $this; - } - - /** - * Gets max_file_size - * - * @return int|null - */ - public function getMaxFileSize() - { - return $this->container['max_file_size']; - } - - /** - * Sets max_file_size - * - * @param int|null $max_file_size The maximum allowed file size (in bytes). - * - * @return self - */ - public function setMaxFileSize($max_file_size) - { - $this->container['max_file_size'] = $max_file_size; - - return $this; - } - - /** - * Gets max_num_args - * - * @return int|null - */ - public function getMaxNumArgs() - { - return $this->container['max_num_args']; - } - - /** - * Sets max_num_args - * - * @param int|null $max_num_args The maximum number of arguments allowed. - * - * @return self - */ - public function setMaxNumArgs($max_num_args) - { - $this->container['max_num_args'] = $max_num_args; - - return $this; - } - - /** - * Gets notice_anomaly_score - * - * @return int|null - */ - public function getNoticeAnomalyScore() - { - return $this->container['notice_anomaly_score']; - } - - /** - * Sets notice_anomaly_score - * - * @param int|null $notice_anomaly_score Score value to add for notice anomalies. - * - * @return self - */ - public function setNoticeAnomalyScore($notice_anomaly_score) - { - $this->container['notice_anomaly_score'] = $notice_anomaly_score; - - return $this; - } - - /** - * Gets paranoia_level - * - * @return int|null - */ - public function getParanoiaLevel() - { - return $this->container['paranoia_level']; - } - - /** - * Sets paranoia_level - * - * @param int|null $paranoia_level The configured paranoia level. - * - * @return self - */ - public function setParanoiaLevel($paranoia_level) - { - $this->container['paranoia_level'] = $paranoia_level; - - return $this; - } - - /** - * Gets php_injection_score_threshold - * - * @return int|null - */ - public function getPhpInjectionScoreThreshold() - { - return $this->container['php_injection_score_threshold']; - } - - /** - * Sets php_injection_score_threshold - * - * @param int|null $php_injection_score_threshold PHP injection threshold. - * - * @return self - */ - public function setPhpInjectionScoreThreshold($php_injection_score_threshold) - { - $this->container['php_injection_score_threshold'] = $php_injection_score_threshold; - - return $this; - } - - /** - * Gets rce_score_threshold - * - * @return int|null - */ - public function getRceScoreThreshold() - { - return $this->container['rce_score_threshold']; - } - - /** - * Sets rce_score_threshold - * - * @param int|null $rce_score_threshold Remote code execution threshold. - * - * @return self - */ - public function setRceScoreThreshold($rce_score_threshold) - { - $this->container['rce_score_threshold'] = $rce_score_threshold; - - return $this; - } - - /** - * Gets restricted_extensions - * - * @return string|null - */ - public function getRestrictedExtensions() - { - return $this->container['restricted_extensions']; - } - - /** - * Sets restricted_extensions - * - * @param string|null $restricted_extensions A space-separated list of disallowed file extensions. - * - * @return self - */ - public function setRestrictedExtensions($restricted_extensions) - { - $this->container['restricted_extensions'] = $restricted_extensions; - - return $this; - } - - /** - * Gets restricted_headers - * - * @return string|null - */ - public function getRestrictedHeaders() - { - return $this->container['restricted_headers']; - } - - /** - * Sets restricted_headers - * - * @param string|null $restricted_headers A space-separated list of disallowed header names. - * - * @return self - */ - public function setRestrictedHeaders($restricted_headers) - { - $this->container['restricted_headers'] = $restricted_headers; - - return $this; - } - - /** - * Gets rfi_score_threshold - * - * @return int|null - */ - public function getRfiScoreThreshold() - { - return $this->container['rfi_score_threshold']; - } - - /** - * Sets rfi_score_threshold - * - * @param int|null $rfi_score_threshold Remote file inclusion attack threshold. - * - * @return self - */ - public function setRfiScoreThreshold($rfi_score_threshold) - { - $this->container['rfi_score_threshold'] = $rfi_score_threshold; - - return $this; - } - - /** - * Gets session_fixation_score_threshold - * - * @return int|null - */ - public function getSessionFixationScoreThreshold() - { - return $this->container['session_fixation_score_threshold']; - } - - /** - * Sets session_fixation_score_threshold - * - * @param int|null $session_fixation_score_threshold Session fixation attack threshold. - * - * @return self - */ - public function setSessionFixationScoreThreshold($session_fixation_score_threshold) - { - $this->container['session_fixation_score_threshold'] = $session_fixation_score_threshold; - - return $this; - } - - /** - * Gets sql_injection_score_threshold - * - * @return int|null - */ - public function getSqlInjectionScoreThreshold() - { - return $this->container['sql_injection_score_threshold']; - } - - /** - * Sets sql_injection_score_threshold - * - * @param int|null $sql_injection_score_threshold SQL injection attack threshold. - * - * @return self - */ - public function setSqlInjectionScoreThreshold($sql_injection_score_threshold) - { - $this->container['sql_injection_score_threshold'] = $sql_injection_score_threshold; - - return $this; - } - - /** - * Gets total_arg_length - * - * @return int|null - */ - public function getTotalArgLength() - { - return $this->container['total_arg_length']; - } - - /** - * Sets total_arg_length - * - * @param int|null $total_arg_length The maximum size of argument names and values. - * - * @return self - */ - public function setTotalArgLength($total_arg_length) - { - $this->container['total_arg_length'] = $total_arg_length; - - return $this; - } - - /** - * Gets updated_at - * - * @return string|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param string|null $updated_at Date and time that the settings object was last updated. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets warning_anomaly_score - * - * @return int|null - */ - public function getWarningAnomalyScore() - { - return $this->container['warning_anomaly_score']; - } - - /** - * Sets warning_anomaly_score - * - * @param int|null $warning_anomaly_score Score value to add for warning anomalies. - * - * @return self - */ - public function setWarningAnomalyScore($warning_anomaly_score) - { - $this->container['warning_anomaly_score'] = $warning_anomaly_score; - - return $this; - } - - /** - * Gets xss_score_threshold - * - * @return int|null - */ - public function getXssScoreThreshold() - { - return $this->container['xss_score_threshold']; - } - - /** - * Sets xss_score_threshold - * - * @param int|null $xss_score_threshold XSS attack threshold. - * - * @return self - */ - public function setXssScoreThreshold($xss_score_threshold) - { - $this->container['xss_score_threshold'] = $xss_score_threshold; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LegacyWafRule.php b/lib/Model/LegacyWafRule.php deleted file mode 100644 index e99d8009..00000000 --- a/lib/Model/LegacyWafRule.php +++ /dev/null @@ -1,434 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class LegacyWafRule implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'legacy_waf_rule'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'message' => 'string', - 'rule_id' => 'string', - 'severity' => 'int', - 'source' => 'string', - 'vcl' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'message' => null, - 'rule_id' => null, - 'severity' => null, - 'source' => null, - 'vcl' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'message' => 'message', - 'rule_id' => 'rule_id', - 'severity' => 'severity', - 'source' => 'source', - 'vcl' => 'vcl' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'message' => 'setMessage', - 'rule_id' => 'setRuleId', - 'severity' => 'setSeverity', - 'source' => 'setSource', - 'vcl' => 'setVcl' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'message' => 'getMessage', - 'rule_id' => 'getRuleId', - 'severity' => 'getSeverity', - 'source' => 'getSource', - 'vcl' => 'getVcl' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['message'] = $data['message'] ?? null; - $this->container['rule_id'] = $data['rule_id'] ?? null; - $this->container['severity'] = $data['severity'] ?? null; - $this->container['source'] = $data['source'] ?? null; - $this->container['vcl'] = $data['vcl'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets message - * - * @return string|null - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string|null $message Message metadata for the rule. - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets rule_id - * - * @return string|null - */ - public function getRuleId() - { - return $this->container['rule_id']; - } - - /** - * Sets rule_id - * - * @param string|null $rule_id Corresponding ModSecurity rule ID. - * - * @return self - */ - public function setRuleId($rule_id) - { - $this->container['rule_id'] = $rule_id; - - return $this; - } - - /** - * Gets severity - * - * @return int|null - */ - public function getSeverity() - { - return $this->container['severity']; - } - - /** - * Sets severity - * - * @param int|null $severity Severity metadata for the rule. - * - * @return self - */ - public function setSeverity($severity) - { - $this->container['severity'] = $severity; - - return $this; - } - - /** - * Gets source - * - * @return string|null - */ - public function getSource() - { - return $this->container['source']; - } - - /** - * Sets source - * - * @param string|null $source The ModSecurity rule logic. - * - * @return self - */ - public function setSource($source) - { - $this->container['source'] = $source; - - return $this; - } - - /** - * Gets vcl - * - * @return string|null - */ - public function getVcl() - { - return $this->container['vcl']; - } - - /** - * Sets vcl - * - * @param string|null $vcl The VCL representation of the rule logic. - * - * @return self - */ - public function setVcl($vcl) - { - $this->container['vcl'] = $vcl; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LegacyWafRuleset.php b/lib/Model/LegacyWafRuleset.php deleted file mode 100644 index a9fba924..00000000 --- a/lib/Model/LegacyWafRuleset.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class LegacyWafRuleset implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'legacy_waf_ruleset'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'last_push' => 'string', - 'vcl' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'last_push' => null, - 'vcl' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'last_push' => 'last_push', - 'vcl' => 'vcl' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'last_push' => 'setLastPush', - 'vcl' => 'setVcl' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'last_push' => 'getLastPush', - 'vcl' => 'getVcl' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['last_push'] = $data['last_push'] ?? null; - $this->container['vcl'] = $data['vcl'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets last_push - * - * @return string|null - */ - public function getLastPush() - { - return $this->container['last_push']; - } - - /** - * Sets last_push - * - * @param string|null $last_push Date and time WAF ruleset VCL was last deployed. - * - * @return self - */ - public function setLastPush($last_push) - { - $this->container['last_push'] = $last_push; - - return $this; - } - - /** - * Gets vcl - * - * @return string|null - */ - public function getVcl() - { - return $this->container['vcl']; - } - - /** - * Sets vcl - * - * @param string|null $vcl The WAF ruleset VCL currently deployed. - * - * @return self - */ - public function setVcl($vcl) - { - $this->container['vcl'] = $vcl; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LogExplorerInsightsResponseBodyEnable.php b/lib/Model/LogExplorerInsightsResponseBodyEnable.php new file mode 100644 index 00000000..a870efe2 --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\LogExplorerInsightsResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\LogExplorerInsightsResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\LogExplorerInsightsResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\LogExplorerInsightsResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\LogExplorerInsightsResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\LogExplorerInsightsResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseLinks.php b/lib/Model/LogExplorerInsightsResponseLinks.php new file mode 100644 index 00000000..843d380c --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\LogExplorerInsightsResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\LogExplorerInsightsResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\LogExplorerInsightsResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseLinksLinks.php b/lib/Model/LogExplorerInsightsResponseLinksLinks.php new file mode 100644 index 00000000..e87e8bfb --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseProduct.php b/lib/Model/LogExplorerInsightsResponseProduct.php new file mode 100644 index 00000000..20e2229a --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\LogExplorerInsightsResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\LogExplorerInsightsResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\LogExplorerInsightsResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseProductProduct.php b/lib/Model/LogExplorerInsightsResponseProductProduct.php new file mode 100644 index 00000000..b17646e4 --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseService.php b/lib/Model/LogExplorerInsightsResponseService.php new file mode 100644 index 00000000..8bd0c21b --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SetWorkspaceId.php b/lib/Model/NgwafRequestEnable.php similarity index 93% rename from lib/Model/SetWorkspaceId.php rename to lib/Model/NgwafRequestEnable.php index aeb921fc..f762a95d 100644 --- a/lib/Model/SetWorkspaceId.php +++ b/lib/Model/NgwafRequestEnable.php @@ -1,6 +1,6 @@ container['workspace_id'] === null) { + $invalidProperties[] = "'workspace_id' can't be null"; + } return $invalidProperties; } @@ -202,7 +205,7 @@ public function valid() /** * Gets workspace_id * - * @return string|null + * @return string */ public function getWorkspaceId() { @@ -212,7 +215,7 @@ public function getWorkspaceId() /** * Sets workspace_id * - * @param string|null $workspace_id The workspace to link with the Next-Gen WAF product. Note this body is only supported and required when `product_id` is `ngwaf` + * @param string $workspace_id The workspace to link. * * @return self */ diff --git a/lib/Model/SetConfiguration.php b/lib/Model/NgwafRequestUpdateConfiguration.php similarity index 83% rename from lib/Model/SetConfiguration.php rename to lib/Model/NgwafRequestUpdateConfiguration.php index 1aade89f..2e6bbd5f 100644 --- a/lib/Model/SetConfiguration.php +++ b/lib/Model/NgwafRequestUpdateConfiguration.php @@ -1,6 +1,6 @@ 'string', - 'traffic_ramp' => 'string', - 'mode' => 'string' + 'traffic_ramp' => 'string' ]; /** @@ -67,8 +66,7 @@ class SetConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'workspace_id' => null, - 'traffic_ramp' => null, - 'mode' => null + 'traffic_ramp' => null ]; /** @@ -99,8 +97,7 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'workspace_id' => 'workspace_id', - 'traffic_ramp' => 'traffic_ramp', - 'mode' => 'mode' + 'traffic_ramp' => 'traffic_ramp' ]; /** @@ -110,8 +107,7 @@ public static function fastlyFormats() */ protected static $setters = [ 'workspace_id' => 'setWorkspaceId', - 'traffic_ramp' => 'setTrafficRamp', - 'mode' => 'setMode' + 'traffic_ramp' => 'setTrafficRamp' ]; /** @@ -121,8 +117,7 @@ public static function fastlyFormats() */ protected static $getters = [ 'workspace_id' => 'getWorkspaceId', - 'traffic_ramp' => 'getTrafficRamp', - 'mode' => 'getMode' + 'traffic_ramp' => 'getTrafficRamp' ]; /** @@ -184,7 +179,6 @@ public function __construct(array $data = null) { $this->container['workspace_id'] = $data['workspace_id'] ?? null; $this->container['traffic_ramp'] = $data['traffic_ramp'] ?? null; - $this->container['mode'] = $data['mode'] ?? null; } /** @@ -224,7 +218,7 @@ public function getWorkspaceId() /** * Sets workspace_id * - * @param string|null $workspace_id The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`. + * @param string|null $workspace_id The workspace to link. * * @return self */ @@ -248,7 +242,7 @@ public function getTrafficRamp() /** * Sets traffic_ramp * - * @param string|null $traffic_ramp The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`. + * @param string|null $traffic_ramp The percentage of traffic to inspect. * * @return self */ @@ -258,30 +252,6 @@ public function setTrafficRamp($traffic_ramp) return $this; } - - /** - * Gets mode - * - * @return string|null - */ - public function getMode() - { - return $this->container['mode']; - } - - /** - * Sets mode - * - * @param string|null $mode The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`. - * - * @return self - */ - public function setMode($mode) - { - $this->container['mode'] = $mode; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NgwafResponseConfiguration.php b/lib/Model/NgwafResponseConfiguration.php new file mode 100644 index 00000000..aef3f8d2 --- /dev/null +++ b/lib/Model/NgwafResponseConfiguration.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseConfiguration implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_configuration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'configuration' => '\Fastly\Model\NgwafResponseConfigurationConfiguration' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'configuration' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'configuration' => 'configuration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'configuration' => 'setConfiguration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'configuration' => 'getConfiguration' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['configuration'] = $data['configuration'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets configuration + * + * @return \Fastly\Model\NgwafResponseConfigurationConfiguration|null + */ + public function getConfiguration() + { + return $this->container['configuration']; + } + + /** + * Sets configuration + * + * @param \Fastly\Model\NgwafResponseConfigurationConfiguration|null $configuration configuration + * + * @return self + */ + public function setConfiguration($configuration) + { + $this->container['configuration'] = $configuration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ConfiguredProductResponseConfiguration.php b/lib/Model/NgwafResponseConfigurationConfiguration.php similarity index 95% rename from lib/Model/ConfiguredProductResponseConfiguration.php rename to lib/Model/NgwafResponseConfigurationConfiguration.php index bafd878d..0d8ae947 100644 --- a/lib/Model/ConfiguredProductResponseConfiguration.php +++ b/lib/Model/NgwafResponseConfigurationConfiguration.php @@ -1,6 +1,6 @@ '\Fastly\Model\ConfiguredProductResponseProduct', - 'service' => '\Fastly\Model\EnabledProductResponseService', - 'configuration' => '\Fastly\Model\ConfiguredProductResponseConfiguration', - '_links' => '\Fastly\Model\ConfiguredProductResponseLinks' + 'product' => '\Fastly\Model\NgwafResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'configuration' => '\Fastly\Model\NgwafResponseConfigurationConfiguration', + '_links' => '\Fastly\Model\NgwafResponseLinksLinks' ]; /** @@ -220,7 +220,7 @@ public function valid() /** * Gets product * - * @return \Fastly\Model\ConfiguredProductResponseProduct|null + * @return \Fastly\Model\NgwafResponseProductProduct|null */ public function getProduct() { @@ -230,7 +230,7 @@ public function getProduct() /** * Sets product * - * @param \Fastly\Model\ConfiguredProductResponseProduct|null $product product + * @param \Fastly\Model\NgwafResponseProductProduct|null $product product * * @return self */ @@ -244,7 +244,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\EnabledProductResponseService|null + * @return \Fastly\Model\BotManagementResponseServiceService|null */ public function getService() { @@ -254,7 +254,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\EnabledProductResponseService|null $service service + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service * * @return self */ @@ -268,7 +268,7 @@ public function setService($service) /** * Gets configuration * - * @return \Fastly\Model\ConfiguredProductResponseConfiguration|null + * @return \Fastly\Model\NgwafResponseConfigurationConfiguration|null */ public function getConfiguration() { @@ -278,7 +278,7 @@ public function getConfiguration() /** * Sets configuration * - * @param \Fastly\Model\ConfiguredProductResponseConfiguration|null $configuration configuration + * @param \Fastly\Model\NgwafResponseConfigurationConfiguration|null $configuration configuration * * @return self */ @@ -292,7 +292,7 @@ public function setConfiguration($configuration) /** * Gets _links * - * @return \Fastly\Model\ConfiguredProductResponseLinks|null + * @return \Fastly\Model\NgwafResponseLinksLinks|null */ public function getLinks() { @@ -302,7 +302,7 @@ public function getLinks() /** * Sets _links * - * @param \Fastly\Model\ConfiguredProductResponseLinks|null $_links _links + * @param \Fastly\Model\NgwafResponseLinksLinks|null $_links _links * * @return self */ diff --git a/lib/Model/EnabledProductResponse.php b/lib/Model/NgwafResponseEnable.php similarity index 89% rename from lib/Model/EnabledProductResponse.php rename to lib/Model/NgwafResponseEnable.php index 0c232f33..89cba7ef 100644 --- a/lib/Model/EnabledProductResponse.php +++ b/lib/Model/NgwafResponseEnable.php @@ -1,6 +1,6 @@ '\Fastly\Model\EnabledProductResponseProduct', - 'service' => '\Fastly\Model\EnabledProductResponseService', - '_links' => '\Fastly\Model\EnabledProductResponseLinks' + 'product' => '\Fastly\Model\NgwafResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\NgwafResponseLinksLinks' ]; /** @@ -214,7 +214,7 @@ public function valid() /** * Gets product * - * @return \Fastly\Model\EnabledProductResponseProduct|null + * @return \Fastly\Model\NgwafResponseProductProduct|null */ public function getProduct() { @@ -224,7 +224,7 @@ public function getProduct() /** * Sets product * - * @param \Fastly\Model\EnabledProductResponseProduct|null $product product + * @param \Fastly\Model\NgwafResponseProductProduct|null $product product * * @return self */ @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\EnabledProductResponseService|null + * @return \Fastly\Model\BotManagementResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\EnabledProductResponseService|null $service service + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service * * @return self */ @@ -262,7 +262,7 @@ public function setService($service) /** * Gets _links * - * @return \Fastly\Model\EnabledProductResponseLinks|null + * @return \Fastly\Model\NgwafResponseLinksLinks|null */ public function getLinks() { @@ -272,7 +272,7 @@ public function getLinks() /** * Sets _links * - * @param \Fastly\Model\EnabledProductResponseLinks|null $_links _links + * @param \Fastly\Model\NgwafResponseLinksLinks|null $_links _links * * @return self */ diff --git a/lib/Model/NgwafResponseLinks.php b/lib/Model/NgwafResponseLinks.php new file mode 100644 index 00000000..e5f3e14d --- /dev/null +++ b/lib/Model/NgwafResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\NgwafResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\NgwafResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\NgwafResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ConfiguredProductResponseLinks.php b/lib/Model/NgwafResponseLinksLinks.php similarity index 96% rename from lib/Model/ConfiguredProductResponseLinks.php rename to lib/Model/NgwafResponseLinksLinks.php index 5a41367d..4efaec51 100644 --- a/lib/Model/ConfiguredProductResponseLinks.php +++ b/lib/Model/NgwafResponseLinksLinks.php @@ -1,6 +1,6 @@ + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\NgwafResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\NgwafResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\NgwafResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/NgwafResponseProductProduct.php b/lib/Model/NgwafResponseProductProduct.php new file mode 100644 index 00000000..45c1e0de --- /dev/null +++ b/lib/Model/NgwafResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/NgwafResponseService.php b/lib/Model/NgwafResponseService.php new file mode 100644 index 00000000..93a26273 --- /dev/null +++ b/lib/Model/NgwafResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ObjectStorageResponseBodyEnable.php b/lib/Model/ObjectStorageResponseBodyEnable.php new file mode 100644 index 00000000..4bd9e1a6 --- /dev/null +++ b/lib/Model/ObjectStorageResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ObjectStorageResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'object_storage_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ObjectStorageResponseProductProduct', + 'customer' => '\Fastly\Model\AiAcceleratorResponseCustomerCustomer', + '_links' => '\Fastly\Model\ObjectStorageResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ObjectStorageResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ObjectStorageResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\ObjectStorageResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ObjectStorageResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ObjectStorageResponseCustomer.php b/lib/Model/ObjectStorageResponseCustomer.php new file mode 100644 index 00000000..7029abbb --- /dev/null +++ b/lib/Model/ObjectStorageResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ObjectStorageResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'object_storage_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\AiAcceleratorResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ObjectStorageResponseLinks.php b/lib/Model/ObjectStorageResponseLinks.php new file mode 100644 index 00000000..0ec8f05f --- /dev/null +++ b/lib/Model/ObjectStorageResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ObjectStorageResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'object_storage_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\ObjectStorageResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\ObjectStorageResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ObjectStorageResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ReadOnlyVersion.php b/lib/Model/ObjectStorageResponseLinksLinks.php similarity index 87% rename from lib/Model/ReadOnlyVersion.php rename to lib/Model/ObjectStorageResponseLinksLinks.php index d2c25cbc..17eb411d 100644 --- a/lib/Model/ReadOnlyVersion.php +++ b/lib/Model/ObjectStorageResponseLinksLinks.php @@ -1,6 +1,6 @@ 'string' ]; /** @@ -64,7 +64,7 @@ class ReadOnlyVersion implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - + 'self' => 'getSelf' ]; /** @@ -172,6 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['self'] = $data['self'] ?? null; } /** @@ -197,6 +198,30 @@ public function valid() return count($this->listInvalidProperties()) === 0; } + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ObjectStorageResponseProduct.php b/lib/Model/ObjectStorageResponseProduct.php new file mode 100644 index 00000000..010ba6f0 --- /dev/null +++ b/lib/Model/ObjectStorageResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ObjectStorageResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'object_storage_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ObjectStorageResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ObjectStorageResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ObjectStorageResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ObjectStorageResponseProductProduct.php b/lib/Model/ObjectStorageResponseProductProduct.php new file mode 100644 index 00000000..5d858899 --- /dev/null +++ b/lib/Model/ObjectStorageResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ObjectStorageResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'object_storage_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorMeasurements.php b/lib/Model/OriginInspectorMeasurements.php index 5c20cedc..762fce15 100644 --- a/lib/Model/OriginInspectorMeasurements.php +++ b/lib/Model/OriginInspectorMeasurements.php @@ -80,6 +80,7 @@ class OriginInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'latency_0_to_1ms' => 'int', 'latency_1_to_5ms' => 'int', 'latency_5_to_10ms' => 'int', @@ -118,6 +119,7 @@ class OriginInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS 'waf_status_503' => 'int', 'waf_status_504' => 'int', 'waf_status_505' => 'int', + 'waf_status_530' => 'int', 'waf_latency_0_to_1ms' => 'int', 'waf_latency_1_to_5ms' => 'int', 'waf_latency_5_to_10ms' => 'int', @@ -156,6 +158,7 @@ class OriginInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS 'compute_status_503' => 'int', 'compute_status_504' => 'int', 'compute_status_505' => 'int', + 'compute_status_530' => 'int', 'compute_latency_0_to_1ms' => 'int', 'compute_latency_1_to_5ms' => 'int', 'compute_latency_5_to_10ms' => 'int', @@ -194,6 +197,7 @@ class OriginInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS 'all_status_503' => 'int', 'all_status_504' => 'int', 'all_status_505' => 'int', + 'all_status_530' => 'int', 'all_latency_0_to_1ms' => 'int', 'all_latency_1_to_5ms' => 'int', 'all_latency_5_to_10ms' => 'int', @@ -216,158 +220,162 @@ class OriginInspectorMeasurements implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $fastlyFormats = [ - 'responses' => null, - 'resp_header_bytes' => null, - 'resp_body_bytes' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'latency_0_to_1ms' => null, - 'latency_1_to_5ms' => null, - 'latency_5_to_10ms' => null, - 'latency_10_to_50ms' => null, - 'latency_50_to_100ms' => null, - 'latency_100_to_250ms' => null, - 'latency_250_to_500ms' => null, - 'latency_500_to_1000ms' => null, - 'latency_1000_to_5000ms' => null, - 'latency_5000_to_10000ms' => null, - 'latency_10000_to_60000ms' => null, - 'latency_60000ms' => null, - 'waf_responses' => null, - 'waf_resp_header_bytes' => null, - 'waf_resp_body_bytes' => null, - 'waf_status_1xx' => null, - 'waf_status_2xx' => null, - 'waf_status_3xx' => null, - 'waf_status_4xx' => null, - 'waf_status_5xx' => null, - 'waf_status_200' => null, - 'waf_status_204' => null, - 'waf_status_206' => null, - 'waf_status_301' => null, - 'waf_status_302' => null, - 'waf_status_304' => null, - 'waf_status_400' => null, - 'waf_status_401' => null, - 'waf_status_403' => null, - 'waf_status_404' => null, - 'waf_status_416' => null, - 'waf_status_429' => null, - 'waf_status_500' => null, - 'waf_status_501' => null, - 'waf_status_502' => null, - 'waf_status_503' => null, - 'waf_status_504' => null, - 'waf_status_505' => null, - 'waf_latency_0_to_1ms' => null, - 'waf_latency_1_to_5ms' => null, - 'waf_latency_5_to_10ms' => null, - 'waf_latency_10_to_50ms' => null, - 'waf_latency_50_to_100ms' => null, - 'waf_latency_100_to_250ms' => null, - 'waf_latency_250_to_500ms' => null, - 'waf_latency_500_to_1000ms' => null, - 'waf_latency_1000_to_5000ms' => null, - 'waf_latency_5000_to_10000ms' => null, - 'waf_latency_10000_to_60000ms' => null, - 'waf_latency_60000ms' => null, - 'compute_responses' => null, - 'compute_resp_header_bytes' => null, - 'compute_resp_body_bytes' => null, - 'compute_status_1xx' => null, - 'compute_status_2xx' => null, - 'compute_status_3xx' => null, - 'compute_status_4xx' => null, - 'compute_status_5xx' => null, - 'compute_status_200' => null, - 'compute_status_204' => null, - 'compute_status_206' => null, - 'compute_status_301' => null, - 'compute_status_302' => null, - 'compute_status_304' => null, - 'compute_status_400' => null, - 'compute_status_401' => null, - 'compute_status_403' => null, - 'compute_status_404' => null, - 'compute_status_416' => null, - 'compute_status_429' => null, - 'compute_status_500' => null, - 'compute_status_501' => null, - 'compute_status_502' => null, - 'compute_status_503' => null, - 'compute_status_504' => null, - 'compute_status_505' => null, - 'compute_latency_0_to_1ms' => null, - 'compute_latency_1_to_5ms' => null, - 'compute_latency_5_to_10ms' => null, - 'compute_latency_10_to_50ms' => null, - 'compute_latency_50_to_100ms' => null, - 'compute_latency_100_to_250ms' => null, - 'compute_latency_250_to_500ms' => null, - 'compute_latency_500_to_1000ms' => null, - 'compute_latency_1000_to_5000ms' => null, - 'compute_latency_5000_to_10000ms' => null, - 'compute_latency_10000_to_60000ms' => null, - 'compute_latency_60000ms' => null, - 'all_responses' => null, - 'all_resp_header_bytes' => null, - 'all_resp_body_bytes' => null, - 'all_status_1xx' => null, - 'all_status_2xx' => null, - 'all_status_3xx' => null, - 'all_status_4xx' => null, - 'all_status_5xx' => null, - 'all_status_200' => null, - 'all_status_204' => null, - 'all_status_206' => null, - 'all_status_301' => null, - 'all_status_302' => null, - 'all_status_304' => null, - 'all_status_400' => null, - 'all_status_401' => null, - 'all_status_403' => null, - 'all_status_404' => null, - 'all_status_416' => null, - 'all_status_429' => null, - 'all_status_500' => null, - 'all_status_501' => null, - 'all_status_502' => null, - 'all_status_503' => null, - 'all_status_504' => null, - 'all_status_505' => null, - 'all_latency_0_to_1ms' => null, - 'all_latency_1_to_5ms' => null, - 'all_latency_5_to_10ms' => null, - 'all_latency_10_to_50ms' => null, - 'all_latency_50_to_100ms' => null, - 'all_latency_100_to_250ms' => null, - 'all_latency_250_to_500ms' => null, - 'all_latency_500_to_1000ms' => null, - 'all_latency_1000_to_5000ms' => null, - 'all_latency_5000_to_10000ms' => null, - 'all_latency_10000_to_60000ms' => null, - 'all_latency_60000ms' => null + 'responses' => 'int64', + 'resp_header_bytes' => 'int64', + 'resp_body_bytes' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'latency_0_to_1ms' => 'int64', + 'latency_1_to_5ms' => 'int64', + 'latency_5_to_10ms' => 'int64', + 'latency_10_to_50ms' => 'int64', + 'latency_50_to_100ms' => 'int64', + 'latency_100_to_250ms' => 'int64', + 'latency_250_to_500ms' => 'int64', + 'latency_500_to_1000ms' => 'int64', + 'latency_1000_to_5000ms' => 'int64', + 'latency_5000_to_10000ms' => 'int64', + 'latency_10000_to_60000ms' => 'int64', + 'latency_60000ms' => 'int64', + 'waf_responses' => 'int64', + 'waf_resp_header_bytes' => 'int64', + 'waf_resp_body_bytes' => 'int64', + 'waf_status_1xx' => 'int64', + 'waf_status_2xx' => 'int64', + 'waf_status_3xx' => 'int64', + 'waf_status_4xx' => 'int64', + 'waf_status_5xx' => 'int64', + 'waf_status_200' => 'int64', + 'waf_status_204' => 'int64', + 'waf_status_206' => 'int64', + 'waf_status_301' => 'int64', + 'waf_status_302' => 'int64', + 'waf_status_304' => 'int64', + 'waf_status_400' => 'int64', + 'waf_status_401' => 'int64', + 'waf_status_403' => 'int64', + 'waf_status_404' => 'int64', + 'waf_status_416' => 'int64', + 'waf_status_429' => 'int64', + 'waf_status_500' => 'int64', + 'waf_status_501' => 'int64', + 'waf_status_502' => 'int64', + 'waf_status_503' => 'int64', + 'waf_status_504' => 'int64', + 'waf_status_505' => 'int64', + 'waf_status_530' => 'int64', + 'waf_latency_0_to_1ms' => 'int64', + 'waf_latency_1_to_5ms' => 'int64', + 'waf_latency_5_to_10ms' => 'int64', + 'waf_latency_10_to_50ms' => 'int64', + 'waf_latency_50_to_100ms' => 'int64', + 'waf_latency_100_to_250ms' => 'int64', + 'waf_latency_250_to_500ms' => 'int64', + 'waf_latency_500_to_1000ms' => 'int64', + 'waf_latency_1000_to_5000ms' => 'int64', + 'waf_latency_5000_to_10000ms' => 'int64', + 'waf_latency_10000_to_60000ms' => 'int64', + 'waf_latency_60000ms' => 'int64', + 'compute_responses' => 'int64', + 'compute_resp_header_bytes' => 'int64', + 'compute_resp_body_bytes' => 'int64', + 'compute_status_1xx' => 'int64', + 'compute_status_2xx' => 'int64', + 'compute_status_3xx' => 'int64', + 'compute_status_4xx' => 'int64', + 'compute_status_5xx' => 'int64', + 'compute_status_200' => 'int64', + 'compute_status_204' => 'int64', + 'compute_status_206' => 'int64', + 'compute_status_301' => 'int64', + 'compute_status_302' => 'int64', + 'compute_status_304' => 'int64', + 'compute_status_400' => 'int64', + 'compute_status_401' => 'int64', + 'compute_status_403' => 'int64', + 'compute_status_404' => 'int64', + 'compute_status_416' => 'int64', + 'compute_status_429' => 'int64', + 'compute_status_500' => 'int64', + 'compute_status_501' => 'int64', + 'compute_status_502' => 'int64', + 'compute_status_503' => 'int64', + 'compute_status_504' => 'int64', + 'compute_status_505' => 'int64', + 'compute_status_530' => 'int64', + 'compute_latency_0_to_1ms' => 'int64', + 'compute_latency_1_to_5ms' => 'int64', + 'compute_latency_5_to_10ms' => 'int64', + 'compute_latency_10_to_50ms' => 'int64', + 'compute_latency_50_to_100ms' => 'int64', + 'compute_latency_100_to_250ms' => 'int64', + 'compute_latency_250_to_500ms' => 'int64', + 'compute_latency_500_to_1000ms' => 'int64', + 'compute_latency_1000_to_5000ms' => 'int64', + 'compute_latency_5000_to_10000ms' => 'int64', + 'compute_latency_10000_to_60000ms' => 'int64', + 'compute_latency_60000ms' => 'int64', + 'all_responses' => 'int64', + 'all_resp_header_bytes' => 'int64', + 'all_resp_body_bytes' => 'int64', + 'all_status_1xx' => 'int64', + 'all_status_2xx' => 'int64', + 'all_status_3xx' => 'int64', + 'all_status_4xx' => 'int64', + 'all_status_5xx' => 'int64', + 'all_status_200' => 'int64', + 'all_status_204' => 'int64', + 'all_status_206' => 'int64', + 'all_status_301' => 'int64', + 'all_status_302' => 'int64', + 'all_status_304' => 'int64', + 'all_status_400' => 'int64', + 'all_status_401' => 'int64', + 'all_status_403' => 'int64', + 'all_status_404' => 'int64', + 'all_status_416' => 'int64', + 'all_status_429' => 'int64', + 'all_status_500' => 'int64', + 'all_status_501' => 'int64', + 'all_status_502' => 'int64', + 'all_status_503' => 'int64', + 'all_status_504' => 'int64', + 'all_status_505' => 'int64', + 'all_status_530' => 'int64', + 'all_latency_0_to_1ms' => 'int64', + 'all_latency_1_to_5ms' => 'int64', + 'all_latency_5_to_10ms' => 'int64', + 'all_latency_10_to_50ms' => 'int64', + 'all_latency_50_to_100ms' => 'int64', + 'all_latency_100_to_250ms' => 'int64', + 'all_latency_250_to_500ms' => 'int64', + 'all_latency_500_to_1000ms' => 'int64', + 'all_latency_1000_to_5000ms' => 'int64', + 'all_latency_5000_to_10000ms' => 'int64', + 'all_latency_10000_to_60000ms' => 'int64', + 'all_latency_60000ms' => 'int64' ]; /** @@ -423,6 +431,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'latency_0_to_1ms' => 'latency_0_to_1ms', 'latency_1_to_5ms' => 'latency_1_to_5ms', 'latency_5_to_10ms' => 'latency_5_to_10ms', @@ -461,6 +470,7 @@ public static function fastlyFormats() 'waf_status_503' => 'waf_status_503', 'waf_status_504' => 'waf_status_504', 'waf_status_505' => 'waf_status_505', + 'waf_status_530' => 'waf_status_530', 'waf_latency_0_to_1ms' => 'waf_latency_0_to_1ms', 'waf_latency_1_to_5ms' => 'waf_latency_1_to_5ms', 'waf_latency_5_to_10ms' => 'waf_latency_5_to_10ms', @@ -499,6 +509,7 @@ public static function fastlyFormats() 'compute_status_503' => 'compute_status_503', 'compute_status_504' => 'compute_status_504', 'compute_status_505' => 'compute_status_505', + 'compute_status_530' => 'compute_status_530', 'compute_latency_0_to_1ms' => 'compute_latency_0_to_1ms', 'compute_latency_1_to_5ms' => 'compute_latency_1_to_5ms', 'compute_latency_5_to_10ms' => 'compute_latency_5_to_10ms', @@ -537,6 +548,7 @@ public static function fastlyFormats() 'all_status_503' => 'all_status_503', 'all_status_504' => 'all_status_504', 'all_status_505' => 'all_status_505', + 'all_status_530' => 'all_status_530', 'all_latency_0_to_1ms' => 'all_latency_0_to_1ms', 'all_latency_1_to_5ms' => 'all_latency_1_to_5ms', 'all_latency_5_to_10ms' => 'all_latency_5_to_10ms', @@ -583,6 +595,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'latency_0_to_1ms' => 'setLatency0To1ms', 'latency_1_to_5ms' => 'setLatency1To5ms', 'latency_5_to_10ms' => 'setLatency5To10ms', @@ -621,6 +634,7 @@ public static function fastlyFormats() 'waf_status_503' => 'setWafStatus503', 'waf_status_504' => 'setWafStatus504', 'waf_status_505' => 'setWafStatus505', + 'waf_status_530' => 'setWafStatus530', 'waf_latency_0_to_1ms' => 'setWafLatency0To1ms', 'waf_latency_1_to_5ms' => 'setWafLatency1To5ms', 'waf_latency_5_to_10ms' => 'setWafLatency5To10ms', @@ -659,6 +673,7 @@ public static function fastlyFormats() 'compute_status_503' => 'setComputeStatus503', 'compute_status_504' => 'setComputeStatus504', 'compute_status_505' => 'setComputeStatus505', + 'compute_status_530' => 'setComputeStatus530', 'compute_latency_0_to_1ms' => 'setComputeLatency0To1ms', 'compute_latency_1_to_5ms' => 'setComputeLatency1To5ms', 'compute_latency_5_to_10ms' => 'setComputeLatency5To10ms', @@ -697,6 +712,7 @@ public static function fastlyFormats() 'all_status_503' => 'setAllStatus503', 'all_status_504' => 'setAllStatus504', 'all_status_505' => 'setAllStatus505', + 'all_status_530' => 'setAllStatus530', 'all_latency_0_to_1ms' => 'setAllLatency0To1ms', 'all_latency_1_to_5ms' => 'setAllLatency1To5ms', 'all_latency_5_to_10ms' => 'setAllLatency5To10ms', @@ -743,6 +759,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'latency_0_to_1ms' => 'getLatency0To1ms', 'latency_1_to_5ms' => 'getLatency1To5ms', 'latency_5_to_10ms' => 'getLatency5To10ms', @@ -781,6 +798,7 @@ public static function fastlyFormats() 'waf_status_503' => 'getWafStatus503', 'waf_status_504' => 'getWafStatus504', 'waf_status_505' => 'getWafStatus505', + 'waf_status_530' => 'getWafStatus530', 'waf_latency_0_to_1ms' => 'getWafLatency0To1ms', 'waf_latency_1_to_5ms' => 'getWafLatency1To5ms', 'waf_latency_5_to_10ms' => 'getWafLatency5To10ms', @@ -819,6 +837,7 @@ public static function fastlyFormats() 'compute_status_503' => 'getComputeStatus503', 'compute_status_504' => 'getComputeStatus504', 'compute_status_505' => 'getComputeStatus505', + 'compute_status_530' => 'getComputeStatus530', 'compute_latency_0_to_1ms' => 'getComputeLatency0To1ms', 'compute_latency_1_to_5ms' => 'getComputeLatency1To5ms', 'compute_latency_5_to_10ms' => 'getComputeLatency5To10ms', @@ -857,6 +876,7 @@ public static function fastlyFormats() 'all_status_503' => 'getAllStatus503', 'all_status_504' => 'getAllStatus504', 'all_status_505' => 'getAllStatus505', + 'all_status_530' => 'getAllStatus530', 'all_latency_0_to_1ms' => 'getAllLatency0To1ms', 'all_latency_1_to_5ms' => 'getAllLatency1To5ms', 'all_latency_5_to_10ms' => 'getAllLatency5To10ms', @@ -954,6 +974,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['latency_0_to_1ms'] = $data['latency_0_to_1ms'] ?? null; $this->container['latency_1_to_5ms'] = $data['latency_1_to_5ms'] ?? null; $this->container['latency_5_to_10ms'] = $data['latency_5_to_10ms'] ?? null; @@ -992,6 +1013,7 @@ public function __construct(array $data = null) $this->container['waf_status_503'] = $data['waf_status_503'] ?? null; $this->container['waf_status_504'] = $data['waf_status_504'] ?? null; $this->container['waf_status_505'] = $data['waf_status_505'] ?? null; + $this->container['waf_status_530'] = $data['waf_status_530'] ?? null; $this->container['waf_latency_0_to_1ms'] = $data['waf_latency_0_to_1ms'] ?? null; $this->container['waf_latency_1_to_5ms'] = $data['waf_latency_1_to_5ms'] ?? null; $this->container['waf_latency_5_to_10ms'] = $data['waf_latency_5_to_10ms'] ?? null; @@ -1030,6 +1052,7 @@ public function __construct(array $data = null) $this->container['compute_status_503'] = $data['compute_status_503'] ?? null; $this->container['compute_status_504'] = $data['compute_status_504'] ?? null; $this->container['compute_status_505'] = $data['compute_status_505'] ?? null; + $this->container['compute_status_530'] = $data['compute_status_530'] ?? null; $this->container['compute_latency_0_to_1ms'] = $data['compute_latency_0_to_1ms'] ?? null; $this->container['compute_latency_1_to_5ms'] = $data['compute_latency_1_to_5ms'] ?? null; $this->container['compute_latency_5_to_10ms'] = $data['compute_latency_5_to_10ms'] ?? null; @@ -1068,6 +1091,7 @@ public function __construct(array $data = null) $this->container['all_status_503'] = $data['all_status_503'] ?? null; $this->container['all_status_504'] = $data['all_status_504'] ?? null; $this->container['all_status_505'] = $data['all_status_505'] ?? null; + $this->container['all_status_530'] = $data['all_status_530'] ?? null; $this->container['all_latency_0_to_1ms'] = $data['all_latency_0_to_1ms'] ?? null; $this->container['all_latency_1_to_5ms'] = $data['all_latency_1_to_5ms'] ?? null; $this->container['all_latency_5_to_10ms'] = $data['all_latency_5_to_10ms'] ?? null; @@ -1730,6 +1754,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses received from origin with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets latency_0_to_1ms * @@ -2642,6 +2690,30 @@ public function setWafStatus505($waf_status_505) return $this; } + /** + * Gets waf_status_530 + * + * @return int|null + */ + public function getWafStatus530() + { + return $this->container['waf_status_530']; + } + + /** + * Sets waf_status_530 + * + * @param int|null $waf_status_530 Number of responses received with status code 530 received for origin requests made by the Fastly WAF. + * + * @return self + */ + public function setWafStatus530($waf_status_530) + { + $this->container['waf_status_530'] = $waf_status_530; + + return $this; + } + /** * Gets waf_latency_0_to_1ms * @@ -3554,6 +3626,30 @@ public function setComputeStatus505($compute_status_505) return $this; } + /** + * Gets compute_status_530 + * + * @return int|null + */ + public function getComputeStatus530() + { + return $this->container['compute_status_530']; + } + + /** + * Sets compute_status_530 + * + * @param int|null $compute_status_530 Number of responses received with status code 530 for origin received by the Compute platform. + * + * @return self + */ + public function setComputeStatus530($compute_status_530) + { + $this->container['compute_status_530'] = $compute_status_530; + + return $this; + } + /** * Gets compute_latency_0_to_1ms * @@ -4466,6 +4562,30 @@ public function setAllStatus505($all_status_505) return $this; } + /** + * Gets all_status_530 + * + * @return int|null + */ + public function getAllStatus530() + { + return $this->container['all_status_530']; + } + + /** + * Sets all_status_530 + * + * @param int|null $all_status_530 Number of responses received with status code 530 received for origin requests made by all sources. + * + * @return self + */ + public function setAllStatus530($all_status_530) + { + $this->container['all_status_530'] = $all_status_530; + + return $this; + } + /** * Gets all_latency_0_to_1ms * diff --git a/lib/Model/OriginInspectorResponseBodyEnable.php b/lib/Model/OriginInspectorResponseBodyEnable.php new file mode 100644 index 00000000..d3820e01 --- /dev/null +++ b/lib/Model/OriginInspectorResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\OriginInspectorResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\OriginInspectorResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\OriginInspectorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\OriginInspectorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\OriginInspectorResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\OriginInspectorResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseLinks.php b/lib/Model/OriginInspectorResponseLinks.php new file mode 100644 index 00000000..54fea7d3 --- /dev/null +++ b/lib/Model/OriginInspectorResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\OriginInspectorResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\OriginInspectorResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\OriginInspectorResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseLinksLinks.php b/lib/Model/OriginInspectorResponseLinksLinks.php new file mode 100644 index 00000000..29766c4c --- /dev/null +++ b/lib/Model/OriginInspectorResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseProduct.php b/lib/Model/OriginInspectorResponseProduct.php new file mode 100644 index 00000000..083f1b8c --- /dev/null +++ b/lib/Model/OriginInspectorResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\OriginInspectorResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\OriginInspectorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\OriginInspectorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseProductProduct.php b/lib/Model/OriginInspectorResponseProductProduct.php new file mode 100644 index 00000000..33f4e677 --- /dev/null +++ b/lib/Model/OriginInspectorResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseService.php b/lib/Model/OriginInspectorResponseService.php new file mode 100644 index 00000000..d2d6c61a --- /dev/null +++ b/lib/Model/OriginInspectorResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorValues.php b/lib/Model/OriginInspectorValues.php index 5e300030..1d048fe8 100644 --- a/lib/Model/OriginInspectorValues.php +++ b/lib/Model/OriginInspectorValues.php @@ -80,6 +80,7 @@ class OriginInspectorValues implements ModelInterface, ArrayAccess, \JsonSeriali 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'latency_0_to_1ms' => 'int', 'latency_1_to_5ms' => 'int', 'latency_5_to_10ms' => 'int', @@ -118,6 +119,7 @@ class OriginInspectorValues implements ModelInterface, ArrayAccess, \JsonSeriali 'waf_status_503' => 'int', 'waf_status_504' => 'int', 'waf_status_505' => 'int', + 'waf_status_530' => 'int', 'waf_latency_0_to_1ms' => 'int', 'waf_latency_1_to_5ms' => 'int', 'waf_latency_5_to_10ms' => 'int', @@ -156,6 +158,7 @@ class OriginInspectorValues implements ModelInterface, ArrayAccess, \JsonSeriali 'compute_status_503' => 'int', 'compute_status_504' => 'int', 'compute_status_505' => 'int', + 'compute_status_530' => 'int', 'compute_latency_0_to_1ms' => 'int', 'compute_latency_1_to_5ms' => 'int', 'compute_latency_5_to_10ms' => 'int', @@ -194,6 +197,7 @@ class OriginInspectorValues implements ModelInterface, ArrayAccess, \JsonSeriali 'all_status_503' => 'int', 'all_status_504' => 'int', 'all_status_505' => 'int', + 'all_status_530' => 'int', 'all_latency_0_to_1ms' => 'int', 'all_latency_1_to_5ms' => 'int', 'all_latency_5_to_10ms' => 'int', @@ -216,158 +220,162 @@ class OriginInspectorValues implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $fastlyFormats = [ - 'responses' => null, - 'resp_header_bytes' => null, - 'resp_body_bytes' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'latency_0_to_1ms' => null, - 'latency_1_to_5ms' => null, - 'latency_5_to_10ms' => null, - 'latency_10_to_50ms' => null, - 'latency_50_to_100ms' => null, - 'latency_100_to_250ms' => null, - 'latency_250_to_500ms' => null, - 'latency_500_to_1000ms' => null, - 'latency_1000_to_5000ms' => null, - 'latency_5000_to_10000ms' => null, - 'latency_10000_to_60000ms' => null, - 'latency_60000ms' => null, - 'waf_responses' => null, - 'waf_resp_header_bytes' => null, - 'waf_resp_body_bytes' => null, - 'waf_status_1xx' => null, - 'waf_status_2xx' => null, - 'waf_status_3xx' => null, - 'waf_status_4xx' => null, - 'waf_status_5xx' => null, - 'waf_status_200' => null, - 'waf_status_204' => null, - 'waf_status_206' => null, - 'waf_status_301' => null, - 'waf_status_302' => null, - 'waf_status_304' => null, - 'waf_status_400' => null, - 'waf_status_401' => null, - 'waf_status_403' => null, - 'waf_status_404' => null, - 'waf_status_416' => null, - 'waf_status_429' => null, - 'waf_status_500' => null, - 'waf_status_501' => null, - 'waf_status_502' => null, - 'waf_status_503' => null, - 'waf_status_504' => null, - 'waf_status_505' => null, - 'waf_latency_0_to_1ms' => null, - 'waf_latency_1_to_5ms' => null, - 'waf_latency_5_to_10ms' => null, - 'waf_latency_10_to_50ms' => null, - 'waf_latency_50_to_100ms' => null, - 'waf_latency_100_to_250ms' => null, - 'waf_latency_250_to_500ms' => null, - 'waf_latency_500_to_1000ms' => null, - 'waf_latency_1000_to_5000ms' => null, - 'waf_latency_5000_to_10000ms' => null, - 'waf_latency_10000_to_60000ms' => null, - 'waf_latency_60000ms' => null, - 'compute_responses' => null, - 'compute_resp_header_bytes' => null, - 'compute_resp_body_bytes' => null, - 'compute_status_1xx' => null, - 'compute_status_2xx' => null, - 'compute_status_3xx' => null, - 'compute_status_4xx' => null, - 'compute_status_5xx' => null, - 'compute_status_200' => null, - 'compute_status_204' => null, - 'compute_status_206' => null, - 'compute_status_301' => null, - 'compute_status_302' => null, - 'compute_status_304' => null, - 'compute_status_400' => null, - 'compute_status_401' => null, - 'compute_status_403' => null, - 'compute_status_404' => null, - 'compute_status_416' => null, - 'compute_status_429' => null, - 'compute_status_500' => null, - 'compute_status_501' => null, - 'compute_status_502' => null, - 'compute_status_503' => null, - 'compute_status_504' => null, - 'compute_status_505' => null, - 'compute_latency_0_to_1ms' => null, - 'compute_latency_1_to_5ms' => null, - 'compute_latency_5_to_10ms' => null, - 'compute_latency_10_to_50ms' => null, - 'compute_latency_50_to_100ms' => null, - 'compute_latency_100_to_250ms' => null, - 'compute_latency_250_to_500ms' => null, - 'compute_latency_500_to_1000ms' => null, - 'compute_latency_1000_to_5000ms' => null, - 'compute_latency_5000_to_10000ms' => null, - 'compute_latency_10000_to_60000ms' => null, - 'compute_latency_60000ms' => null, - 'all_responses' => null, - 'all_resp_header_bytes' => null, - 'all_resp_body_bytes' => null, - 'all_status_1xx' => null, - 'all_status_2xx' => null, - 'all_status_3xx' => null, - 'all_status_4xx' => null, - 'all_status_5xx' => null, - 'all_status_200' => null, - 'all_status_204' => null, - 'all_status_206' => null, - 'all_status_301' => null, - 'all_status_302' => null, - 'all_status_304' => null, - 'all_status_400' => null, - 'all_status_401' => null, - 'all_status_403' => null, - 'all_status_404' => null, - 'all_status_416' => null, - 'all_status_429' => null, - 'all_status_500' => null, - 'all_status_501' => null, - 'all_status_502' => null, - 'all_status_503' => null, - 'all_status_504' => null, - 'all_status_505' => null, - 'all_latency_0_to_1ms' => null, - 'all_latency_1_to_5ms' => null, - 'all_latency_5_to_10ms' => null, - 'all_latency_10_to_50ms' => null, - 'all_latency_50_to_100ms' => null, - 'all_latency_100_to_250ms' => null, - 'all_latency_250_to_500ms' => null, - 'all_latency_500_to_1000ms' => null, - 'all_latency_1000_to_5000ms' => null, - 'all_latency_5000_to_10000ms' => null, - 'all_latency_10000_to_60000ms' => null, - 'all_latency_60000ms' => null + 'responses' => 'int64', + 'resp_header_bytes' => 'int64', + 'resp_body_bytes' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'latency_0_to_1ms' => 'int64', + 'latency_1_to_5ms' => 'int64', + 'latency_5_to_10ms' => 'int64', + 'latency_10_to_50ms' => 'int64', + 'latency_50_to_100ms' => 'int64', + 'latency_100_to_250ms' => 'int64', + 'latency_250_to_500ms' => 'int64', + 'latency_500_to_1000ms' => 'int64', + 'latency_1000_to_5000ms' => 'int64', + 'latency_5000_to_10000ms' => 'int64', + 'latency_10000_to_60000ms' => 'int64', + 'latency_60000ms' => 'int64', + 'waf_responses' => 'int64', + 'waf_resp_header_bytes' => 'int64', + 'waf_resp_body_bytes' => 'int64', + 'waf_status_1xx' => 'int64', + 'waf_status_2xx' => 'int64', + 'waf_status_3xx' => 'int64', + 'waf_status_4xx' => 'int64', + 'waf_status_5xx' => 'int64', + 'waf_status_200' => 'int64', + 'waf_status_204' => 'int64', + 'waf_status_206' => 'int64', + 'waf_status_301' => 'int64', + 'waf_status_302' => 'int64', + 'waf_status_304' => 'int64', + 'waf_status_400' => 'int64', + 'waf_status_401' => 'int64', + 'waf_status_403' => 'int64', + 'waf_status_404' => 'int64', + 'waf_status_416' => 'int64', + 'waf_status_429' => 'int64', + 'waf_status_500' => 'int64', + 'waf_status_501' => 'int64', + 'waf_status_502' => 'int64', + 'waf_status_503' => 'int64', + 'waf_status_504' => 'int64', + 'waf_status_505' => 'int64', + 'waf_status_530' => 'int64', + 'waf_latency_0_to_1ms' => 'int64', + 'waf_latency_1_to_5ms' => 'int64', + 'waf_latency_5_to_10ms' => 'int64', + 'waf_latency_10_to_50ms' => 'int64', + 'waf_latency_50_to_100ms' => 'int64', + 'waf_latency_100_to_250ms' => 'int64', + 'waf_latency_250_to_500ms' => 'int64', + 'waf_latency_500_to_1000ms' => 'int64', + 'waf_latency_1000_to_5000ms' => 'int64', + 'waf_latency_5000_to_10000ms' => 'int64', + 'waf_latency_10000_to_60000ms' => 'int64', + 'waf_latency_60000ms' => 'int64', + 'compute_responses' => 'int64', + 'compute_resp_header_bytes' => 'int64', + 'compute_resp_body_bytes' => 'int64', + 'compute_status_1xx' => 'int64', + 'compute_status_2xx' => 'int64', + 'compute_status_3xx' => 'int64', + 'compute_status_4xx' => 'int64', + 'compute_status_5xx' => 'int64', + 'compute_status_200' => 'int64', + 'compute_status_204' => 'int64', + 'compute_status_206' => 'int64', + 'compute_status_301' => 'int64', + 'compute_status_302' => 'int64', + 'compute_status_304' => 'int64', + 'compute_status_400' => 'int64', + 'compute_status_401' => 'int64', + 'compute_status_403' => 'int64', + 'compute_status_404' => 'int64', + 'compute_status_416' => 'int64', + 'compute_status_429' => 'int64', + 'compute_status_500' => 'int64', + 'compute_status_501' => 'int64', + 'compute_status_502' => 'int64', + 'compute_status_503' => 'int64', + 'compute_status_504' => 'int64', + 'compute_status_505' => 'int64', + 'compute_status_530' => 'int64', + 'compute_latency_0_to_1ms' => 'int64', + 'compute_latency_1_to_5ms' => 'int64', + 'compute_latency_5_to_10ms' => 'int64', + 'compute_latency_10_to_50ms' => 'int64', + 'compute_latency_50_to_100ms' => 'int64', + 'compute_latency_100_to_250ms' => 'int64', + 'compute_latency_250_to_500ms' => 'int64', + 'compute_latency_500_to_1000ms' => 'int64', + 'compute_latency_1000_to_5000ms' => 'int64', + 'compute_latency_5000_to_10000ms' => 'int64', + 'compute_latency_10000_to_60000ms' => 'int64', + 'compute_latency_60000ms' => 'int64', + 'all_responses' => 'int64', + 'all_resp_header_bytes' => 'int64', + 'all_resp_body_bytes' => 'int64', + 'all_status_1xx' => 'int64', + 'all_status_2xx' => 'int64', + 'all_status_3xx' => 'int64', + 'all_status_4xx' => 'int64', + 'all_status_5xx' => 'int64', + 'all_status_200' => 'int64', + 'all_status_204' => 'int64', + 'all_status_206' => 'int64', + 'all_status_301' => 'int64', + 'all_status_302' => 'int64', + 'all_status_304' => 'int64', + 'all_status_400' => 'int64', + 'all_status_401' => 'int64', + 'all_status_403' => 'int64', + 'all_status_404' => 'int64', + 'all_status_416' => 'int64', + 'all_status_429' => 'int64', + 'all_status_500' => 'int64', + 'all_status_501' => 'int64', + 'all_status_502' => 'int64', + 'all_status_503' => 'int64', + 'all_status_504' => 'int64', + 'all_status_505' => 'int64', + 'all_status_530' => 'int64', + 'all_latency_0_to_1ms' => 'int64', + 'all_latency_1_to_5ms' => 'int64', + 'all_latency_5_to_10ms' => 'int64', + 'all_latency_10_to_50ms' => 'int64', + 'all_latency_50_to_100ms' => 'int64', + 'all_latency_100_to_250ms' => 'int64', + 'all_latency_250_to_500ms' => 'int64', + 'all_latency_500_to_1000ms' => 'int64', + 'all_latency_1000_to_5000ms' => 'int64', + 'all_latency_5000_to_10000ms' => 'int64', + 'all_latency_10000_to_60000ms' => 'int64', + 'all_latency_60000ms' => 'int64' ]; /** @@ -423,6 +431,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'latency_0_to_1ms' => 'latency_0_to_1ms', 'latency_1_to_5ms' => 'latency_1_to_5ms', 'latency_5_to_10ms' => 'latency_5_to_10ms', @@ -461,6 +470,7 @@ public static function fastlyFormats() 'waf_status_503' => 'waf_status_503', 'waf_status_504' => 'waf_status_504', 'waf_status_505' => 'waf_status_505', + 'waf_status_530' => 'waf_status_530', 'waf_latency_0_to_1ms' => 'waf_latency_0_to_1ms', 'waf_latency_1_to_5ms' => 'waf_latency_1_to_5ms', 'waf_latency_5_to_10ms' => 'waf_latency_5_to_10ms', @@ -499,6 +509,7 @@ public static function fastlyFormats() 'compute_status_503' => 'compute_status_503', 'compute_status_504' => 'compute_status_504', 'compute_status_505' => 'compute_status_505', + 'compute_status_530' => 'compute_status_530', 'compute_latency_0_to_1ms' => 'compute_latency_0_to_1ms', 'compute_latency_1_to_5ms' => 'compute_latency_1_to_5ms', 'compute_latency_5_to_10ms' => 'compute_latency_5_to_10ms', @@ -537,6 +548,7 @@ public static function fastlyFormats() 'all_status_503' => 'all_status_503', 'all_status_504' => 'all_status_504', 'all_status_505' => 'all_status_505', + 'all_status_530' => 'all_status_530', 'all_latency_0_to_1ms' => 'all_latency_0_to_1ms', 'all_latency_1_to_5ms' => 'all_latency_1_to_5ms', 'all_latency_5_to_10ms' => 'all_latency_5_to_10ms', @@ -583,6 +595,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'latency_0_to_1ms' => 'setLatency0To1ms', 'latency_1_to_5ms' => 'setLatency1To5ms', 'latency_5_to_10ms' => 'setLatency5To10ms', @@ -621,6 +634,7 @@ public static function fastlyFormats() 'waf_status_503' => 'setWafStatus503', 'waf_status_504' => 'setWafStatus504', 'waf_status_505' => 'setWafStatus505', + 'waf_status_530' => 'setWafStatus530', 'waf_latency_0_to_1ms' => 'setWafLatency0To1ms', 'waf_latency_1_to_5ms' => 'setWafLatency1To5ms', 'waf_latency_5_to_10ms' => 'setWafLatency5To10ms', @@ -659,6 +673,7 @@ public static function fastlyFormats() 'compute_status_503' => 'setComputeStatus503', 'compute_status_504' => 'setComputeStatus504', 'compute_status_505' => 'setComputeStatus505', + 'compute_status_530' => 'setComputeStatus530', 'compute_latency_0_to_1ms' => 'setComputeLatency0To1ms', 'compute_latency_1_to_5ms' => 'setComputeLatency1To5ms', 'compute_latency_5_to_10ms' => 'setComputeLatency5To10ms', @@ -697,6 +712,7 @@ public static function fastlyFormats() 'all_status_503' => 'setAllStatus503', 'all_status_504' => 'setAllStatus504', 'all_status_505' => 'setAllStatus505', + 'all_status_530' => 'setAllStatus530', 'all_latency_0_to_1ms' => 'setAllLatency0To1ms', 'all_latency_1_to_5ms' => 'setAllLatency1To5ms', 'all_latency_5_to_10ms' => 'setAllLatency5To10ms', @@ -743,6 +759,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'latency_0_to_1ms' => 'getLatency0To1ms', 'latency_1_to_5ms' => 'getLatency1To5ms', 'latency_5_to_10ms' => 'getLatency5To10ms', @@ -781,6 +798,7 @@ public static function fastlyFormats() 'waf_status_503' => 'getWafStatus503', 'waf_status_504' => 'getWafStatus504', 'waf_status_505' => 'getWafStatus505', + 'waf_status_530' => 'getWafStatus530', 'waf_latency_0_to_1ms' => 'getWafLatency0To1ms', 'waf_latency_1_to_5ms' => 'getWafLatency1To5ms', 'waf_latency_5_to_10ms' => 'getWafLatency5To10ms', @@ -819,6 +837,7 @@ public static function fastlyFormats() 'compute_status_503' => 'getComputeStatus503', 'compute_status_504' => 'getComputeStatus504', 'compute_status_505' => 'getComputeStatus505', + 'compute_status_530' => 'getComputeStatus530', 'compute_latency_0_to_1ms' => 'getComputeLatency0To1ms', 'compute_latency_1_to_5ms' => 'getComputeLatency1To5ms', 'compute_latency_5_to_10ms' => 'getComputeLatency5To10ms', @@ -857,6 +876,7 @@ public static function fastlyFormats() 'all_status_503' => 'getAllStatus503', 'all_status_504' => 'getAllStatus504', 'all_status_505' => 'getAllStatus505', + 'all_status_530' => 'getAllStatus530', 'all_latency_0_to_1ms' => 'getAllLatency0To1ms', 'all_latency_1_to_5ms' => 'getAllLatency1To5ms', 'all_latency_5_to_10ms' => 'getAllLatency5To10ms', @@ -954,6 +974,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['latency_0_to_1ms'] = $data['latency_0_to_1ms'] ?? null; $this->container['latency_1_to_5ms'] = $data['latency_1_to_5ms'] ?? null; $this->container['latency_5_to_10ms'] = $data['latency_5_to_10ms'] ?? null; @@ -992,6 +1013,7 @@ public function __construct(array $data = null) $this->container['waf_status_503'] = $data['waf_status_503'] ?? null; $this->container['waf_status_504'] = $data['waf_status_504'] ?? null; $this->container['waf_status_505'] = $data['waf_status_505'] ?? null; + $this->container['waf_status_530'] = $data['waf_status_530'] ?? null; $this->container['waf_latency_0_to_1ms'] = $data['waf_latency_0_to_1ms'] ?? null; $this->container['waf_latency_1_to_5ms'] = $data['waf_latency_1_to_5ms'] ?? null; $this->container['waf_latency_5_to_10ms'] = $data['waf_latency_5_to_10ms'] ?? null; @@ -1030,6 +1052,7 @@ public function __construct(array $data = null) $this->container['compute_status_503'] = $data['compute_status_503'] ?? null; $this->container['compute_status_504'] = $data['compute_status_504'] ?? null; $this->container['compute_status_505'] = $data['compute_status_505'] ?? null; + $this->container['compute_status_530'] = $data['compute_status_530'] ?? null; $this->container['compute_latency_0_to_1ms'] = $data['compute_latency_0_to_1ms'] ?? null; $this->container['compute_latency_1_to_5ms'] = $data['compute_latency_1_to_5ms'] ?? null; $this->container['compute_latency_5_to_10ms'] = $data['compute_latency_5_to_10ms'] ?? null; @@ -1068,6 +1091,7 @@ public function __construct(array $data = null) $this->container['all_status_503'] = $data['all_status_503'] ?? null; $this->container['all_status_504'] = $data['all_status_504'] ?? null; $this->container['all_status_505'] = $data['all_status_505'] ?? null; + $this->container['all_status_530'] = $data['all_status_530'] ?? null; $this->container['all_latency_0_to_1ms'] = $data['all_latency_0_to_1ms'] ?? null; $this->container['all_latency_1_to_5ms'] = $data['all_latency_1_to_5ms'] ?? null; $this->container['all_latency_5_to_10ms'] = $data['all_latency_5_to_10ms'] ?? null; @@ -1730,6 +1754,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses received from origin with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets latency_0_to_1ms * @@ -2642,6 +2690,30 @@ public function setWafStatus505($waf_status_505) return $this; } + /** + * Gets waf_status_530 + * + * @return int|null + */ + public function getWafStatus530() + { + return $this->container['waf_status_530']; + } + + /** + * Sets waf_status_530 + * + * @param int|null $waf_status_530 Number of responses received with status code 530 received for origin requests made by the Fastly WAF. + * + * @return self + */ + public function setWafStatus530($waf_status_530) + { + $this->container['waf_status_530'] = $waf_status_530; + + return $this; + } + /** * Gets waf_latency_0_to_1ms * @@ -3554,6 +3626,30 @@ public function setComputeStatus505($compute_status_505) return $this; } + /** + * Gets compute_status_530 + * + * @return int|null + */ + public function getComputeStatus530() + { + return $this->container['compute_status_530']; + } + + /** + * Sets compute_status_530 + * + * @param int|null $compute_status_530 Number of responses received with status code 530 for origin received by the Compute platform. + * + * @return self + */ + public function setComputeStatus530($compute_status_530) + { + $this->container['compute_status_530'] = $compute_status_530; + + return $this; + } + /** * Gets compute_latency_0_to_1ms * @@ -4466,6 +4562,30 @@ public function setAllStatus505($all_status_505) return $this; } + /** + * Gets all_status_530 + * + * @return int|null + */ + public function getAllStatus530() + { + return $this->container['all_status_530']; + } + + /** + * Sets all_status_530 + * + * @param int|null $all_status_530 Number of responses received with status code 530 received for origin requests made by all sources. + * + * @return self + */ + public function setAllStatus530($all_status_530) + { + $this->container['all_status_530'] = $all_status_530; + + return $this; + } + /** * Gets all_latency_0_to_1ms * diff --git a/lib/Model/Realtime.php b/lib/Model/Realtime.php index db593542..b9f526e0 100644 --- a/lib/Model/Realtime.php +++ b/lib/Model/Realtime.php @@ -66,8 +66,8 @@ class Realtime implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'timestamp' => null, - 'aggregate_delay' => null, + 'timestamp' => 'int64', + 'aggregate_delay' => 'int64', 'data' => null ]; diff --git a/lib/Model/RealtimeEntryAggregated.php b/lib/Model/RealtimeEntryAggregated.php index 367563bc..ef0c6d75 100644 --- a/lib/Model/RealtimeEntryAggregated.php +++ b/lib/Model/RealtimeEntryAggregated.php @@ -139,6 +139,7 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'uncacheable' => 'int', 'pass_time' => 'float', 'tls' => 'int', @@ -297,9 +298,23 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria 'all_status_5xx' => 'int', 'origin_offload' => 'float', 'request_denied_get_head_body' => 'int', - 'service_ddos_requests_detected' => 'int', - 'service_ddos_requests_mitigated' => 'int', - 'service_ddos_requests_allowed' => 'int' + 'ddos_protection_requests_detect_count' => 'int', + 'ddos_protection_requests_mitigate_count' => 'int', + 'ddos_protection_requests_allow_count' => 'int', + 'object_storage_class_a_operations_count' => 'int', + 'object_storage_class_b_operations_count' => 'int', + 'aia_requests' => 'int', + 'aia_status_1xx' => 'int', + 'aia_status_2xx' => 'int', + 'aia_status_3xx' => 'int', + 'aia_status_4xx' => 'int', + 'aia_status_5xx' => 'int', + 'aia_response_usage_tokens' => 'int', + 'aia_origin_usage_tokens' => 'int', + 'aia_estimated_time_saved_ms' => 'int', + 'request_collapse_usable_count' => 'int', + 'request_collapse_unusable_count' => 'int', + 'compute_cache_operations_count' => 'int' ]; /** @@ -310,252 +325,267 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $fastlyFormats = [ - 'requests' => null, - 'logging' => null, - 'log' => null, - 'resp_header_bytes' => null, - 'header_size' => null, - 'resp_body_bytes' => null, - 'body_size' => null, - 'hits' => null, - 'miss' => null, - 'pass' => null, - 'synth' => null, - 'errors' => null, + 'requests' => 'int64', + 'logging' => 'int64', + 'log' => 'int64', + 'resp_header_bytes' => 'int64', + 'header_size' => 'int64', + 'resp_body_bytes' => 'int64', + 'body_size' => 'int64', + 'hits' => 'int64', + 'miss' => 'int64', + 'pass' => 'int64', + 'synth' => 'int64', + 'errors' => 'int64', 'hits_time' => null, 'miss_time' => null, 'miss_histogram' => null, - 'compute_requests' => null, + 'compute_requests' => 'int64', 'compute_execution_time_ms' => null, - 'compute_ram_used' => null, + 'compute_ram_used' => 'int64', 'compute_request_time_ms' => null, 'compute_request_time_billed_ms' => null, - 'shield' => null, - 'ipv6' => null, - 'imgopto' => null, - 'imgopto_shield' => null, - 'imgopto_transforms' => null, - 'otfp' => null, - 'otfp_shield' => null, - 'otfp_manifests' => null, - 'video' => null, - 'pci' => null, - 'http2' => null, - 'http3' => null, - 'restarts' => null, - 'req_header_bytes' => null, - 'req_body_bytes' => null, - 'bereq_header_bytes' => null, - 'bereq_body_bytes' => null, - 'waf_blocked' => null, - 'waf_logged' => null, - 'waf_passed' => null, - 'attack_req_header_bytes' => null, - 'attack_req_body_bytes' => null, - 'attack_resp_synth_bytes' => null, - 'attack_logged_req_header_bytes' => null, - 'attack_logged_req_body_bytes' => null, - 'attack_blocked_req_header_bytes' => null, - 'attack_blocked_req_body_bytes' => null, - 'attack_passed_req_header_bytes' => null, - 'attack_passed_req_body_bytes' => null, - 'shield_resp_header_bytes' => null, - 'shield_resp_body_bytes' => null, - 'otfp_resp_header_bytes' => null, - 'otfp_resp_body_bytes' => null, - 'otfp_shield_resp_header_bytes' => null, - 'otfp_shield_resp_body_bytes' => null, + 'shield' => 'int64', + 'ipv6' => 'int64', + 'imgopto' => 'int64', + 'imgopto_shield' => 'int64', + 'imgopto_transforms' => 'int64', + 'otfp' => 'int64', + 'otfp_shield' => 'int64', + 'otfp_manifests' => 'int64', + 'video' => 'int64', + 'pci' => 'int64', + 'http2' => 'int64', + 'http3' => 'int64', + 'restarts' => 'int64', + 'req_header_bytes' => 'int64', + 'req_body_bytes' => 'int64', + 'bereq_header_bytes' => 'int64', + 'bereq_body_bytes' => 'int64', + 'waf_blocked' => 'int64', + 'waf_logged' => 'int64', + 'waf_passed' => 'int64', + 'attack_req_header_bytes' => 'int64', + 'attack_req_body_bytes' => 'int64', + 'attack_resp_synth_bytes' => 'int64', + 'attack_logged_req_header_bytes' => 'int64', + 'attack_logged_req_body_bytes' => 'int64', + 'attack_blocked_req_header_bytes' => 'int64', + 'attack_blocked_req_body_bytes' => 'int64', + 'attack_passed_req_header_bytes' => 'int64', + 'attack_passed_req_body_bytes' => 'int64', + 'shield_resp_header_bytes' => 'int64', + 'shield_resp_body_bytes' => 'int64', + 'otfp_resp_header_bytes' => 'int64', + 'otfp_resp_body_bytes' => 'int64', + 'otfp_shield_resp_header_bytes' => 'int64', + 'otfp_shield_resp_body_bytes' => 'int64', 'otfp_shield_time' => null, 'otfp_deliver_time' => null, - 'imgopto_resp_header_bytes' => null, - 'imgopto_resp_body_bytes' => null, - 'imgopto_shield_resp_header_bytes' => null, - 'imgopto_shield_resp_body_bytes' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_406' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'uncacheable' => null, + 'imgopto_resp_header_bytes' => 'int64', + 'imgopto_resp_body_bytes' => 'int64', + 'imgopto_shield_resp_header_bytes' => 'int64', + 'imgopto_shield_resp_body_bytes' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_406' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'uncacheable' => 'int64', 'pass_time' => null, - 'tls' => null, - 'tls_v10' => null, - 'tls_v11' => null, - 'tls_v12' => null, - 'tls_v13' => null, - 'object_size_1k' => null, - 'object_size_10k' => null, - 'object_size_100k' => null, - 'object_size_1m' => null, - 'object_size_10m' => null, - 'object_size_100m' => null, - 'object_size_1g' => null, - 'object_size_other' => null, + 'tls' => 'int64', + 'tls_v10' => 'int64', + 'tls_v11' => 'int64', + 'tls_v12' => 'int64', + 'tls_v13' => 'int64', + 'object_size_1k' => 'int64', + 'object_size_10k' => 'int64', + 'object_size_100k' => 'int64', + 'object_size_1m' => 'int64', + 'object_size_10m' => 'int64', + 'object_size_100m' => 'int64', + 'object_size_1g' => 'int64', + 'object_size_other' => 'int64', 'recv_sub_time' => null, - 'recv_sub_count' => null, + 'recv_sub_count' => 'int64', 'hash_sub_time' => null, - 'hash_sub_count' => null, + 'hash_sub_count' => 'int64', 'miss_sub_time' => null, - 'miss_sub_count' => null, + 'miss_sub_count' => 'int64', 'fetch_sub_time' => null, - 'fetch_sub_count' => null, + 'fetch_sub_count' => 'int64', 'pass_sub_time' => null, - 'pass_sub_count' => null, + 'pass_sub_count' => 'int64', 'pipe_sub_time' => null, - 'pipe_sub_count' => null, + 'pipe_sub_count' => 'int64', 'deliver_sub_time' => null, - 'deliver_sub_count' => null, + 'deliver_sub_count' => 'int64', 'error_sub_time' => null, - 'error_sub_count' => null, + 'error_sub_count' => 'int64', 'hit_sub_time' => null, - 'hit_sub_count' => null, + 'hit_sub_count' => 'int64', 'prehash_sub_time' => null, - 'prehash_sub_count' => null, + 'prehash_sub_count' => 'int64', 'predeliver_sub_time' => null, - 'predeliver_sub_count' => null, - 'hit_resp_body_bytes' => null, - 'miss_resp_body_bytes' => null, - 'pass_resp_body_bytes' => null, - 'compute_req_header_bytes' => null, - 'compute_req_body_bytes' => null, - 'compute_resp_header_bytes' => null, - 'compute_resp_body_bytes' => null, - 'imgvideo' => null, - 'imgvideo_frames' => null, - 'imgvideo_resp_header_bytes' => null, - 'imgvideo_resp_body_bytes' => null, - 'imgvideo_shield' => null, - 'imgvideo_shield_frames' => null, - 'imgvideo_shield_resp_header_bytes' => null, - 'imgvideo_shield_resp_body_bytes' => null, - 'log_bytes' => null, - 'edge_requests' => null, - 'edge_resp_header_bytes' => null, - 'edge_resp_body_bytes' => null, - 'origin_revalidations' => null, - 'origin_fetches' => null, - 'origin_fetch_header_bytes' => null, - 'origin_fetch_body_bytes' => null, - 'origin_fetch_resp_header_bytes' => null, - 'origin_fetch_resp_body_bytes' => null, - 'shield_revalidations' => null, - 'shield_fetches' => null, - 'shield_fetch_header_bytes' => null, - 'shield_fetch_body_bytes' => null, - 'shield_fetch_resp_header_bytes' => null, - 'shield_fetch_resp_body_bytes' => null, - 'segblock_origin_fetches' => null, - 'segblock_shield_fetches' => null, - 'compute_resp_status_1xx' => null, - 'compute_resp_status_2xx' => null, - 'compute_resp_status_3xx' => null, - 'compute_resp_status_4xx' => null, - 'compute_resp_status_5xx' => null, - 'edge_hit_requests' => null, - 'edge_miss_requests' => null, - 'compute_bereq_header_bytes' => null, - 'compute_bereq_body_bytes' => null, - 'compute_beresp_header_bytes' => null, - 'compute_beresp_body_bytes' => null, - 'origin_cache_fetches' => null, - 'shield_cache_fetches' => null, - 'compute_bereqs' => null, - 'compute_bereq_errors' => null, - 'compute_resource_limit_exceeded' => null, - 'compute_heap_limit_exceeded' => null, - 'compute_stack_limit_exceeded' => null, - 'compute_globals_limit_exceeded' => null, - 'compute_guest_errors' => null, - 'compute_runtime_errors' => null, - 'edge_hit_resp_body_bytes' => null, - 'edge_hit_resp_header_bytes' => null, - 'edge_miss_resp_body_bytes' => null, - 'edge_miss_resp_header_bytes' => null, - 'origin_cache_fetch_resp_body_bytes' => null, - 'origin_cache_fetch_resp_header_bytes' => null, - 'shield_hit_requests' => null, - 'shield_miss_requests' => null, - 'shield_hit_resp_header_bytes' => null, - 'shield_hit_resp_body_bytes' => null, - 'shield_miss_resp_header_bytes' => null, - 'shield_miss_resp_body_bytes' => null, - 'websocket_req_header_bytes' => null, - 'websocket_req_body_bytes' => null, - 'websocket_resp_header_bytes' => null, - 'websocket_bereq_header_bytes' => null, - 'websocket_bereq_body_bytes' => null, - 'websocket_beresp_header_bytes' => null, - 'websocket_beresp_body_bytes' => null, - 'websocket_conn_time_ms' => null, - 'websocket_resp_body_bytes' => null, - 'fanout_recv_publishes' => null, - 'fanout_send_publishes' => null, - 'kv_store_class_a_operations' => null, - 'kv_store_class_b_operations' => null, - 'object_store_class_a_operations' => null, - 'object_store_class_b_operations' => null, - 'fanout_req_header_bytes' => null, - 'fanout_req_body_bytes' => null, - 'fanout_resp_header_bytes' => null, - 'fanout_resp_body_bytes' => null, - 'fanout_bereq_header_bytes' => null, - 'fanout_bereq_body_bytes' => null, - 'fanout_beresp_header_bytes' => null, - 'fanout_beresp_body_bytes' => null, - 'fanout_conn_time_ms' => null, - 'ddos_action_limit_streams_connections' => null, - 'ddos_action_limit_streams_requests' => null, - 'ddos_action_tarpit_accept' => null, - 'ddos_action_tarpit' => null, - 'ddos_action_close' => null, - 'ddos_action_blackhole' => null, - 'bot_challenge_starts' => null, - 'bot_challenge_complete_tokens_passed' => null, - 'bot_challenge_complete_tokens_failed' => null, - 'bot_challenge_complete_tokens_checked' => null, - 'bot_challenge_complete_tokens_disabled' => null, - 'bot_challenges_issued' => null, - 'bot_challenges_succeeded' => null, - 'bot_challenges_failed' => null, - 'bot_challenge_complete_tokens_issued' => null, - 'ddos_action_downgrade' => null, - 'ddos_action_downgraded_connections' => null, - 'all_hit_requests' => null, - 'all_miss_requests' => null, - 'all_pass_requests' => null, - 'all_error_requests' => null, - 'all_synth_requests' => null, - 'all_edge_hit_requests' => null, - 'all_edge_miss_requests' => null, - 'all_status_1xx' => null, - 'all_status_2xx' => null, - 'all_status_3xx' => null, - 'all_status_4xx' => null, - 'all_status_5xx' => null, + 'predeliver_sub_count' => 'int64', + 'hit_resp_body_bytes' => 'int64', + 'miss_resp_body_bytes' => 'int64', + 'pass_resp_body_bytes' => 'int64', + 'compute_req_header_bytes' => 'int64', + 'compute_req_body_bytes' => 'int64', + 'compute_resp_header_bytes' => 'int64', + 'compute_resp_body_bytes' => 'int64', + 'imgvideo' => 'int64', + 'imgvideo_frames' => 'int64', + 'imgvideo_resp_header_bytes' => 'int64', + 'imgvideo_resp_body_bytes' => 'int64', + 'imgvideo_shield' => 'int64', + 'imgvideo_shield_frames' => 'int64', + 'imgvideo_shield_resp_header_bytes' => 'int64', + 'imgvideo_shield_resp_body_bytes' => 'int64', + 'log_bytes' => 'int64', + 'edge_requests' => 'int64', + 'edge_resp_header_bytes' => 'int64', + 'edge_resp_body_bytes' => 'int64', + 'origin_revalidations' => 'int64', + 'origin_fetches' => 'int64', + 'origin_fetch_header_bytes' => 'int64', + 'origin_fetch_body_bytes' => 'int64', + 'origin_fetch_resp_header_bytes' => 'int64', + 'origin_fetch_resp_body_bytes' => 'int64', + 'shield_revalidations' => 'int64', + 'shield_fetches' => 'int64', + 'shield_fetch_header_bytes' => 'int64', + 'shield_fetch_body_bytes' => 'int64', + 'shield_fetch_resp_header_bytes' => 'int64', + 'shield_fetch_resp_body_bytes' => 'int64', + 'segblock_origin_fetches' => 'int64', + 'segblock_shield_fetches' => 'int64', + 'compute_resp_status_1xx' => 'int64', + 'compute_resp_status_2xx' => 'int64', + 'compute_resp_status_3xx' => 'int64', + 'compute_resp_status_4xx' => 'int64', + 'compute_resp_status_5xx' => 'int64', + 'edge_hit_requests' => 'int64', + 'edge_miss_requests' => 'int64', + 'compute_bereq_header_bytes' => 'int64', + 'compute_bereq_body_bytes' => 'int64', + 'compute_beresp_header_bytes' => 'int64', + 'compute_beresp_body_bytes' => 'int64', + 'origin_cache_fetches' => 'int64', + 'shield_cache_fetches' => 'int64', + 'compute_bereqs' => 'int64', + 'compute_bereq_errors' => 'int64', + 'compute_resource_limit_exceeded' => 'int64', + 'compute_heap_limit_exceeded' => 'int64', + 'compute_stack_limit_exceeded' => 'int64', + 'compute_globals_limit_exceeded' => 'int64', + 'compute_guest_errors' => 'int64', + 'compute_runtime_errors' => 'int64', + 'edge_hit_resp_body_bytes' => 'int64', + 'edge_hit_resp_header_bytes' => 'int64', + 'edge_miss_resp_body_bytes' => 'int64', + 'edge_miss_resp_header_bytes' => 'int64', + 'origin_cache_fetch_resp_body_bytes' => 'int64', + 'origin_cache_fetch_resp_header_bytes' => 'int64', + 'shield_hit_requests' => 'int64', + 'shield_miss_requests' => 'int64', + 'shield_hit_resp_header_bytes' => 'int64', + 'shield_hit_resp_body_bytes' => 'int64', + 'shield_miss_resp_header_bytes' => 'int64', + 'shield_miss_resp_body_bytes' => 'int64', + 'websocket_req_header_bytes' => 'int64', + 'websocket_req_body_bytes' => 'int64', + 'websocket_resp_header_bytes' => 'int64', + 'websocket_bereq_header_bytes' => 'int64', + 'websocket_bereq_body_bytes' => 'int64', + 'websocket_beresp_header_bytes' => 'int64', + 'websocket_beresp_body_bytes' => 'int64', + 'websocket_conn_time_ms' => 'int64', + 'websocket_resp_body_bytes' => 'int64', + 'fanout_recv_publishes' => 'int64', + 'fanout_send_publishes' => 'int64', + 'kv_store_class_a_operations' => 'int64', + 'kv_store_class_b_operations' => 'int64', + 'object_store_class_a_operations' => 'int64', + 'object_store_class_b_operations' => 'int64', + 'fanout_req_header_bytes' => 'int64', + 'fanout_req_body_bytes' => 'int64', + 'fanout_resp_header_bytes' => 'int64', + 'fanout_resp_body_bytes' => 'int64', + 'fanout_bereq_header_bytes' => 'int64', + 'fanout_bereq_body_bytes' => 'int64', + 'fanout_beresp_header_bytes' => 'int64', + 'fanout_beresp_body_bytes' => 'int64', + 'fanout_conn_time_ms' => 'int64', + 'ddos_action_limit_streams_connections' => 'int64', + 'ddos_action_limit_streams_requests' => 'int64', + 'ddos_action_tarpit_accept' => 'int64', + 'ddos_action_tarpit' => 'int64', + 'ddos_action_close' => 'int64', + 'ddos_action_blackhole' => 'int64', + 'bot_challenge_starts' => 'int64', + 'bot_challenge_complete_tokens_passed' => 'int64', + 'bot_challenge_complete_tokens_failed' => 'int64', + 'bot_challenge_complete_tokens_checked' => 'int64', + 'bot_challenge_complete_tokens_disabled' => 'int64', + 'bot_challenges_issued' => 'int64', + 'bot_challenges_succeeded' => 'int64', + 'bot_challenges_failed' => 'int64', + 'bot_challenge_complete_tokens_issued' => 'int64', + 'ddos_action_downgrade' => 'int64', + 'ddos_action_downgraded_connections' => 'int64', + 'all_hit_requests' => 'int64', + 'all_miss_requests' => 'int64', + 'all_pass_requests' => 'int64', + 'all_error_requests' => 'int64', + 'all_synth_requests' => 'int64', + 'all_edge_hit_requests' => 'int64', + 'all_edge_miss_requests' => 'int64', + 'all_status_1xx' => 'int64', + 'all_status_2xx' => 'int64', + 'all_status_3xx' => 'int64', + 'all_status_4xx' => 'int64', + 'all_status_5xx' => 'int64', 'origin_offload' => null, - 'request_denied_get_head_body' => null, - 'service_ddos_requests_detected' => null, - 'service_ddos_requests_mitigated' => null, - 'service_ddos_requests_allowed' => null + 'request_denied_get_head_body' => 'int64', + 'ddos_protection_requests_detect_count' => 'int64', + 'ddos_protection_requests_mitigate_count' => 'int64', + 'ddos_protection_requests_allow_count' => 'int64', + 'object_storage_class_a_operations_count' => 'int64', + 'object_storage_class_b_operations_count' => 'int64', + 'aia_requests' => 'int64', + 'aia_status_1xx' => 'int64', + 'aia_status_2xx' => 'int64', + 'aia_status_3xx' => 'int64', + 'aia_status_4xx' => 'int64', + 'aia_status_5xx' => 'int64', + 'aia_response_usage_tokens' => 'int64', + 'aia_origin_usage_tokens' => 'int64', + 'aia_estimated_time_saved_ms' => 'int64', + 'request_collapse_usable_count' => 'int64', + 'request_collapse_unusable_count' => 'int64', + 'compute_cache_operations_count' => 'int64' ]; /** @@ -670,6 +700,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'uncacheable' => 'uncacheable', 'pass_time' => 'pass_time', 'tls' => 'tls', @@ -828,9 +859,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'all_status_5xx', 'origin_offload' => 'origin_offload', 'request_denied_get_head_body' => 'request_denied_get_head_body', - 'service_ddos_requests_detected' => 'service_ddos_requests_detected', - 'service_ddos_requests_mitigated' => 'service_ddos_requests_mitigated', - 'service_ddos_requests_allowed' => 'service_ddos_requests_allowed' + 'ddos_protection_requests_detect_count' => 'ddos_protection_requests_detect_count', + 'ddos_protection_requests_mitigate_count' => 'ddos_protection_requests_mitigate_count', + 'ddos_protection_requests_allow_count' => 'ddos_protection_requests_allow_count', + 'object_storage_class_a_operations_count' => 'object_storage_class_a_operations_count', + 'object_storage_class_b_operations_count' => 'object_storage_class_b_operations_count', + 'aia_requests' => 'aia_requests', + 'aia_status_1xx' => 'aia_status_1xx', + 'aia_status_2xx' => 'aia_status_2xx', + 'aia_status_3xx' => 'aia_status_3xx', + 'aia_status_4xx' => 'aia_status_4xx', + 'aia_status_5xx' => 'aia_status_5xx', + 'aia_response_usage_tokens' => 'aia_response_usage_tokens', + 'aia_origin_usage_tokens' => 'aia_origin_usage_tokens', + 'aia_estimated_time_saved_ms' => 'aia_estimated_time_saved_ms', + 'request_collapse_usable_count' => 'request_collapse_usable_count', + 'request_collapse_unusable_count' => 'request_collapse_unusable_count', + 'compute_cache_operations_count' => 'compute_cache_operations_count' ]; /** @@ -924,6 +969,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'uncacheable' => 'setUncacheable', 'pass_time' => 'setPassTime', 'tls' => 'setTls', @@ -1082,9 +1128,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'setAllStatus5xx', 'origin_offload' => 'setOriginOffload', 'request_denied_get_head_body' => 'setRequestDeniedGetHeadBody', - 'service_ddos_requests_detected' => 'setServiceDdosRequestsDetected', - 'service_ddos_requests_mitigated' => 'setServiceDdosRequestsMitigated', - 'service_ddos_requests_allowed' => 'setServiceDdosRequestsAllowed' + 'ddos_protection_requests_detect_count' => 'setDdosProtectionRequestsDetectCount', + 'ddos_protection_requests_mitigate_count' => 'setDdosProtectionRequestsMitigateCount', + 'ddos_protection_requests_allow_count' => 'setDdosProtectionRequestsAllowCount', + 'object_storage_class_a_operations_count' => 'setObjectStorageClassAOperationsCount', + 'object_storage_class_b_operations_count' => 'setObjectStorageClassBOperationsCount', + 'aia_requests' => 'setAiaRequests', + 'aia_status_1xx' => 'setAiaStatus1xx', + 'aia_status_2xx' => 'setAiaStatus2xx', + 'aia_status_3xx' => 'setAiaStatus3xx', + 'aia_status_4xx' => 'setAiaStatus4xx', + 'aia_status_5xx' => 'setAiaStatus5xx', + 'aia_response_usage_tokens' => 'setAiaResponseUsageTokens', + 'aia_origin_usage_tokens' => 'setAiaOriginUsageTokens', + 'aia_estimated_time_saved_ms' => 'setAiaEstimatedTimeSavedMs', + 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', + 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', + 'compute_cache_operations_count' => 'setComputeCacheOperationsCount' ]; /** @@ -1178,6 +1238,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'uncacheable' => 'getUncacheable', 'pass_time' => 'getPassTime', 'tls' => 'getTls', @@ -1336,9 +1397,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'getAllStatus5xx', 'origin_offload' => 'getOriginOffload', 'request_denied_get_head_body' => 'getRequestDeniedGetHeadBody', - 'service_ddos_requests_detected' => 'getServiceDdosRequestsDetected', - 'service_ddos_requests_mitigated' => 'getServiceDdosRequestsMitigated', - 'service_ddos_requests_allowed' => 'getServiceDdosRequestsAllowed' + 'ddos_protection_requests_detect_count' => 'getDdosProtectionRequestsDetectCount', + 'ddos_protection_requests_mitigate_count' => 'getDdosProtectionRequestsMitigateCount', + 'ddos_protection_requests_allow_count' => 'getDdosProtectionRequestsAllowCount', + 'object_storage_class_a_operations_count' => 'getObjectStorageClassAOperationsCount', + 'object_storage_class_b_operations_count' => 'getObjectStorageClassBOperationsCount', + 'aia_requests' => 'getAiaRequests', + 'aia_status_1xx' => 'getAiaStatus1xx', + 'aia_status_2xx' => 'getAiaStatus2xx', + 'aia_status_3xx' => 'getAiaStatus3xx', + 'aia_status_4xx' => 'getAiaStatus4xx', + 'aia_status_5xx' => 'getAiaStatus5xx', + 'aia_response_usage_tokens' => 'getAiaResponseUsageTokens', + 'aia_origin_usage_tokens' => 'getAiaOriginUsageTokens', + 'aia_estimated_time_saved_ms' => 'getAiaEstimatedTimeSavedMs', + 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', + 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', + 'compute_cache_operations_count' => 'getComputeCacheOperationsCount' ]; /** @@ -1483,6 +1558,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['uncacheable'] = $data['uncacheable'] ?? null; $this->container['pass_time'] = $data['pass_time'] ?? null; $this->container['tls'] = $data['tls'] ?? null; @@ -1641,9 +1717,23 @@ public function __construct(array $data = null) $this->container['all_status_5xx'] = $data['all_status_5xx'] ?? null; $this->container['origin_offload'] = $data['origin_offload'] ?? null; $this->container['request_denied_get_head_body'] = $data['request_denied_get_head_body'] ?? null; - $this->container['service_ddos_requests_detected'] = $data['service_ddos_requests_detected'] ?? null; - $this->container['service_ddos_requests_mitigated'] = $data['service_ddos_requests_mitigated'] ?? null; - $this->container['service_ddos_requests_allowed'] = $data['service_ddos_requests_allowed'] ?? null; + $this->container['ddos_protection_requests_detect_count'] = $data['ddos_protection_requests_detect_count'] ?? null; + $this->container['ddos_protection_requests_mitigate_count'] = $data['ddos_protection_requests_mitigate_count'] ?? null; + $this->container['ddos_protection_requests_allow_count'] = $data['ddos_protection_requests_allow_count'] ?? null; + $this->container['object_storage_class_a_operations_count'] = $data['object_storage_class_a_operations_count'] ?? null; + $this->container['object_storage_class_b_operations_count'] = $data['object_storage_class_b_operations_count'] ?? null; + $this->container['aia_requests'] = $data['aia_requests'] ?? null; + $this->container['aia_status_1xx'] = $data['aia_status_1xx'] ?? null; + $this->container['aia_status_2xx'] = $data['aia_status_2xx'] ?? null; + $this->container['aia_status_3xx'] = $data['aia_status_3xx'] ?? null; + $this->container['aia_status_4xx'] = $data['aia_status_4xx'] ?? null; + $this->container['aia_status_5xx'] = $data['aia_status_5xx'] ?? null; + $this->container['aia_response_usage_tokens'] = $data['aia_response_usage_tokens'] ?? null; + $this->container['aia_origin_usage_tokens'] = $data['aia_origin_usage_tokens'] ?? null; + $this->container['aia_estimated_time_saved_ms'] = $data['aia_estimated_time_saved_ms'] ?? null; + $this->container['request_collapse_usable_count'] = $data['request_collapse_usable_count'] ?? null; + $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; + $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; } /** @@ -3710,6 +3800,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses sent with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets uncacheable * @@ -7507,73 +7621,409 @@ public function setRequestDeniedGetHeadBody($request_denied_get_head_body) } /** - * Gets service_ddos_requests_detected + * Gets ddos_protection_requests_detect_count + * + * @return int|null + */ + public function getDdosProtectionRequestsDetectCount() + { + return $this->container['ddos_protection_requests_detect_count']; + } + + /** + * Sets ddos_protection_requests_detect_count + * + * @param int|null $ddos_protection_requests_detect_count Number of requests classified as a DDoS attack against a customer origin or service. + * + * @return self + */ + public function setDdosProtectionRequestsDetectCount($ddos_protection_requests_detect_count) + { + $this->container['ddos_protection_requests_detect_count'] = $ddos_protection_requests_detect_count; + + return $this; + } + + /** + * Gets ddos_protection_requests_mitigate_count + * + * @return int|null + */ + public function getDdosProtectionRequestsMitigateCount() + { + return $this->container['ddos_protection_requests_mitigate_count']; + } + + /** + * Sets ddos_protection_requests_mitigate_count + * + * @param int|null $ddos_protection_requests_mitigate_count Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. + * + * @return self + */ + public function setDdosProtectionRequestsMitigateCount($ddos_protection_requests_mitigate_count) + { + $this->container['ddos_protection_requests_mitigate_count'] = $ddos_protection_requests_mitigate_count; + + return $this; + } + + /** + * Gets ddos_protection_requests_allow_count + * + * @return int|null + */ + public function getDdosProtectionRequestsAllowCount() + { + return $this->container['ddos_protection_requests_allow_count']; + } + + /** + * Sets ddos_protection_requests_allow_count + * + * @param int|null $ddos_protection_requests_allow_count Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. + * + * @return self + */ + public function setDdosProtectionRequestsAllowCount($ddos_protection_requests_allow_count) + { + $this->container['ddos_protection_requests_allow_count'] = $ddos_protection_requests_allow_count; + + return $this; + } + + /** + * Gets object_storage_class_a_operations_count + * + * @return int|null + */ + public function getObjectStorageClassAOperationsCount() + { + return $this->container['object_storage_class_a_operations_count']; + } + + /** + * Sets object_storage_class_a_operations_count + * + * @param int|null $object_storage_class_a_operations_count A count of the number of Class A Object Storage operations. + * + * @return self + */ + public function setObjectStorageClassAOperationsCount($object_storage_class_a_operations_count) + { + $this->container['object_storage_class_a_operations_count'] = $object_storage_class_a_operations_count; + + return $this; + } + + /** + * Gets object_storage_class_b_operations_count + * + * @return int|null + */ + public function getObjectStorageClassBOperationsCount() + { + return $this->container['object_storage_class_b_operations_count']; + } + + /** + * Sets object_storage_class_b_operations_count + * + * @param int|null $object_storage_class_b_operations_count A count of the number of Class B Object Storage operations. + * + * @return self + */ + public function setObjectStorageClassBOperationsCount($object_storage_class_b_operations_count) + { + $this->container['object_storage_class_b_operations_count'] = $object_storage_class_b_operations_count; + + return $this; + } + + /** + * Gets aia_requests + * + * @return int|null + */ + public function getAiaRequests() + { + return $this->container['aia_requests']; + } + + /** + * Sets aia_requests + * + * @param int|null $aia_requests Number of requests received by AI Accelerator. + * + * @return self + */ + public function setAiaRequests($aia_requests) + { + $this->container['aia_requests'] = $aia_requests; + + return $this; + } + + /** + * Gets aia_status_1xx + * + * @return int|null + */ + public function getAiaStatus1xx() + { + return $this->container['aia_status_1xx']; + } + + /** + * Sets aia_status_1xx + * + * @param int|null $aia_status_1xx Number of \"Informational\" category status codes received from AI provider. + * + * @return self + */ + public function setAiaStatus1xx($aia_status_1xx) + { + $this->container['aia_status_1xx'] = $aia_status_1xx; + + return $this; + } + + /** + * Gets aia_status_2xx + * + * @return int|null + */ + public function getAiaStatus2xx() + { + return $this->container['aia_status_2xx']; + } + + /** + * Sets aia_status_2xx + * + * @param int|null $aia_status_2xx Number of \"Success\" status codes received from AI provider. + * + * @return self + */ + public function setAiaStatus2xx($aia_status_2xx) + { + $this->container['aia_status_2xx'] = $aia_status_2xx; + + return $this; + } + + /** + * Gets aia_status_3xx + * + * @return int|null + */ + public function getAiaStatus3xx() + { + return $this->container['aia_status_3xx']; + } + + /** + * Sets aia_status_3xx + * + * @param int|null $aia_status_3xx Number of \"Redirection\" received from AI provider. + * + * @return self + */ + public function setAiaStatus3xx($aia_status_3xx) + { + $this->container['aia_status_3xx'] = $aia_status_3xx; + + return $this; + } + + /** + * Gets aia_status_4xx + * + * @return int|null + */ + public function getAiaStatus4xx() + { + return $this->container['aia_status_4xx']; + } + + /** + * Sets aia_status_4xx + * + * @param int|null $aia_status_4xx Number of \"Client Error\" received from AI provider. + * + * @return self + */ + public function setAiaStatus4xx($aia_status_4xx) + { + $this->container['aia_status_4xx'] = $aia_status_4xx; + + return $this; + } + + /** + * Gets aia_status_5xx + * + * @return int|null + */ + public function getAiaStatus5xx() + { + return $this->container['aia_status_5xx']; + } + + /** + * Sets aia_status_5xx + * + * @param int|null $aia_status_5xx Number of \"Server Error\" received from AI provider. + * + * @return self + */ + public function setAiaStatus5xx($aia_status_5xx) + { + $this->container['aia_status_5xx'] = $aia_status_5xx; + + return $this; + } + + /** + * Gets aia_response_usage_tokens + * + * @return int|null + */ + public function getAiaResponseUsageTokens() + { + return $this->container['aia_response_usage_tokens']; + } + + /** + * Sets aia_response_usage_tokens + * + * @param int|null $aia_response_usage_tokens The usage tokens associated with the response returned from the AI Accelerator cache. + * + * @return self + */ + public function setAiaResponseUsageTokens($aia_response_usage_tokens) + { + $this->container['aia_response_usage_tokens'] = $aia_response_usage_tokens; + + return $this; + } + + /** + * Gets aia_origin_usage_tokens + * + * @return int|null + */ + public function getAiaOriginUsageTokens() + { + return $this->container['aia_origin_usage_tokens']; + } + + /** + * Sets aia_origin_usage_tokens + * + * @param int|null $aia_origin_usage_tokens The number of usage tokens reported by the request to the origin from AI Accelerator. + * + * @return self + */ + public function setAiaOriginUsageTokens($aia_origin_usage_tokens) + { + $this->container['aia_origin_usage_tokens'] = $aia_origin_usage_tokens; + + return $this; + } + + /** + * Gets aia_estimated_time_saved_ms + * + * @return int|null + */ + public function getAiaEstimatedTimeSavedMs() + { + return $this->container['aia_estimated_time_saved_ms']; + } + + /** + * Sets aia_estimated_time_saved_ms + * + * @param int|null $aia_estimated_time_saved_ms The estimated amount of time saved by responses served from the AI Accelerator semantic cache. + * + * @return self + */ + public function setAiaEstimatedTimeSavedMs($aia_estimated_time_saved_ms) + { + $this->container['aia_estimated_time_saved_ms'] = $aia_estimated_time_saved_ms; + + return $this; + } + + /** + * Gets request_collapse_usable_count * * @return int|null */ - public function getServiceDdosRequestsDetected() + public function getRequestCollapseUsableCount() { - return $this->container['service_ddos_requests_detected']; + return $this->container['request_collapse_usable_count']; } /** - * Sets service_ddos_requests_detected + * Sets request_collapse_usable_count * - * @param int|null $service_ddos_requests_detected Number of requests classified as a DDoS attack against a customer origin or service. + * @param int|null $request_collapse_usable_count Number of requests that were collapsed and satisfied by a usable cache object. * * @return self */ - public function setServiceDdosRequestsDetected($service_ddos_requests_detected) + public function setRequestCollapseUsableCount($request_collapse_usable_count) { - $this->container['service_ddos_requests_detected'] = $service_ddos_requests_detected; + $this->container['request_collapse_usable_count'] = $request_collapse_usable_count; return $this; } /** - * Gets service_ddos_requests_mitigated + * Gets request_collapse_unusable_count * * @return int|null */ - public function getServiceDdosRequestsMitigated() + public function getRequestCollapseUnusableCount() { - return $this->container['service_ddos_requests_mitigated']; + return $this->container['request_collapse_unusable_count']; } /** - * Sets service_ddos_requests_mitigated + * Sets request_collapse_unusable_count * - * @param int|null $service_ddos_requests_mitigated Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. + * @param int|null $request_collapse_unusable_count Number of requests that were collapsed and unable to be satisfied by the resulting cache object. * * @return self */ - public function setServiceDdosRequestsMitigated($service_ddos_requests_mitigated) + public function setRequestCollapseUnusableCount($request_collapse_unusable_count) { - $this->container['service_ddos_requests_mitigated'] = $service_ddos_requests_mitigated; + $this->container['request_collapse_unusable_count'] = $request_collapse_unusable_count; return $this; } /** - * Gets service_ddos_requests_allowed + * Gets compute_cache_operations_count * * @return int|null */ - public function getServiceDdosRequestsAllowed() + public function getComputeCacheOperationsCount() { - return $this->container['service_ddos_requests_allowed']; + return $this->container['compute_cache_operations_count']; } /** - * Sets service_ddos_requests_allowed + * Sets compute_cache_operations_count * - * @param int|null $service_ddos_requests_allowed Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. + * @param int|null $compute_cache_operations_count Number of cache operations executed by the Compute platform. * * @return self */ - public function setServiceDdosRequestsAllowed($service_ddos_requests_allowed) + public function setComputeCacheOperationsCount($compute_cache_operations_count) { - $this->container['service_ddos_requests_allowed'] = $service_ddos_requests_allowed; + $this->container['compute_cache_operations_count'] = $compute_cache_operations_count; return $this; } diff --git a/lib/Model/RealtimeMeasurements.php b/lib/Model/RealtimeMeasurements.php index 7d25d2ac..88be41a6 100644 --- a/lib/Model/RealtimeMeasurements.php +++ b/lib/Model/RealtimeMeasurements.php @@ -139,6 +139,7 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'uncacheable' => 'int', 'pass_time' => 'float', 'tls' => 'int', @@ -297,9 +298,23 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ 'all_status_5xx' => 'int', 'origin_offload' => 'float', 'request_denied_get_head_body' => 'int', - 'service_ddos_requests_detected' => 'int', - 'service_ddos_requests_mitigated' => 'int', - 'service_ddos_requests_allowed' => 'int' + 'ddos_protection_requests_detect_count' => 'int', + 'ddos_protection_requests_mitigate_count' => 'int', + 'ddos_protection_requests_allow_count' => 'int', + 'object_storage_class_a_operations_count' => 'int', + 'object_storage_class_b_operations_count' => 'int', + 'aia_requests' => 'int', + 'aia_status_1xx' => 'int', + 'aia_status_2xx' => 'int', + 'aia_status_3xx' => 'int', + 'aia_status_4xx' => 'int', + 'aia_status_5xx' => 'int', + 'aia_response_usage_tokens' => 'int', + 'aia_origin_usage_tokens' => 'int', + 'aia_estimated_time_saved_ms' => 'int', + 'request_collapse_usable_count' => 'int', + 'request_collapse_unusable_count' => 'int', + 'compute_cache_operations_count' => 'int' ]; /** @@ -310,252 +325,267 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $fastlyFormats = [ - 'requests' => null, - 'logging' => null, - 'log' => null, - 'resp_header_bytes' => null, - 'header_size' => null, - 'resp_body_bytes' => null, - 'body_size' => null, - 'hits' => null, - 'miss' => null, - 'pass' => null, - 'synth' => null, - 'errors' => null, + 'requests' => 'int64', + 'logging' => 'int64', + 'log' => 'int64', + 'resp_header_bytes' => 'int64', + 'header_size' => 'int64', + 'resp_body_bytes' => 'int64', + 'body_size' => 'int64', + 'hits' => 'int64', + 'miss' => 'int64', + 'pass' => 'int64', + 'synth' => 'int64', + 'errors' => 'int64', 'hits_time' => null, 'miss_time' => null, 'miss_histogram' => null, - 'compute_requests' => null, + 'compute_requests' => 'int64', 'compute_execution_time_ms' => null, - 'compute_ram_used' => null, + 'compute_ram_used' => 'int64', 'compute_request_time_ms' => null, 'compute_request_time_billed_ms' => null, - 'shield' => null, - 'ipv6' => null, - 'imgopto' => null, - 'imgopto_shield' => null, - 'imgopto_transforms' => null, - 'otfp' => null, - 'otfp_shield' => null, - 'otfp_manifests' => null, - 'video' => null, - 'pci' => null, - 'http2' => null, - 'http3' => null, - 'restarts' => null, - 'req_header_bytes' => null, - 'req_body_bytes' => null, - 'bereq_header_bytes' => null, - 'bereq_body_bytes' => null, - 'waf_blocked' => null, - 'waf_logged' => null, - 'waf_passed' => null, - 'attack_req_header_bytes' => null, - 'attack_req_body_bytes' => null, - 'attack_resp_synth_bytes' => null, - 'attack_logged_req_header_bytes' => null, - 'attack_logged_req_body_bytes' => null, - 'attack_blocked_req_header_bytes' => null, - 'attack_blocked_req_body_bytes' => null, - 'attack_passed_req_header_bytes' => null, - 'attack_passed_req_body_bytes' => null, - 'shield_resp_header_bytes' => null, - 'shield_resp_body_bytes' => null, - 'otfp_resp_header_bytes' => null, - 'otfp_resp_body_bytes' => null, - 'otfp_shield_resp_header_bytes' => null, - 'otfp_shield_resp_body_bytes' => null, + 'shield' => 'int64', + 'ipv6' => 'int64', + 'imgopto' => 'int64', + 'imgopto_shield' => 'int64', + 'imgopto_transforms' => 'int64', + 'otfp' => 'int64', + 'otfp_shield' => 'int64', + 'otfp_manifests' => 'int64', + 'video' => 'int64', + 'pci' => 'int64', + 'http2' => 'int64', + 'http3' => 'int64', + 'restarts' => 'int64', + 'req_header_bytes' => 'int64', + 'req_body_bytes' => 'int64', + 'bereq_header_bytes' => 'int64', + 'bereq_body_bytes' => 'int64', + 'waf_blocked' => 'int64', + 'waf_logged' => 'int64', + 'waf_passed' => 'int64', + 'attack_req_header_bytes' => 'int64', + 'attack_req_body_bytes' => 'int64', + 'attack_resp_synth_bytes' => 'int64', + 'attack_logged_req_header_bytes' => 'int64', + 'attack_logged_req_body_bytes' => 'int64', + 'attack_blocked_req_header_bytes' => 'int64', + 'attack_blocked_req_body_bytes' => 'int64', + 'attack_passed_req_header_bytes' => 'int64', + 'attack_passed_req_body_bytes' => 'int64', + 'shield_resp_header_bytes' => 'int64', + 'shield_resp_body_bytes' => 'int64', + 'otfp_resp_header_bytes' => 'int64', + 'otfp_resp_body_bytes' => 'int64', + 'otfp_shield_resp_header_bytes' => 'int64', + 'otfp_shield_resp_body_bytes' => 'int64', 'otfp_shield_time' => null, 'otfp_deliver_time' => null, - 'imgopto_resp_header_bytes' => null, - 'imgopto_resp_body_bytes' => null, - 'imgopto_shield_resp_header_bytes' => null, - 'imgopto_shield_resp_body_bytes' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_406' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'uncacheable' => null, + 'imgopto_resp_header_bytes' => 'int64', + 'imgopto_resp_body_bytes' => 'int64', + 'imgopto_shield_resp_header_bytes' => 'int64', + 'imgopto_shield_resp_body_bytes' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_406' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'uncacheable' => 'int64', 'pass_time' => null, - 'tls' => null, - 'tls_v10' => null, - 'tls_v11' => null, - 'tls_v12' => null, - 'tls_v13' => null, - 'object_size_1k' => null, - 'object_size_10k' => null, - 'object_size_100k' => null, - 'object_size_1m' => null, - 'object_size_10m' => null, - 'object_size_100m' => null, - 'object_size_1g' => null, - 'object_size_other' => null, + 'tls' => 'int64', + 'tls_v10' => 'int64', + 'tls_v11' => 'int64', + 'tls_v12' => 'int64', + 'tls_v13' => 'int64', + 'object_size_1k' => 'int64', + 'object_size_10k' => 'int64', + 'object_size_100k' => 'int64', + 'object_size_1m' => 'int64', + 'object_size_10m' => 'int64', + 'object_size_100m' => 'int64', + 'object_size_1g' => 'int64', + 'object_size_other' => 'int64', 'recv_sub_time' => null, - 'recv_sub_count' => null, + 'recv_sub_count' => 'int64', 'hash_sub_time' => null, - 'hash_sub_count' => null, + 'hash_sub_count' => 'int64', 'miss_sub_time' => null, - 'miss_sub_count' => null, + 'miss_sub_count' => 'int64', 'fetch_sub_time' => null, - 'fetch_sub_count' => null, + 'fetch_sub_count' => 'int64', 'pass_sub_time' => null, - 'pass_sub_count' => null, + 'pass_sub_count' => 'int64', 'pipe_sub_time' => null, - 'pipe_sub_count' => null, + 'pipe_sub_count' => 'int64', 'deliver_sub_time' => null, - 'deliver_sub_count' => null, + 'deliver_sub_count' => 'int64', 'error_sub_time' => null, - 'error_sub_count' => null, + 'error_sub_count' => 'int64', 'hit_sub_time' => null, - 'hit_sub_count' => null, + 'hit_sub_count' => 'int64', 'prehash_sub_time' => null, - 'prehash_sub_count' => null, + 'prehash_sub_count' => 'int64', 'predeliver_sub_time' => null, - 'predeliver_sub_count' => null, - 'hit_resp_body_bytes' => null, - 'miss_resp_body_bytes' => null, - 'pass_resp_body_bytes' => null, - 'compute_req_header_bytes' => null, - 'compute_req_body_bytes' => null, - 'compute_resp_header_bytes' => null, - 'compute_resp_body_bytes' => null, - 'imgvideo' => null, - 'imgvideo_frames' => null, - 'imgvideo_resp_header_bytes' => null, - 'imgvideo_resp_body_bytes' => null, - 'imgvideo_shield' => null, - 'imgvideo_shield_frames' => null, - 'imgvideo_shield_resp_header_bytes' => null, - 'imgvideo_shield_resp_body_bytes' => null, - 'log_bytes' => null, - 'edge_requests' => null, - 'edge_resp_header_bytes' => null, - 'edge_resp_body_bytes' => null, - 'origin_revalidations' => null, - 'origin_fetches' => null, - 'origin_fetch_header_bytes' => null, - 'origin_fetch_body_bytes' => null, - 'origin_fetch_resp_header_bytes' => null, - 'origin_fetch_resp_body_bytes' => null, - 'shield_revalidations' => null, - 'shield_fetches' => null, - 'shield_fetch_header_bytes' => null, - 'shield_fetch_body_bytes' => null, - 'shield_fetch_resp_header_bytes' => null, - 'shield_fetch_resp_body_bytes' => null, - 'segblock_origin_fetches' => null, - 'segblock_shield_fetches' => null, - 'compute_resp_status_1xx' => null, - 'compute_resp_status_2xx' => null, - 'compute_resp_status_3xx' => null, - 'compute_resp_status_4xx' => null, - 'compute_resp_status_5xx' => null, - 'edge_hit_requests' => null, - 'edge_miss_requests' => null, - 'compute_bereq_header_bytes' => null, - 'compute_bereq_body_bytes' => null, - 'compute_beresp_header_bytes' => null, - 'compute_beresp_body_bytes' => null, - 'origin_cache_fetches' => null, - 'shield_cache_fetches' => null, - 'compute_bereqs' => null, - 'compute_bereq_errors' => null, - 'compute_resource_limit_exceeded' => null, - 'compute_heap_limit_exceeded' => null, - 'compute_stack_limit_exceeded' => null, - 'compute_globals_limit_exceeded' => null, - 'compute_guest_errors' => null, - 'compute_runtime_errors' => null, - 'edge_hit_resp_body_bytes' => null, - 'edge_hit_resp_header_bytes' => null, - 'edge_miss_resp_body_bytes' => null, - 'edge_miss_resp_header_bytes' => null, - 'origin_cache_fetch_resp_body_bytes' => null, - 'origin_cache_fetch_resp_header_bytes' => null, - 'shield_hit_requests' => null, - 'shield_miss_requests' => null, - 'shield_hit_resp_header_bytes' => null, - 'shield_hit_resp_body_bytes' => null, - 'shield_miss_resp_header_bytes' => null, - 'shield_miss_resp_body_bytes' => null, - 'websocket_req_header_bytes' => null, - 'websocket_req_body_bytes' => null, - 'websocket_resp_header_bytes' => null, - 'websocket_bereq_header_bytes' => null, - 'websocket_bereq_body_bytes' => null, - 'websocket_beresp_header_bytes' => null, - 'websocket_beresp_body_bytes' => null, - 'websocket_conn_time_ms' => null, - 'websocket_resp_body_bytes' => null, - 'fanout_recv_publishes' => null, - 'fanout_send_publishes' => null, - 'kv_store_class_a_operations' => null, - 'kv_store_class_b_operations' => null, - 'object_store_class_a_operations' => null, - 'object_store_class_b_operations' => null, - 'fanout_req_header_bytes' => null, - 'fanout_req_body_bytes' => null, - 'fanout_resp_header_bytes' => null, - 'fanout_resp_body_bytes' => null, - 'fanout_bereq_header_bytes' => null, - 'fanout_bereq_body_bytes' => null, - 'fanout_beresp_header_bytes' => null, - 'fanout_beresp_body_bytes' => null, - 'fanout_conn_time_ms' => null, - 'ddos_action_limit_streams_connections' => null, - 'ddos_action_limit_streams_requests' => null, - 'ddos_action_tarpit_accept' => null, - 'ddos_action_tarpit' => null, - 'ddos_action_close' => null, - 'ddos_action_blackhole' => null, - 'bot_challenge_starts' => null, - 'bot_challenge_complete_tokens_passed' => null, - 'bot_challenge_complete_tokens_failed' => null, - 'bot_challenge_complete_tokens_checked' => null, - 'bot_challenge_complete_tokens_disabled' => null, - 'bot_challenges_issued' => null, - 'bot_challenges_succeeded' => null, - 'bot_challenges_failed' => null, - 'bot_challenge_complete_tokens_issued' => null, - 'ddos_action_downgrade' => null, - 'ddos_action_downgraded_connections' => null, - 'all_hit_requests' => null, - 'all_miss_requests' => null, - 'all_pass_requests' => null, - 'all_error_requests' => null, - 'all_synth_requests' => null, - 'all_edge_hit_requests' => null, - 'all_edge_miss_requests' => null, - 'all_status_1xx' => null, - 'all_status_2xx' => null, - 'all_status_3xx' => null, - 'all_status_4xx' => null, - 'all_status_5xx' => null, + 'predeliver_sub_count' => 'int64', + 'hit_resp_body_bytes' => 'int64', + 'miss_resp_body_bytes' => 'int64', + 'pass_resp_body_bytes' => 'int64', + 'compute_req_header_bytes' => 'int64', + 'compute_req_body_bytes' => 'int64', + 'compute_resp_header_bytes' => 'int64', + 'compute_resp_body_bytes' => 'int64', + 'imgvideo' => 'int64', + 'imgvideo_frames' => 'int64', + 'imgvideo_resp_header_bytes' => 'int64', + 'imgvideo_resp_body_bytes' => 'int64', + 'imgvideo_shield' => 'int64', + 'imgvideo_shield_frames' => 'int64', + 'imgvideo_shield_resp_header_bytes' => 'int64', + 'imgvideo_shield_resp_body_bytes' => 'int64', + 'log_bytes' => 'int64', + 'edge_requests' => 'int64', + 'edge_resp_header_bytes' => 'int64', + 'edge_resp_body_bytes' => 'int64', + 'origin_revalidations' => 'int64', + 'origin_fetches' => 'int64', + 'origin_fetch_header_bytes' => 'int64', + 'origin_fetch_body_bytes' => 'int64', + 'origin_fetch_resp_header_bytes' => 'int64', + 'origin_fetch_resp_body_bytes' => 'int64', + 'shield_revalidations' => 'int64', + 'shield_fetches' => 'int64', + 'shield_fetch_header_bytes' => 'int64', + 'shield_fetch_body_bytes' => 'int64', + 'shield_fetch_resp_header_bytes' => 'int64', + 'shield_fetch_resp_body_bytes' => 'int64', + 'segblock_origin_fetches' => 'int64', + 'segblock_shield_fetches' => 'int64', + 'compute_resp_status_1xx' => 'int64', + 'compute_resp_status_2xx' => 'int64', + 'compute_resp_status_3xx' => 'int64', + 'compute_resp_status_4xx' => 'int64', + 'compute_resp_status_5xx' => 'int64', + 'edge_hit_requests' => 'int64', + 'edge_miss_requests' => 'int64', + 'compute_bereq_header_bytes' => 'int64', + 'compute_bereq_body_bytes' => 'int64', + 'compute_beresp_header_bytes' => 'int64', + 'compute_beresp_body_bytes' => 'int64', + 'origin_cache_fetches' => 'int64', + 'shield_cache_fetches' => 'int64', + 'compute_bereqs' => 'int64', + 'compute_bereq_errors' => 'int64', + 'compute_resource_limit_exceeded' => 'int64', + 'compute_heap_limit_exceeded' => 'int64', + 'compute_stack_limit_exceeded' => 'int64', + 'compute_globals_limit_exceeded' => 'int64', + 'compute_guest_errors' => 'int64', + 'compute_runtime_errors' => 'int64', + 'edge_hit_resp_body_bytes' => 'int64', + 'edge_hit_resp_header_bytes' => 'int64', + 'edge_miss_resp_body_bytes' => 'int64', + 'edge_miss_resp_header_bytes' => 'int64', + 'origin_cache_fetch_resp_body_bytes' => 'int64', + 'origin_cache_fetch_resp_header_bytes' => 'int64', + 'shield_hit_requests' => 'int64', + 'shield_miss_requests' => 'int64', + 'shield_hit_resp_header_bytes' => 'int64', + 'shield_hit_resp_body_bytes' => 'int64', + 'shield_miss_resp_header_bytes' => 'int64', + 'shield_miss_resp_body_bytes' => 'int64', + 'websocket_req_header_bytes' => 'int64', + 'websocket_req_body_bytes' => 'int64', + 'websocket_resp_header_bytes' => 'int64', + 'websocket_bereq_header_bytes' => 'int64', + 'websocket_bereq_body_bytes' => 'int64', + 'websocket_beresp_header_bytes' => 'int64', + 'websocket_beresp_body_bytes' => 'int64', + 'websocket_conn_time_ms' => 'int64', + 'websocket_resp_body_bytes' => 'int64', + 'fanout_recv_publishes' => 'int64', + 'fanout_send_publishes' => 'int64', + 'kv_store_class_a_operations' => 'int64', + 'kv_store_class_b_operations' => 'int64', + 'object_store_class_a_operations' => 'int64', + 'object_store_class_b_operations' => 'int64', + 'fanout_req_header_bytes' => 'int64', + 'fanout_req_body_bytes' => 'int64', + 'fanout_resp_header_bytes' => 'int64', + 'fanout_resp_body_bytes' => 'int64', + 'fanout_bereq_header_bytes' => 'int64', + 'fanout_bereq_body_bytes' => 'int64', + 'fanout_beresp_header_bytes' => 'int64', + 'fanout_beresp_body_bytes' => 'int64', + 'fanout_conn_time_ms' => 'int64', + 'ddos_action_limit_streams_connections' => 'int64', + 'ddos_action_limit_streams_requests' => 'int64', + 'ddos_action_tarpit_accept' => 'int64', + 'ddos_action_tarpit' => 'int64', + 'ddos_action_close' => 'int64', + 'ddos_action_blackhole' => 'int64', + 'bot_challenge_starts' => 'int64', + 'bot_challenge_complete_tokens_passed' => 'int64', + 'bot_challenge_complete_tokens_failed' => 'int64', + 'bot_challenge_complete_tokens_checked' => 'int64', + 'bot_challenge_complete_tokens_disabled' => 'int64', + 'bot_challenges_issued' => 'int64', + 'bot_challenges_succeeded' => 'int64', + 'bot_challenges_failed' => 'int64', + 'bot_challenge_complete_tokens_issued' => 'int64', + 'ddos_action_downgrade' => 'int64', + 'ddos_action_downgraded_connections' => 'int64', + 'all_hit_requests' => 'int64', + 'all_miss_requests' => 'int64', + 'all_pass_requests' => 'int64', + 'all_error_requests' => 'int64', + 'all_synth_requests' => 'int64', + 'all_edge_hit_requests' => 'int64', + 'all_edge_miss_requests' => 'int64', + 'all_status_1xx' => 'int64', + 'all_status_2xx' => 'int64', + 'all_status_3xx' => 'int64', + 'all_status_4xx' => 'int64', + 'all_status_5xx' => 'int64', 'origin_offload' => null, - 'request_denied_get_head_body' => null, - 'service_ddos_requests_detected' => null, - 'service_ddos_requests_mitigated' => null, - 'service_ddos_requests_allowed' => null + 'request_denied_get_head_body' => 'int64', + 'ddos_protection_requests_detect_count' => 'int64', + 'ddos_protection_requests_mitigate_count' => 'int64', + 'ddos_protection_requests_allow_count' => 'int64', + 'object_storage_class_a_operations_count' => 'int64', + 'object_storage_class_b_operations_count' => 'int64', + 'aia_requests' => 'int64', + 'aia_status_1xx' => 'int64', + 'aia_status_2xx' => 'int64', + 'aia_status_3xx' => 'int64', + 'aia_status_4xx' => 'int64', + 'aia_status_5xx' => 'int64', + 'aia_response_usage_tokens' => 'int64', + 'aia_origin_usage_tokens' => 'int64', + 'aia_estimated_time_saved_ms' => 'int64', + 'request_collapse_usable_count' => 'int64', + 'request_collapse_unusable_count' => 'int64', + 'compute_cache_operations_count' => 'int64' ]; /** @@ -670,6 +700,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'uncacheable' => 'uncacheable', 'pass_time' => 'pass_time', 'tls' => 'tls', @@ -828,9 +859,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'all_status_5xx', 'origin_offload' => 'origin_offload', 'request_denied_get_head_body' => 'request_denied_get_head_body', - 'service_ddos_requests_detected' => 'service_ddos_requests_detected', - 'service_ddos_requests_mitigated' => 'service_ddos_requests_mitigated', - 'service_ddos_requests_allowed' => 'service_ddos_requests_allowed' + 'ddos_protection_requests_detect_count' => 'ddos_protection_requests_detect_count', + 'ddos_protection_requests_mitigate_count' => 'ddos_protection_requests_mitigate_count', + 'ddos_protection_requests_allow_count' => 'ddos_protection_requests_allow_count', + 'object_storage_class_a_operations_count' => 'object_storage_class_a_operations_count', + 'object_storage_class_b_operations_count' => 'object_storage_class_b_operations_count', + 'aia_requests' => 'aia_requests', + 'aia_status_1xx' => 'aia_status_1xx', + 'aia_status_2xx' => 'aia_status_2xx', + 'aia_status_3xx' => 'aia_status_3xx', + 'aia_status_4xx' => 'aia_status_4xx', + 'aia_status_5xx' => 'aia_status_5xx', + 'aia_response_usage_tokens' => 'aia_response_usage_tokens', + 'aia_origin_usage_tokens' => 'aia_origin_usage_tokens', + 'aia_estimated_time_saved_ms' => 'aia_estimated_time_saved_ms', + 'request_collapse_usable_count' => 'request_collapse_usable_count', + 'request_collapse_unusable_count' => 'request_collapse_unusable_count', + 'compute_cache_operations_count' => 'compute_cache_operations_count' ]; /** @@ -924,6 +969,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'uncacheable' => 'setUncacheable', 'pass_time' => 'setPassTime', 'tls' => 'setTls', @@ -1082,9 +1128,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'setAllStatus5xx', 'origin_offload' => 'setOriginOffload', 'request_denied_get_head_body' => 'setRequestDeniedGetHeadBody', - 'service_ddos_requests_detected' => 'setServiceDdosRequestsDetected', - 'service_ddos_requests_mitigated' => 'setServiceDdosRequestsMitigated', - 'service_ddos_requests_allowed' => 'setServiceDdosRequestsAllowed' + 'ddos_protection_requests_detect_count' => 'setDdosProtectionRequestsDetectCount', + 'ddos_protection_requests_mitigate_count' => 'setDdosProtectionRequestsMitigateCount', + 'ddos_protection_requests_allow_count' => 'setDdosProtectionRequestsAllowCount', + 'object_storage_class_a_operations_count' => 'setObjectStorageClassAOperationsCount', + 'object_storage_class_b_operations_count' => 'setObjectStorageClassBOperationsCount', + 'aia_requests' => 'setAiaRequests', + 'aia_status_1xx' => 'setAiaStatus1xx', + 'aia_status_2xx' => 'setAiaStatus2xx', + 'aia_status_3xx' => 'setAiaStatus3xx', + 'aia_status_4xx' => 'setAiaStatus4xx', + 'aia_status_5xx' => 'setAiaStatus5xx', + 'aia_response_usage_tokens' => 'setAiaResponseUsageTokens', + 'aia_origin_usage_tokens' => 'setAiaOriginUsageTokens', + 'aia_estimated_time_saved_ms' => 'setAiaEstimatedTimeSavedMs', + 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', + 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', + 'compute_cache_operations_count' => 'setComputeCacheOperationsCount' ]; /** @@ -1178,6 +1238,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'uncacheable' => 'getUncacheable', 'pass_time' => 'getPassTime', 'tls' => 'getTls', @@ -1336,9 +1397,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'getAllStatus5xx', 'origin_offload' => 'getOriginOffload', 'request_denied_get_head_body' => 'getRequestDeniedGetHeadBody', - 'service_ddos_requests_detected' => 'getServiceDdosRequestsDetected', - 'service_ddos_requests_mitigated' => 'getServiceDdosRequestsMitigated', - 'service_ddos_requests_allowed' => 'getServiceDdosRequestsAllowed' + 'ddos_protection_requests_detect_count' => 'getDdosProtectionRequestsDetectCount', + 'ddos_protection_requests_mitigate_count' => 'getDdosProtectionRequestsMitigateCount', + 'ddos_protection_requests_allow_count' => 'getDdosProtectionRequestsAllowCount', + 'object_storage_class_a_operations_count' => 'getObjectStorageClassAOperationsCount', + 'object_storage_class_b_operations_count' => 'getObjectStorageClassBOperationsCount', + 'aia_requests' => 'getAiaRequests', + 'aia_status_1xx' => 'getAiaStatus1xx', + 'aia_status_2xx' => 'getAiaStatus2xx', + 'aia_status_3xx' => 'getAiaStatus3xx', + 'aia_status_4xx' => 'getAiaStatus4xx', + 'aia_status_5xx' => 'getAiaStatus5xx', + 'aia_response_usage_tokens' => 'getAiaResponseUsageTokens', + 'aia_origin_usage_tokens' => 'getAiaOriginUsageTokens', + 'aia_estimated_time_saved_ms' => 'getAiaEstimatedTimeSavedMs', + 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', + 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', + 'compute_cache_operations_count' => 'getComputeCacheOperationsCount' ]; /** @@ -1483,6 +1558,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['uncacheable'] = $data['uncacheable'] ?? null; $this->container['pass_time'] = $data['pass_time'] ?? null; $this->container['tls'] = $data['tls'] ?? null; @@ -1641,9 +1717,23 @@ public function __construct(array $data = null) $this->container['all_status_5xx'] = $data['all_status_5xx'] ?? null; $this->container['origin_offload'] = $data['origin_offload'] ?? null; $this->container['request_denied_get_head_body'] = $data['request_denied_get_head_body'] ?? null; - $this->container['service_ddos_requests_detected'] = $data['service_ddos_requests_detected'] ?? null; - $this->container['service_ddos_requests_mitigated'] = $data['service_ddos_requests_mitigated'] ?? null; - $this->container['service_ddos_requests_allowed'] = $data['service_ddos_requests_allowed'] ?? null; + $this->container['ddos_protection_requests_detect_count'] = $data['ddos_protection_requests_detect_count'] ?? null; + $this->container['ddos_protection_requests_mitigate_count'] = $data['ddos_protection_requests_mitigate_count'] ?? null; + $this->container['ddos_protection_requests_allow_count'] = $data['ddos_protection_requests_allow_count'] ?? null; + $this->container['object_storage_class_a_operations_count'] = $data['object_storage_class_a_operations_count'] ?? null; + $this->container['object_storage_class_b_operations_count'] = $data['object_storage_class_b_operations_count'] ?? null; + $this->container['aia_requests'] = $data['aia_requests'] ?? null; + $this->container['aia_status_1xx'] = $data['aia_status_1xx'] ?? null; + $this->container['aia_status_2xx'] = $data['aia_status_2xx'] ?? null; + $this->container['aia_status_3xx'] = $data['aia_status_3xx'] ?? null; + $this->container['aia_status_4xx'] = $data['aia_status_4xx'] ?? null; + $this->container['aia_status_5xx'] = $data['aia_status_5xx'] ?? null; + $this->container['aia_response_usage_tokens'] = $data['aia_response_usage_tokens'] ?? null; + $this->container['aia_origin_usage_tokens'] = $data['aia_origin_usage_tokens'] ?? null; + $this->container['aia_estimated_time_saved_ms'] = $data['aia_estimated_time_saved_ms'] ?? null; + $this->container['request_collapse_usable_count'] = $data['request_collapse_usable_count'] ?? null; + $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; + $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; } /** @@ -3710,6 +3800,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses sent with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets uncacheable * @@ -7507,73 +7621,409 @@ public function setRequestDeniedGetHeadBody($request_denied_get_head_body) } /** - * Gets service_ddos_requests_detected + * Gets ddos_protection_requests_detect_count + * + * @return int|null + */ + public function getDdosProtectionRequestsDetectCount() + { + return $this->container['ddos_protection_requests_detect_count']; + } + + /** + * Sets ddos_protection_requests_detect_count + * + * @param int|null $ddos_protection_requests_detect_count Number of requests classified as a DDoS attack against a customer origin or service. + * + * @return self + */ + public function setDdosProtectionRequestsDetectCount($ddos_protection_requests_detect_count) + { + $this->container['ddos_protection_requests_detect_count'] = $ddos_protection_requests_detect_count; + + return $this; + } + + /** + * Gets ddos_protection_requests_mitigate_count + * + * @return int|null + */ + public function getDdosProtectionRequestsMitigateCount() + { + return $this->container['ddos_protection_requests_mitigate_count']; + } + + /** + * Sets ddos_protection_requests_mitigate_count + * + * @param int|null $ddos_protection_requests_mitigate_count Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. + * + * @return self + */ + public function setDdosProtectionRequestsMitigateCount($ddos_protection_requests_mitigate_count) + { + $this->container['ddos_protection_requests_mitigate_count'] = $ddos_protection_requests_mitigate_count; + + return $this; + } + + /** + * Gets ddos_protection_requests_allow_count + * + * @return int|null + */ + public function getDdosProtectionRequestsAllowCount() + { + return $this->container['ddos_protection_requests_allow_count']; + } + + /** + * Sets ddos_protection_requests_allow_count + * + * @param int|null $ddos_protection_requests_allow_count Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. + * + * @return self + */ + public function setDdosProtectionRequestsAllowCount($ddos_protection_requests_allow_count) + { + $this->container['ddos_protection_requests_allow_count'] = $ddos_protection_requests_allow_count; + + return $this; + } + + /** + * Gets object_storage_class_a_operations_count + * + * @return int|null + */ + public function getObjectStorageClassAOperationsCount() + { + return $this->container['object_storage_class_a_operations_count']; + } + + /** + * Sets object_storage_class_a_operations_count + * + * @param int|null $object_storage_class_a_operations_count A count of the number of Class A Object Storage operations. + * + * @return self + */ + public function setObjectStorageClassAOperationsCount($object_storage_class_a_operations_count) + { + $this->container['object_storage_class_a_operations_count'] = $object_storage_class_a_operations_count; + + return $this; + } + + /** + * Gets object_storage_class_b_operations_count + * + * @return int|null + */ + public function getObjectStorageClassBOperationsCount() + { + return $this->container['object_storage_class_b_operations_count']; + } + + /** + * Sets object_storage_class_b_operations_count + * + * @param int|null $object_storage_class_b_operations_count A count of the number of Class B Object Storage operations. + * + * @return self + */ + public function setObjectStorageClassBOperationsCount($object_storage_class_b_operations_count) + { + $this->container['object_storage_class_b_operations_count'] = $object_storage_class_b_operations_count; + + return $this; + } + + /** + * Gets aia_requests + * + * @return int|null + */ + public function getAiaRequests() + { + return $this->container['aia_requests']; + } + + /** + * Sets aia_requests + * + * @param int|null $aia_requests Number of requests received by AI Accelerator. + * + * @return self + */ + public function setAiaRequests($aia_requests) + { + $this->container['aia_requests'] = $aia_requests; + + return $this; + } + + /** + * Gets aia_status_1xx + * + * @return int|null + */ + public function getAiaStatus1xx() + { + return $this->container['aia_status_1xx']; + } + + /** + * Sets aia_status_1xx + * + * @param int|null $aia_status_1xx Number of \"Informational\" category status codes received from AI provider. + * + * @return self + */ + public function setAiaStatus1xx($aia_status_1xx) + { + $this->container['aia_status_1xx'] = $aia_status_1xx; + + return $this; + } + + /** + * Gets aia_status_2xx + * + * @return int|null + */ + public function getAiaStatus2xx() + { + return $this->container['aia_status_2xx']; + } + + /** + * Sets aia_status_2xx + * + * @param int|null $aia_status_2xx Number of \"Success\" status codes received from AI provider. + * + * @return self + */ + public function setAiaStatus2xx($aia_status_2xx) + { + $this->container['aia_status_2xx'] = $aia_status_2xx; + + return $this; + } + + /** + * Gets aia_status_3xx + * + * @return int|null + */ + public function getAiaStatus3xx() + { + return $this->container['aia_status_3xx']; + } + + /** + * Sets aia_status_3xx + * + * @param int|null $aia_status_3xx Number of \"Redirection\" received from AI provider. + * + * @return self + */ + public function setAiaStatus3xx($aia_status_3xx) + { + $this->container['aia_status_3xx'] = $aia_status_3xx; + + return $this; + } + + /** + * Gets aia_status_4xx + * + * @return int|null + */ + public function getAiaStatus4xx() + { + return $this->container['aia_status_4xx']; + } + + /** + * Sets aia_status_4xx + * + * @param int|null $aia_status_4xx Number of \"Client Error\" received from AI provider. + * + * @return self + */ + public function setAiaStatus4xx($aia_status_4xx) + { + $this->container['aia_status_4xx'] = $aia_status_4xx; + + return $this; + } + + /** + * Gets aia_status_5xx + * + * @return int|null + */ + public function getAiaStatus5xx() + { + return $this->container['aia_status_5xx']; + } + + /** + * Sets aia_status_5xx + * + * @param int|null $aia_status_5xx Number of \"Server Error\" received from AI provider. + * + * @return self + */ + public function setAiaStatus5xx($aia_status_5xx) + { + $this->container['aia_status_5xx'] = $aia_status_5xx; + + return $this; + } + + /** + * Gets aia_response_usage_tokens + * + * @return int|null + */ + public function getAiaResponseUsageTokens() + { + return $this->container['aia_response_usage_tokens']; + } + + /** + * Sets aia_response_usage_tokens + * + * @param int|null $aia_response_usage_tokens The usage tokens associated with the response returned from the AI Accelerator cache. + * + * @return self + */ + public function setAiaResponseUsageTokens($aia_response_usage_tokens) + { + $this->container['aia_response_usage_tokens'] = $aia_response_usage_tokens; + + return $this; + } + + /** + * Gets aia_origin_usage_tokens + * + * @return int|null + */ + public function getAiaOriginUsageTokens() + { + return $this->container['aia_origin_usage_tokens']; + } + + /** + * Sets aia_origin_usage_tokens + * + * @param int|null $aia_origin_usage_tokens The number of usage tokens reported by the request to the origin from AI Accelerator. + * + * @return self + */ + public function setAiaOriginUsageTokens($aia_origin_usage_tokens) + { + $this->container['aia_origin_usage_tokens'] = $aia_origin_usage_tokens; + + return $this; + } + + /** + * Gets aia_estimated_time_saved_ms + * + * @return int|null + */ + public function getAiaEstimatedTimeSavedMs() + { + return $this->container['aia_estimated_time_saved_ms']; + } + + /** + * Sets aia_estimated_time_saved_ms + * + * @param int|null $aia_estimated_time_saved_ms The estimated amount of time saved by responses served from the AI Accelerator semantic cache. + * + * @return self + */ + public function setAiaEstimatedTimeSavedMs($aia_estimated_time_saved_ms) + { + $this->container['aia_estimated_time_saved_ms'] = $aia_estimated_time_saved_ms; + + return $this; + } + + /** + * Gets request_collapse_usable_count * * @return int|null */ - public function getServiceDdosRequestsDetected() + public function getRequestCollapseUsableCount() { - return $this->container['service_ddos_requests_detected']; + return $this->container['request_collapse_usable_count']; } /** - * Sets service_ddos_requests_detected + * Sets request_collapse_usable_count * - * @param int|null $service_ddos_requests_detected Number of requests classified as a DDoS attack against a customer origin or service. + * @param int|null $request_collapse_usable_count Number of requests that were collapsed and satisfied by a usable cache object. * * @return self */ - public function setServiceDdosRequestsDetected($service_ddos_requests_detected) + public function setRequestCollapseUsableCount($request_collapse_usable_count) { - $this->container['service_ddos_requests_detected'] = $service_ddos_requests_detected; + $this->container['request_collapse_usable_count'] = $request_collapse_usable_count; return $this; } /** - * Gets service_ddos_requests_mitigated + * Gets request_collapse_unusable_count * * @return int|null */ - public function getServiceDdosRequestsMitigated() + public function getRequestCollapseUnusableCount() { - return $this->container['service_ddos_requests_mitigated']; + return $this->container['request_collapse_unusable_count']; } /** - * Sets service_ddos_requests_mitigated + * Sets request_collapse_unusable_count * - * @param int|null $service_ddos_requests_mitigated Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. + * @param int|null $request_collapse_unusable_count Number of requests that were collapsed and unable to be satisfied by the resulting cache object. * * @return self */ - public function setServiceDdosRequestsMitigated($service_ddos_requests_mitigated) + public function setRequestCollapseUnusableCount($request_collapse_unusable_count) { - $this->container['service_ddos_requests_mitigated'] = $service_ddos_requests_mitigated; + $this->container['request_collapse_unusable_count'] = $request_collapse_unusable_count; return $this; } /** - * Gets service_ddos_requests_allowed + * Gets compute_cache_operations_count * * @return int|null */ - public function getServiceDdosRequestsAllowed() + public function getComputeCacheOperationsCount() { - return $this->container['service_ddos_requests_allowed']; + return $this->container['compute_cache_operations_count']; } /** - * Sets service_ddos_requests_allowed + * Sets compute_cache_operations_count * - * @param int|null $service_ddos_requests_allowed Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. + * @param int|null $compute_cache_operations_count Number of cache operations executed by the Compute platform. * * @return self */ - public function setServiceDdosRequestsAllowed($service_ddos_requests_allowed) + public function setComputeCacheOperationsCount($compute_cache_operations_count) { - $this->container['service_ddos_requests_allowed'] = $service_ddos_requests_allowed; + $this->container['compute_cache_operations_count'] = $compute_cache_operations_count; return $this; } diff --git a/lib/Model/Results.php b/lib/Model/Results.php index 8be520a8..88f08093 100644 --- a/lib/Model/Results.php +++ b/lib/Model/Results.php @@ -164,6 +164,7 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'status_1xx' => 'int', 'status_2xx' => 'int', 'status_3xx' => 'int', @@ -297,9 +298,23 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'all_status_5xx' => 'int', 'origin_offload' => 'float', 'request_denied_get_head_body' => 'int', - 'service_ddos_requests_detected' => 'int', - 'service_ddos_requests_mitigated' => 'int', - 'service_ddos_requests_allowed' => 'int', + 'ddos_protection_requests_detect_count' => 'int', + 'ddos_protection_requests_mitigate_count' => 'int', + 'ddos_protection_requests_allow_count' => 'int', + 'object_storage_class_a_operations_count' => 'int', + 'object_storage_class_b_operations_count' => 'int', + 'aia_requests' => 'int', + 'aia_status_1xx' => 'int', + 'aia_status_2xx' => 'int', + 'aia_status_3xx' => 'int', + 'aia_status_4xx' => 'int', + 'aia_status_5xx' => 'int', + 'aia_response_usage_tokens' => 'int', + 'aia_origin_usage_tokens' => 'int', + 'aia_estimated_time_saved_ms' => 'int', + 'request_collapse_usable_count' => 'int', + 'request_collapse_unusable_count' => 'int', + 'compute_cache_operations_count' => 'int', 'service_id' => 'string', 'start_time' => 'int' ]; @@ -312,254 +327,269 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'requests' => null, - 'hits' => null, + 'requests' => 'int64', + 'hits' => 'int64', 'hits_time' => null, - 'miss' => null, + 'miss' => 'int64', 'miss_time' => null, - 'pass' => null, + 'pass' => 'int64', 'pass_time' => null, - 'errors' => null, - 'restarts' => null, + 'errors' => 'int64', + 'restarts' => 'int64', 'hit_ratio' => null, - 'bandwidth' => null, - 'body_size' => null, - 'header_size' => null, - 'req_body_bytes' => null, - 'req_header_bytes' => null, - 'resp_body_bytes' => null, - 'resp_header_bytes' => null, - 'bereq_body_bytes' => null, - 'bereq_header_bytes' => null, - 'uncacheable' => null, - 'pipe' => null, - 'synth' => null, - 'tls' => null, - 'tls_v10' => null, - 'tls_v11' => null, - 'tls_v12' => null, - 'tls_v13' => null, - 'edge_requests' => null, - 'edge_resp_header_bytes' => null, - 'edge_resp_body_bytes' => null, - 'edge_hit_requests' => null, - 'edge_miss_requests' => null, - 'origin_fetches' => null, - 'origin_fetch_header_bytes' => null, - 'origin_fetch_body_bytes' => null, - 'origin_fetch_resp_header_bytes' => null, - 'origin_fetch_resp_body_bytes' => null, - 'origin_revalidations' => null, - 'origin_cache_fetches' => null, - 'shield' => null, - 'shield_resp_body_bytes' => null, - 'shield_resp_header_bytes' => null, - 'shield_fetches' => null, - 'shield_fetch_header_bytes' => null, - 'shield_fetch_body_bytes' => null, - 'shield_fetch_resp_header_bytes' => null, - 'shield_fetch_resp_body_bytes' => null, - 'shield_revalidations' => null, - 'shield_cache_fetches' => null, - 'ipv6' => null, - 'otfp' => null, - 'otfp_resp_body_bytes' => null, - 'otfp_resp_header_bytes' => null, - 'otfp_shield_resp_body_bytes' => null, - 'otfp_shield_resp_header_bytes' => null, - 'otfp_manifests' => null, + 'bandwidth' => 'int64', + 'body_size' => 'int64', + 'header_size' => 'int64', + 'req_body_bytes' => 'int64', + 'req_header_bytes' => 'int64', + 'resp_body_bytes' => 'int64', + 'resp_header_bytes' => 'int64', + 'bereq_body_bytes' => 'int64', + 'bereq_header_bytes' => 'int64', + 'uncacheable' => 'int64', + 'pipe' => 'int64', + 'synth' => 'int64', + 'tls' => 'int64', + 'tls_v10' => 'int64', + 'tls_v11' => 'int64', + 'tls_v12' => 'int64', + 'tls_v13' => 'int64', + 'edge_requests' => 'int64', + 'edge_resp_header_bytes' => 'int64', + 'edge_resp_body_bytes' => 'int64', + 'edge_hit_requests' => 'int64', + 'edge_miss_requests' => 'int64', + 'origin_fetches' => 'int64', + 'origin_fetch_header_bytes' => 'int64', + 'origin_fetch_body_bytes' => 'int64', + 'origin_fetch_resp_header_bytes' => 'int64', + 'origin_fetch_resp_body_bytes' => 'int64', + 'origin_revalidations' => 'int64', + 'origin_cache_fetches' => 'int64', + 'shield' => 'int64', + 'shield_resp_body_bytes' => 'int64', + 'shield_resp_header_bytes' => 'int64', + 'shield_fetches' => 'int64', + 'shield_fetch_header_bytes' => 'int64', + 'shield_fetch_body_bytes' => 'int64', + 'shield_fetch_resp_header_bytes' => 'int64', + 'shield_fetch_resp_body_bytes' => 'int64', + 'shield_revalidations' => 'int64', + 'shield_cache_fetches' => 'int64', + 'ipv6' => 'int64', + 'otfp' => 'int64', + 'otfp_resp_body_bytes' => 'int64', + 'otfp_resp_header_bytes' => 'int64', + 'otfp_shield_resp_body_bytes' => 'int64', + 'otfp_shield_resp_header_bytes' => 'int64', + 'otfp_manifests' => 'int64', 'otfp_deliver_time' => null, 'otfp_shield_time' => null, - 'video' => null, - 'pci' => null, - 'log' => null, - 'log_bytes' => null, - 'http2' => null, - 'http3' => null, - 'waf_logged' => null, - 'waf_blocked' => null, - 'waf_passed' => null, - 'attack_req_body_bytes' => null, - 'attack_req_header_bytes' => null, - 'attack_logged_req_body_bytes' => null, - 'attack_logged_req_header_bytes' => null, - 'attack_blocked_req_body_bytes' => null, - 'attack_blocked_req_header_bytes' => null, - 'attack_passed_req_body_bytes' => null, - 'attack_passed_req_header_bytes' => null, - 'attack_resp_synth_bytes' => null, - 'imgopto' => null, - 'imgopto_resp_body_bytes' => null, - 'imgopto_resp_header_bytes' => null, - 'imgopto_shield' => null, - 'imgopto_shield_resp_body_bytes' => null, - 'imgopto_shield_resp_header_bytes' => null, - 'imgopto_transforms' => null, - 'imgvideo' => null, - 'imgvideo_frames' => null, - 'imgvideo_resp_header_bytes' => null, - 'imgvideo_resp_body_bytes' => null, - 'imgvideo_shield_resp_header_bytes' => null, - 'imgvideo_shield_resp_body_bytes' => null, - 'imgvideo_shield' => null, - 'imgvideo_shield_frames' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_406' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'object_size_1k' => null, - 'object_size_10k' => null, - 'object_size_100k' => null, - 'object_size_1m' => null, - 'object_size_10m' => null, - 'object_size_100m' => null, - 'object_size_1g' => null, + 'video' => 'int64', + 'pci' => 'int64', + 'log' => 'int64', + 'log_bytes' => 'int64', + 'http2' => 'int64', + 'http3' => 'int64', + 'waf_logged' => 'int64', + 'waf_blocked' => 'int64', + 'waf_passed' => 'int64', + 'attack_req_body_bytes' => 'int64', + 'attack_req_header_bytes' => 'int64', + 'attack_logged_req_body_bytes' => 'int64', + 'attack_logged_req_header_bytes' => 'int64', + 'attack_blocked_req_body_bytes' => 'int64', + 'attack_blocked_req_header_bytes' => 'int64', + 'attack_passed_req_body_bytes' => 'int64', + 'attack_passed_req_header_bytes' => 'int64', + 'attack_resp_synth_bytes' => 'int64', + 'imgopto' => 'int64', + 'imgopto_resp_body_bytes' => 'int64', + 'imgopto_resp_header_bytes' => 'int64', + 'imgopto_shield' => 'int64', + 'imgopto_shield_resp_body_bytes' => 'int64', + 'imgopto_shield_resp_header_bytes' => 'int64', + 'imgopto_transforms' => 'int64', + 'imgvideo' => 'int64', + 'imgvideo_frames' => 'int64', + 'imgvideo_resp_header_bytes' => 'int64', + 'imgvideo_resp_body_bytes' => 'int64', + 'imgvideo_shield_resp_header_bytes' => 'int64', + 'imgvideo_shield_resp_body_bytes' => 'int64', + 'imgvideo_shield' => 'int64', + 'imgvideo_shield_frames' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_406' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'object_size_1k' => 'int64', + 'object_size_10k' => 'int64', + 'object_size_100k' => 'int64', + 'object_size_1m' => 'int64', + 'object_size_10m' => 'int64', + 'object_size_100m' => 'int64', + 'object_size_1g' => 'int64', 'recv_sub_time' => null, - 'recv_sub_count' => null, + 'recv_sub_count' => 'int64', 'hash_sub_time' => null, - 'hash_sub_count' => null, + 'hash_sub_count' => 'int64', 'miss_sub_time' => null, - 'miss_sub_count' => null, + 'miss_sub_count' => 'int64', 'fetch_sub_time' => null, - 'fetch_sub_count' => null, + 'fetch_sub_count' => 'int64', 'pass_sub_time' => null, - 'pass_sub_count' => null, + 'pass_sub_count' => 'int64', 'pipe_sub_time' => null, - 'pipe_sub_count' => null, + 'pipe_sub_count' => 'int64', 'deliver_sub_time' => null, - 'deliver_sub_count' => null, + 'deliver_sub_count' => 'int64', 'error_sub_time' => null, - 'error_sub_count' => null, + 'error_sub_count' => 'int64', 'hit_sub_time' => null, - 'hit_sub_count' => null, + 'hit_sub_count' => 'int64', 'prehash_sub_time' => null, - 'prehash_sub_count' => null, + 'prehash_sub_count' => 'int64', 'predeliver_sub_time' => null, - 'predeliver_sub_count' => null, - 'tls_handshake_sent_bytes' => null, - 'hit_resp_body_bytes' => null, - 'miss_resp_body_bytes' => null, - 'pass_resp_body_bytes' => null, - 'segblock_origin_fetches' => null, - 'segblock_shield_fetches' => null, - 'compute_requests' => null, + 'predeliver_sub_count' => 'int64', + 'tls_handshake_sent_bytes' => 'int64', + 'hit_resp_body_bytes' => 'int64', + 'miss_resp_body_bytes' => 'int64', + 'pass_resp_body_bytes' => 'int64', + 'segblock_origin_fetches' => 'int64', + 'segblock_shield_fetches' => 'int64', + 'compute_requests' => 'int64', 'compute_request_time_ms' => null, 'compute_request_time_billed_ms' => null, - 'compute_ram_used' => null, + 'compute_ram_used' => 'int64', 'compute_execution_time_ms' => null, - 'compute_req_header_bytes' => null, - 'compute_req_body_bytes' => null, - 'compute_resp_header_bytes' => null, - 'compute_resp_body_bytes' => null, - 'compute_resp_status_1xx' => null, - 'compute_resp_status_2xx' => null, - 'compute_resp_status_3xx' => null, - 'compute_resp_status_4xx' => null, - 'compute_resp_status_5xx' => null, - 'compute_bereq_header_bytes' => null, - 'compute_bereq_body_bytes' => null, - 'compute_beresp_header_bytes' => null, - 'compute_beresp_body_bytes' => null, - 'compute_bereqs' => null, - 'compute_bereq_errors' => null, - 'compute_resource_limit_exceeded' => null, - 'compute_heap_limit_exceeded' => null, - 'compute_stack_limit_exceeded' => null, - 'compute_globals_limit_exceeded' => null, - 'compute_guest_errors' => null, - 'compute_runtime_errors' => null, - 'edge_hit_resp_body_bytes' => null, - 'edge_hit_resp_header_bytes' => null, - 'edge_miss_resp_body_bytes' => null, - 'edge_miss_resp_header_bytes' => null, - 'origin_cache_fetch_resp_body_bytes' => null, - 'origin_cache_fetch_resp_header_bytes' => null, - 'shield_hit_requests' => null, - 'shield_miss_requests' => null, - 'shield_hit_resp_header_bytes' => null, - 'shield_hit_resp_body_bytes' => null, - 'shield_miss_resp_header_bytes' => null, - 'shield_miss_resp_body_bytes' => null, - 'websocket_req_header_bytes' => null, - 'websocket_req_body_bytes' => null, - 'websocket_resp_header_bytes' => null, - 'websocket_resp_body_bytes' => null, - 'websocket_bereq_header_bytes' => null, - 'websocket_bereq_body_bytes' => null, - 'websocket_beresp_header_bytes' => null, - 'websocket_beresp_body_bytes' => null, - 'websocket_conn_time_ms' => null, - 'fanout_recv_publishes' => null, - 'fanout_send_publishes' => null, - 'kv_store_class_a_operations' => null, - 'kv_store_class_b_operations' => null, - 'object_store_class_a_operations' => null, - 'object_store_class_b_operations' => null, - 'fanout_req_header_bytes' => null, - 'fanout_req_body_bytes' => null, - 'fanout_resp_header_bytes' => null, - 'fanout_resp_body_bytes' => null, - 'fanout_bereq_header_bytes' => null, - 'fanout_bereq_body_bytes' => null, - 'fanout_beresp_header_bytes' => null, - 'fanout_beresp_body_bytes' => null, - 'fanout_conn_time_ms' => null, - 'ddos_action_limit_streams_connections' => null, - 'ddos_action_limit_streams_requests' => null, - 'ddos_action_tarpit_accept' => null, - 'ddos_action_tarpit' => null, - 'ddos_action_close' => null, - 'ddos_action_blackhole' => null, - 'bot_challenge_starts' => null, - 'bot_challenge_complete_tokens_passed' => null, - 'bot_challenge_complete_tokens_failed' => null, - 'bot_challenge_complete_tokens_checked' => null, - 'bot_challenge_complete_tokens_disabled' => null, - 'bot_challenge_complete_tokens_issued' => null, - 'bot_challenges_issued' => null, - 'bot_challenges_succeeded' => null, - 'bot_challenges_failed' => null, - 'ddos_action_downgrade' => null, - 'ddos_action_downgraded_connections' => null, - 'all_hit_requests' => null, - 'all_miss_requests' => null, - 'all_pass_requests' => null, - 'all_error_requests' => null, - 'all_synth_requests' => null, - 'all_edge_hit_requests' => null, - 'all_edge_miss_requests' => null, - 'all_status_1xx' => null, - 'all_status_2xx' => null, - 'all_status_3xx' => null, - 'all_status_4xx' => null, - 'all_status_5xx' => null, + 'compute_req_header_bytes' => 'int64', + 'compute_req_body_bytes' => 'int64', + 'compute_resp_header_bytes' => 'int64', + 'compute_resp_body_bytes' => 'int64', + 'compute_resp_status_1xx' => 'int64', + 'compute_resp_status_2xx' => 'int64', + 'compute_resp_status_3xx' => 'int64', + 'compute_resp_status_4xx' => 'int64', + 'compute_resp_status_5xx' => 'int64', + 'compute_bereq_header_bytes' => 'int64', + 'compute_bereq_body_bytes' => 'int64', + 'compute_beresp_header_bytes' => 'int64', + 'compute_beresp_body_bytes' => 'int64', + 'compute_bereqs' => 'int64', + 'compute_bereq_errors' => 'int64', + 'compute_resource_limit_exceeded' => 'int64', + 'compute_heap_limit_exceeded' => 'int64', + 'compute_stack_limit_exceeded' => 'int64', + 'compute_globals_limit_exceeded' => 'int64', + 'compute_guest_errors' => 'int64', + 'compute_runtime_errors' => 'int64', + 'edge_hit_resp_body_bytes' => 'int64', + 'edge_hit_resp_header_bytes' => 'int64', + 'edge_miss_resp_body_bytes' => 'int64', + 'edge_miss_resp_header_bytes' => 'int64', + 'origin_cache_fetch_resp_body_bytes' => 'int64', + 'origin_cache_fetch_resp_header_bytes' => 'int64', + 'shield_hit_requests' => 'int64', + 'shield_miss_requests' => 'int64', + 'shield_hit_resp_header_bytes' => 'int64', + 'shield_hit_resp_body_bytes' => 'int64', + 'shield_miss_resp_header_bytes' => 'int64', + 'shield_miss_resp_body_bytes' => 'int64', + 'websocket_req_header_bytes' => 'int64', + 'websocket_req_body_bytes' => 'int64', + 'websocket_resp_header_bytes' => 'int64', + 'websocket_resp_body_bytes' => 'int64', + 'websocket_bereq_header_bytes' => 'int64', + 'websocket_bereq_body_bytes' => 'int64', + 'websocket_beresp_header_bytes' => 'int64', + 'websocket_beresp_body_bytes' => 'int64', + 'websocket_conn_time_ms' => 'int64', + 'fanout_recv_publishes' => 'int64', + 'fanout_send_publishes' => 'int64', + 'kv_store_class_a_operations' => 'int64', + 'kv_store_class_b_operations' => 'int64', + 'object_store_class_a_operations' => 'int64', + 'object_store_class_b_operations' => 'int64', + 'fanout_req_header_bytes' => 'int64', + 'fanout_req_body_bytes' => 'int64', + 'fanout_resp_header_bytes' => 'int64', + 'fanout_resp_body_bytes' => 'int64', + 'fanout_bereq_header_bytes' => 'int64', + 'fanout_bereq_body_bytes' => 'int64', + 'fanout_beresp_header_bytes' => 'int64', + 'fanout_beresp_body_bytes' => 'int64', + 'fanout_conn_time_ms' => 'int64', + 'ddos_action_limit_streams_connections' => 'int64', + 'ddos_action_limit_streams_requests' => 'int64', + 'ddos_action_tarpit_accept' => 'int64', + 'ddos_action_tarpit' => 'int64', + 'ddos_action_close' => 'int64', + 'ddos_action_blackhole' => 'int64', + 'bot_challenge_starts' => 'int64', + 'bot_challenge_complete_tokens_passed' => 'int64', + 'bot_challenge_complete_tokens_failed' => 'int64', + 'bot_challenge_complete_tokens_checked' => 'int64', + 'bot_challenge_complete_tokens_disabled' => 'int64', + 'bot_challenge_complete_tokens_issued' => 'int64', + 'bot_challenges_issued' => 'int64', + 'bot_challenges_succeeded' => 'int64', + 'bot_challenges_failed' => 'int64', + 'ddos_action_downgrade' => 'int64', + 'ddos_action_downgraded_connections' => 'int64', + 'all_hit_requests' => 'int64', + 'all_miss_requests' => 'int64', + 'all_pass_requests' => 'int64', + 'all_error_requests' => 'int64', + 'all_synth_requests' => 'int64', + 'all_edge_hit_requests' => 'int64', + 'all_edge_miss_requests' => 'int64', + 'all_status_1xx' => 'int64', + 'all_status_2xx' => 'int64', + 'all_status_3xx' => 'int64', + 'all_status_4xx' => 'int64', + 'all_status_5xx' => 'int64', 'origin_offload' => null, - 'request_denied_get_head_body' => null, - 'service_ddos_requests_detected' => null, - 'service_ddos_requests_mitigated' => null, - 'service_ddos_requests_allowed' => null, + 'request_denied_get_head_body' => 'int64', + 'ddos_protection_requests_detect_count' => 'int64', + 'ddos_protection_requests_mitigate_count' => 'int64', + 'ddos_protection_requests_allow_count' => 'int64', + 'object_storage_class_a_operations_count' => 'int64', + 'object_storage_class_b_operations_count' => 'int64', + 'aia_requests' => 'int64', + 'aia_status_1xx' => 'int64', + 'aia_status_2xx' => 'int64', + 'aia_status_3xx' => 'int64', + 'aia_status_4xx' => 'int64', + 'aia_status_5xx' => 'int64', + 'aia_response_usage_tokens' => 'int64', + 'aia_origin_usage_tokens' => 'int64', + 'aia_estimated_time_saved_ms' => 'int64', + 'request_collapse_usable_count' => 'int64', + 'request_collapse_unusable_count' => 'int64', + 'compute_cache_operations_count' => 'int64', 'service_id' => null, - 'start_time' => null + 'start_time' => 'int64' ]; /** @@ -699,6 +729,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'status_1xx' => 'status_1xx', 'status_2xx' => 'status_2xx', 'status_3xx' => 'status_3xx', @@ -832,9 +863,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'all_status_5xx', 'origin_offload' => 'origin_offload', 'request_denied_get_head_body' => 'request_denied_get_head_body', - 'service_ddos_requests_detected' => 'service_ddos_requests_detected', - 'service_ddos_requests_mitigated' => 'service_ddos_requests_mitigated', - 'service_ddos_requests_allowed' => 'service_ddos_requests_allowed', + 'ddos_protection_requests_detect_count' => 'ddos_protection_requests_detect_count', + 'ddos_protection_requests_mitigate_count' => 'ddos_protection_requests_mitigate_count', + 'ddos_protection_requests_allow_count' => 'ddos_protection_requests_allow_count', + 'object_storage_class_a_operations_count' => 'object_storage_class_a_operations_count', + 'object_storage_class_b_operations_count' => 'object_storage_class_b_operations_count', + 'aia_requests' => 'aia_requests', + 'aia_status_1xx' => 'aia_status_1xx', + 'aia_status_2xx' => 'aia_status_2xx', + 'aia_status_3xx' => 'aia_status_3xx', + 'aia_status_4xx' => 'aia_status_4xx', + 'aia_status_5xx' => 'aia_status_5xx', + 'aia_response_usage_tokens' => 'aia_response_usage_tokens', + 'aia_origin_usage_tokens' => 'aia_origin_usage_tokens', + 'aia_estimated_time_saved_ms' => 'aia_estimated_time_saved_ms', + 'request_collapse_usable_count' => 'request_collapse_usable_count', + 'request_collapse_unusable_count' => 'request_collapse_unusable_count', + 'compute_cache_operations_count' => 'compute_cache_operations_count', 'service_id' => 'service_id', 'start_time' => 'start_time' ]; @@ -955,6 +1000,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'status_1xx' => 'setStatus1xx', 'status_2xx' => 'setStatus2xx', 'status_3xx' => 'setStatus3xx', @@ -1088,9 +1134,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'setAllStatus5xx', 'origin_offload' => 'setOriginOffload', 'request_denied_get_head_body' => 'setRequestDeniedGetHeadBody', - 'service_ddos_requests_detected' => 'setServiceDdosRequestsDetected', - 'service_ddos_requests_mitigated' => 'setServiceDdosRequestsMitigated', - 'service_ddos_requests_allowed' => 'setServiceDdosRequestsAllowed', + 'ddos_protection_requests_detect_count' => 'setDdosProtectionRequestsDetectCount', + 'ddos_protection_requests_mitigate_count' => 'setDdosProtectionRequestsMitigateCount', + 'ddos_protection_requests_allow_count' => 'setDdosProtectionRequestsAllowCount', + 'object_storage_class_a_operations_count' => 'setObjectStorageClassAOperationsCount', + 'object_storage_class_b_operations_count' => 'setObjectStorageClassBOperationsCount', + 'aia_requests' => 'setAiaRequests', + 'aia_status_1xx' => 'setAiaStatus1xx', + 'aia_status_2xx' => 'setAiaStatus2xx', + 'aia_status_3xx' => 'setAiaStatus3xx', + 'aia_status_4xx' => 'setAiaStatus4xx', + 'aia_status_5xx' => 'setAiaStatus5xx', + 'aia_response_usage_tokens' => 'setAiaResponseUsageTokens', + 'aia_origin_usage_tokens' => 'setAiaOriginUsageTokens', + 'aia_estimated_time_saved_ms' => 'setAiaEstimatedTimeSavedMs', + 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', + 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', + 'compute_cache_operations_count' => 'setComputeCacheOperationsCount', 'service_id' => 'setServiceId', 'start_time' => 'setStartTime' ]; @@ -1211,6 +1271,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'status_1xx' => 'getStatus1xx', 'status_2xx' => 'getStatus2xx', 'status_3xx' => 'getStatus3xx', @@ -1344,9 +1405,23 @@ public static function fastlyFormats() 'all_status_5xx' => 'getAllStatus5xx', 'origin_offload' => 'getOriginOffload', 'request_denied_get_head_body' => 'getRequestDeniedGetHeadBody', - 'service_ddos_requests_detected' => 'getServiceDdosRequestsDetected', - 'service_ddos_requests_mitigated' => 'getServiceDdosRequestsMitigated', - 'service_ddos_requests_allowed' => 'getServiceDdosRequestsAllowed', + 'ddos_protection_requests_detect_count' => 'getDdosProtectionRequestsDetectCount', + 'ddos_protection_requests_mitigate_count' => 'getDdosProtectionRequestsMitigateCount', + 'ddos_protection_requests_allow_count' => 'getDdosProtectionRequestsAllowCount', + 'object_storage_class_a_operations_count' => 'getObjectStorageClassAOperationsCount', + 'object_storage_class_b_operations_count' => 'getObjectStorageClassBOperationsCount', + 'aia_requests' => 'getAiaRequests', + 'aia_status_1xx' => 'getAiaStatus1xx', + 'aia_status_2xx' => 'getAiaStatus2xx', + 'aia_status_3xx' => 'getAiaStatus3xx', + 'aia_status_4xx' => 'getAiaStatus4xx', + 'aia_status_5xx' => 'getAiaStatus5xx', + 'aia_response_usage_tokens' => 'getAiaResponseUsageTokens', + 'aia_origin_usage_tokens' => 'getAiaOriginUsageTokens', + 'aia_estimated_time_saved_ms' => 'getAiaEstimatedTimeSavedMs', + 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', + 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', + 'compute_cache_operations_count' => 'getComputeCacheOperationsCount', 'service_id' => 'getServiceId', 'start_time' => 'getStartTime' ]; @@ -1518,6 +1593,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['status_1xx'] = $data['status_1xx'] ?? null; $this->container['status_2xx'] = $data['status_2xx'] ?? null; $this->container['status_3xx'] = $data['status_3xx'] ?? null; @@ -1651,9 +1727,23 @@ public function __construct(array $data = null) $this->container['all_status_5xx'] = $data['all_status_5xx'] ?? null; $this->container['origin_offload'] = $data['origin_offload'] ?? null; $this->container['request_denied_get_head_body'] = $data['request_denied_get_head_body'] ?? null; - $this->container['service_ddos_requests_detected'] = $data['service_ddos_requests_detected'] ?? null; - $this->container['service_ddos_requests_mitigated'] = $data['service_ddos_requests_mitigated'] ?? null; - $this->container['service_ddos_requests_allowed'] = $data['service_ddos_requests_allowed'] ?? null; + $this->container['ddos_protection_requests_detect_count'] = $data['ddos_protection_requests_detect_count'] ?? null; + $this->container['ddos_protection_requests_mitigate_count'] = $data['ddos_protection_requests_mitigate_count'] ?? null; + $this->container['ddos_protection_requests_allow_count'] = $data['ddos_protection_requests_allow_count'] ?? null; + $this->container['object_storage_class_a_operations_count'] = $data['object_storage_class_a_operations_count'] ?? null; + $this->container['object_storage_class_b_operations_count'] = $data['object_storage_class_b_operations_count'] ?? null; + $this->container['aia_requests'] = $data['aia_requests'] ?? null; + $this->container['aia_status_1xx'] = $data['aia_status_1xx'] ?? null; + $this->container['aia_status_2xx'] = $data['aia_status_2xx'] ?? null; + $this->container['aia_status_3xx'] = $data['aia_status_3xx'] ?? null; + $this->container['aia_status_4xx'] = $data['aia_status_4xx'] ?? null; + $this->container['aia_status_5xx'] = $data['aia_status_5xx'] ?? null; + $this->container['aia_response_usage_tokens'] = $data['aia_response_usage_tokens'] ?? null; + $this->container['aia_origin_usage_tokens'] = $data['aia_origin_usage_tokens'] ?? null; + $this->container['aia_estimated_time_saved_ms'] = $data['aia_estimated_time_saved_ms'] ?? null; + $this->container['request_collapse_usable_count'] = $data['request_collapse_usable_count'] ?? null; + $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; + $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['start_time'] = $data['start_time'] ?? null; } @@ -4322,6 +4412,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses sent with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets status_1xx * @@ -7519,73 +7633,409 @@ public function setRequestDeniedGetHeadBody($request_denied_get_head_body) } /** - * Gets service_ddos_requests_detected + * Gets ddos_protection_requests_detect_count + * + * @return int|null + */ + public function getDdosProtectionRequestsDetectCount() + { + return $this->container['ddos_protection_requests_detect_count']; + } + + /** + * Sets ddos_protection_requests_detect_count + * + * @param int|null $ddos_protection_requests_detect_count Number of requests classified as a DDoS attack against a customer origin or service. + * + * @return self + */ + public function setDdosProtectionRequestsDetectCount($ddos_protection_requests_detect_count) + { + $this->container['ddos_protection_requests_detect_count'] = $ddos_protection_requests_detect_count; + + return $this; + } + + /** + * Gets ddos_protection_requests_mitigate_count + * + * @return int|null + */ + public function getDdosProtectionRequestsMitigateCount() + { + return $this->container['ddos_protection_requests_mitigate_count']; + } + + /** + * Sets ddos_protection_requests_mitigate_count + * + * @param int|null $ddos_protection_requests_mitigate_count Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. + * + * @return self + */ + public function setDdosProtectionRequestsMitigateCount($ddos_protection_requests_mitigate_count) + { + $this->container['ddos_protection_requests_mitigate_count'] = $ddos_protection_requests_mitigate_count; + + return $this; + } + + /** + * Gets ddos_protection_requests_allow_count + * + * @return int|null + */ + public function getDdosProtectionRequestsAllowCount() + { + return $this->container['ddos_protection_requests_allow_count']; + } + + /** + * Sets ddos_protection_requests_allow_count + * + * @param int|null $ddos_protection_requests_allow_count Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. + * + * @return self + */ + public function setDdosProtectionRequestsAllowCount($ddos_protection_requests_allow_count) + { + $this->container['ddos_protection_requests_allow_count'] = $ddos_protection_requests_allow_count; + + return $this; + } + + /** + * Gets object_storage_class_a_operations_count + * + * @return int|null + */ + public function getObjectStorageClassAOperationsCount() + { + return $this->container['object_storage_class_a_operations_count']; + } + + /** + * Sets object_storage_class_a_operations_count + * + * @param int|null $object_storage_class_a_operations_count A count of the number of Class A Object Storage operations. + * + * @return self + */ + public function setObjectStorageClassAOperationsCount($object_storage_class_a_operations_count) + { + $this->container['object_storage_class_a_operations_count'] = $object_storage_class_a_operations_count; + + return $this; + } + + /** + * Gets object_storage_class_b_operations_count + * + * @return int|null + */ + public function getObjectStorageClassBOperationsCount() + { + return $this->container['object_storage_class_b_operations_count']; + } + + /** + * Sets object_storage_class_b_operations_count + * + * @param int|null $object_storage_class_b_operations_count A count of the number of Class B Object Storage operations. + * + * @return self + */ + public function setObjectStorageClassBOperationsCount($object_storage_class_b_operations_count) + { + $this->container['object_storage_class_b_operations_count'] = $object_storage_class_b_operations_count; + + return $this; + } + + /** + * Gets aia_requests + * + * @return int|null + */ + public function getAiaRequests() + { + return $this->container['aia_requests']; + } + + /** + * Sets aia_requests + * + * @param int|null $aia_requests Number of requests received by AI Accelerator. + * + * @return self + */ + public function setAiaRequests($aia_requests) + { + $this->container['aia_requests'] = $aia_requests; + + return $this; + } + + /** + * Gets aia_status_1xx + * + * @return int|null + */ + public function getAiaStatus1xx() + { + return $this->container['aia_status_1xx']; + } + + /** + * Sets aia_status_1xx + * + * @param int|null $aia_status_1xx Number of \"Informational\" category status codes received from AI provider. + * + * @return self + */ + public function setAiaStatus1xx($aia_status_1xx) + { + $this->container['aia_status_1xx'] = $aia_status_1xx; + + return $this; + } + + /** + * Gets aia_status_2xx + * + * @return int|null + */ + public function getAiaStatus2xx() + { + return $this->container['aia_status_2xx']; + } + + /** + * Sets aia_status_2xx + * + * @param int|null $aia_status_2xx Number of \"Success\" status codes received from AI provider. + * + * @return self + */ + public function setAiaStatus2xx($aia_status_2xx) + { + $this->container['aia_status_2xx'] = $aia_status_2xx; + + return $this; + } + + /** + * Gets aia_status_3xx + * + * @return int|null + */ + public function getAiaStatus3xx() + { + return $this->container['aia_status_3xx']; + } + + /** + * Sets aia_status_3xx + * + * @param int|null $aia_status_3xx Number of \"Redirection\" received from AI provider. + * + * @return self + */ + public function setAiaStatus3xx($aia_status_3xx) + { + $this->container['aia_status_3xx'] = $aia_status_3xx; + + return $this; + } + + /** + * Gets aia_status_4xx + * + * @return int|null + */ + public function getAiaStatus4xx() + { + return $this->container['aia_status_4xx']; + } + + /** + * Sets aia_status_4xx + * + * @param int|null $aia_status_4xx Number of \"Client Error\" received from AI provider. + * + * @return self + */ + public function setAiaStatus4xx($aia_status_4xx) + { + $this->container['aia_status_4xx'] = $aia_status_4xx; + + return $this; + } + + /** + * Gets aia_status_5xx + * + * @return int|null + */ + public function getAiaStatus5xx() + { + return $this->container['aia_status_5xx']; + } + + /** + * Sets aia_status_5xx + * + * @param int|null $aia_status_5xx Number of \"Server Error\" received from AI provider. + * + * @return self + */ + public function setAiaStatus5xx($aia_status_5xx) + { + $this->container['aia_status_5xx'] = $aia_status_5xx; + + return $this; + } + + /** + * Gets aia_response_usage_tokens + * + * @return int|null + */ + public function getAiaResponseUsageTokens() + { + return $this->container['aia_response_usage_tokens']; + } + + /** + * Sets aia_response_usage_tokens + * + * @param int|null $aia_response_usage_tokens The usage tokens associated with the response returned from the AI Accelerator cache. + * + * @return self + */ + public function setAiaResponseUsageTokens($aia_response_usage_tokens) + { + $this->container['aia_response_usage_tokens'] = $aia_response_usage_tokens; + + return $this; + } + + /** + * Gets aia_origin_usage_tokens + * + * @return int|null + */ + public function getAiaOriginUsageTokens() + { + return $this->container['aia_origin_usage_tokens']; + } + + /** + * Sets aia_origin_usage_tokens + * + * @param int|null $aia_origin_usage_tokens The number of usage tokens reported by the request to the origin from AI Accelerator. + * + * @return self + */ + public function setAiaOriginUsageTokens($aia_origin_usage_tokens) + { + $this->container['aia_origin_usage_tokens'] = $aia_origin_usage_tokens; + + return $this; + } + + /** + * Gets aia_estimated_time_saved_ms + * + * @return int|null + */ + public function getAiaEstimatedTimeSavedMs() + { + return $this->container['aia_estimated_time_saved_ms']; + } + + /** + * Sets aia_estimated_time_saved_ms + * + * @param int|null $aia_estimated_time_saved_ms The estimated amount of time saved by responses served from the AI Accelerator semantic cache. + * + * @return self + */ + public function setAiaEstimatedTimeSavedMs($aia_estimated_time_saved_ms) + { + $this->container['aia_estimated_time_saved_ms'] = $aia_estimated_time_saved_ms; + + return $this; + } + + /** + * Gets request_collapse_usable_count * * @return int|null */ - public function getServiceDdosRequestsDetected() + public function getRequestCollapseUsableCount() { - return $this->container['service_ddos_requests_detected']; + return $this->container['request_collapse_usable_count']; } /** - * Sets service_ddos_requests_detected + * Sets request_collapse_usable_count * - * @param int|null $service_ddos_requests_detected Number of requests classified as a DDoS attack against a customer origin or service. + * @param int|null $request_collapse_usable_count Number of requests that were collapsed and satisfied by a usable cache object. * * @return self */ - public function setServiceDdosRequestsDetected($service_ddos_requests_detected) + public function setRequestCollapseUsableCount($request_collapse_usable_count) { - $this->container['service_ddos_requests_detected'] = $service_ddos_requests_detected; + $this->container['request_collapse_usable_count'] = $request_collapse_usable_count; return $this; } /** - * Gets service_ddos_requests_mitigated + * Gets request_collapse_unusable_count * * @return int|null */ - public function getServiceDdosRequestsMitigated() + public function getRequestCollapseUnusableCount() { - return $this->container['service_ddos_requests_mitigated']; + return $this->container['request_collapse_unusable_count']; } /** - * Sets service_ddos_requests_mitigated + * Sets request_collapse_unusable_count * - * @param int|null $service_ddos_requests_mitigated Number of requests classified as a DDoS attack against a customer origin or service that were mitigated by the Fastly platform. + * @param int|null $request_collapse_unusable_count Number of requests that were collapsed and unable to be satisfied by the resulting cache object. * * @return self */ - public function setServiceDdosRequestsMitigated($service_ddos_requests_mitigated) + public function setRequestCollapseUnusableCount($request_collapse_unusable_count) { - $this->container['service_ddos_requests_mitigated'] = $service_ddos_requests_mitigated; + $this->container['request_collapse_unusable_count'] = $request_collapse_unusable_count; return $this; } /** - * Gets service_ddos_requests_allowed + * Gets compute_cache_operations_count * * @return int|null */ - public function getServiceDdosRequestsAllowed() + public function getComputeCacheOperationsCount() { - return $this->container['service_ddos_requests_allowed']; + return $this->container['compute_cache_operations_count']; } /** - * Sets service_ddos_requests_allowed + * Sets compute_cache_operations_count * - * @param int|null $service_ddos_requests_allowed Number of requests analyzed for DDoS attacks against a customer origin or service, but with no DDoS detected. + * @param int|null $compute_cache_operations_count Number of cache operations executed by the Compute platform. * * @return self */ - public function setServiceDdosRequestsAllowed($service_ddos_requests_allowed) + public function setComputeCacheOperationsCount($compute_cache_operations_count) { - $this->container['service_ddos_requests_allowed'] = $service_ddos_requests_allowed; + $this->container['compute_cache_operations_count'] = $compute_cache_operations_count; return $this; } diff --git a/lib/Model/Values.php b/lib/Model/Values.php index 2788a44d..196f8f71 100644 --- a/lib/Model/Values.php +++ b/lib/Model/Values.php @@ -80,6 +80,7 @@ class Values implements ModelInterface, ArrayAccess, \JsonSerializable 'status_503' => 'int', 'status_504' => 'int', 'status_505' => 'int', + 'status_530' => 'int', 'requests' => 'int', 'resp_header_bytes' => 'int', 'resp_body_bytes' => 'int', @@ -111,6 +112,7 @@ class Values implements ModelInterface, ArrayAccess, \JsonSerializable 'origin_status_503' => 'int', 'origin_status_504' => 'int', 'origin_status_505' => 'int', + 'origin_status_530' => 'int', 'origin_status_1xx' => 'int', 'origin_status_2xx' => 'int', 'origin_status_3xx' => 'int', @@ -126,68 +128,70 @@ class Values implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'edge_requests' => null, - 'edge_resp_header_bytes' => null, - 'edge_resp_body_bytes' => null, - 'status_1xx' => null, - 'status_2xx' => null, - 'status_3xx' => null, - 'status_4xx' => null, - 'status_5xx' => null, - 'status_200' => null, - 'status_204' => null, - 'status_206' => null, - 'status_301' => null, - 'status_302' => null, - 'status_304' => null, - 'status_400' => null, - 'status_401' => null, - 'status_403' => null, - 'status_404' => null, - 'status_416' => null, - 'status_429' => null, - 'status_500' => null, - 'status_501' => null, - 'status_502' => null, - 'status_503' => null, - 'status_504' => null, - 'status_505' => null, - 'requests' => null, - 'resp_header_bytes' => null, - 'resp_body_bytes' => null, - 'bereq_header_bytes' => null, - 'bereq_body_bytes' => null, - 'edge_hit_requests' => null, - 'edge_miss_requests' => null, - 'origin_fetches' => null, - 'origin_fetch_resp_header_bytes' => null, - 'origin_fetch_resp_body_bytes' => null, - 'bandwidth' => null, + 'edge_requests' => 'int64', + 'edge_resp_header_bytes' => 'int64', + 'edge_resp_body_bytes' => 'int64', + 'status_1xx' => 'int64', + 'status_2xx' => 'int64', + 'status_3xx' => 'int64', + 'status_4xx' => 'int64', + 'status_5xx' => 'int64', + 'status_200' => 'int64', + 'status_204' => 'int64', + 'status_206' => 'int64', + 'status_301' => 'int64', + 'status_302' => 'int64', + 'status_304' => 'int64', + 'status_400' => 'int64', + 'status_401' => 'int64', + 'status_403' => 'int64', + 'status_404' => 'int64', + 'status_416' => 'int64', + 'status_429' => 'int64', + 'status_500' => 'int64', + 'status_501' => 'int64', + 'status_502' => 'int64', + 'status_503' => 'int64', + 'status_504' => 'int64', + 'status_505' => 'int64', + 'status_530' => 'int64', + 'requests' => 'int64', + 'resp_header_bytes' => 'int64', + 'resp_body_bytes' => 'int64', + 'bereq_header_bytes' => 'int64', + 'bereq_body_bytes' => 'int64', + 'edge_hit_requests' => 'int64', + 'edge_miss_requests' => 'int64', + 'origin_fetches' => 'int64', + 'origin_fetch_resp_header_bytes' => 'int64', + 'origin_fetch_resp_body_bytes' => 'int64', + 'bandwidth' => 'int64', 'edge_hit_ratio' => null, 'origin_offload' => null, - 'origin_status_200' => null, - 'origin_status_204' => null, - 'origin_status_206' => null, - 'origin_status_301' => null, - 'origin_status_302' => null, - 'origin_status_304' => null, - 'origin_status_400' => null, - 'origin_status_401' => null, - 'origin_status_403' => null, - 'origin_status_404' => null, - 'origin_status_416' => null, - 'origin_status_429' => null, - 'origin_status_500' => null, - 'origin_status_501' => null, - 'origin_status_502' => null, - 'origin_status_503' => null, - 'origin_status_504' => null, - 'origin_status_505' => null, - 'origin_status_1xx' => null, - 'origin_status_2xx' => null, - 'origin_status_3xx' => null, - 'origin_status_4xx' => null, - 'origin_status_5xx' => null + 'origin_status_200' => 'int64', + 'origin_status_204' => 'int64', + 'origin_status_206' => 'int64', + 'origin_status_301' => 'int64', + 'origin_status_302' => 'int64', + 'origin_status_304' => 'int64', + 'origin_status_400' => 'int64', + 'origin_status_401' => 'int64', + 'origin_status_403' => 'int64', + 'origin_status_404' => 'int64', + 'origin_status_416' => 'int64', + 'origin_status_429' => 'int64', + 'origin_status_500' => 'int64', + 'origin_status_501' => 'int64', + 'origin_status_502' => 'int64', + 'origin_status_503' => 'int64', + 'origin_status_504' => 'int64', + 'origin_status_505' => 'int64', + 'origin_status_530' => 'int64', + 'origin_status_1xx' => 'int64', + 'origin_status_2xx' => 'int64', + 'origin_status_3xx' => 'int64', + 'origin_status_4xx' => 'int64', + 'origin_status_5xx' => 'int64' ]; /** @@ -243,6 +247,7 @@ public static function fastlyFormats() 'status_503' => 'status_503', 'status_504' => 'status_504', 'status_505' => 'status_505', + 'status_530' => 'status_530', 'requests' => 'requests', 'resp_header_bytes' => 'resp_header_bytes', 'resp_body_bytes' => 'resp_body_bytes', @@ -274,6 +279,7 @@ public static function fastlyFormats() 'origin_status_503' => 'origin_status_503', 'origin_status_504' => 'origin_status_504', 'origin_status_505' => 'origin_status_505', + 'origin_status_530' => 'origin_status_530', 'origin_status_1xx' => 'origin_status_1xx', 'origin_status_2xx' => 'origin_status_2xx', 'origin_status_3xx' => 'origin_status_3xx', @@ -313,6 +319,7 @@ public static function fastlyFormats() 'status_503' => 'setStatus503', 'status_504' => 'setStatus504', 'status_505' => 'setStatus505', + 'status_530' => 'setStatus530', 'requests' => 'setRequests', 'resp_header_bytes' => 'setRespHeaderBytes', 'resp_body_bytes' => 'setRespBodyBytes', @@ -344,6 +351,7 @@ public static function fastlyFormats() 'origin_status_503' => 'setOriginStatus503', 'origin_status_504' => 'setOriginStatus504', 'origin_status_505' => 'setOriginStatus505', + 'origin_status_530' => 'setOriginStatus530', 'origin_status_1xx' => 'setOriginStatus1xx', 'origin_status_2xx' => 'setOriginStatus2xx', 'origin_status_3xx' => 'setOriginStatus3xx', @@ -383,6 +391,7 @@ public static function fastlyFormats() 'status_503' => 'getStatus503', 'status_504' => 'getStatus504', 'status_505' => 'getStatus505', + 'status_530' => 'getStatus530', 'requests' => 'getRequests', 'resp_header_bytes' => 'getRespHeaderBytes', 'resp_body_bytes' => 'getRespBodyBytes', @@ -414,6 +423,7 @@ public static function fastlyFormats() 'origin_status_503' => 'getOriginStatus503', 'origin_status_504' => 'getOriginStatus504', 'origin_status_505' => 'getOriginStatus505', + 'origin_status_530' => 'getOriginStatus530', 'origin_status_1xx' => 'getOriginStatus1xx', 'origin_status_2xx' => 'getOriginStatus2xx', 'origin_status_3xx' => 'getOriginStatus3xx', @@ -504,6 +514,7 @@ public function __construct(array $data = null) $this->container['status_503'] = $data['status_503'] ?? null; $this->container['status_504'] = $data['status_504'] ?? null; $this->container['status_505'] = $data['status_505'] ?? null; + $this->container['status_530'] = $data['status_530'] ?? null; $this->container['requests'] = $data['requests'] ?? null; $this->container['resp_header_bytes'] = $data['resp_header_bytes'] ?? null; $this->container['resp_body_bytes'] = $data['resp_body_bytes'] ?? null; @@ -535,6 +546,7 @@ public function __construct(array $data = null) $this->container['origin_status_503'] = $data['origin_status_503'] ?? null; $this->container['origin_status_504'] = $data['origin_status_504'] ?? null; $this->container['origin_status_505'] = $data['origin_status_505'] ?? null; + $this->container['origin_status_530'] = $data['origin_status_530'] ?? null; $this->container['origin_status_1xx'] = $data['origin_status_1xx'] ?? null; $this->container['origin_status_2xx'] = $data['origin_status_2xx'] ?? null; $this->container['origin_status_3xx'] = $data['origin_status_3xx'] ?? null; @@ -1190,6 +1202,30 @@ public function setStatus505($status_505) return $this; } + /** + * Gets status_530 + * + * @return int|null + */ + public function getStatus530() + { + return $this->container['status_530']; + } + + /** + * Sets status_530 + * + * @param int|null $status_530 Number of responses delivered with status code 530. + * + * @return self + */ + public function setStatus530($status_530) + { + $this->container['status_530'] = $status_530; + + return $this; + } + /** * Gets requests * @@ -1934,6 +1970,30 @@ public function setOriginStatus505($origin_status_505) return $this; } + /** + * Gets origin_status_530 + * + * @return int|null + */ + public function getOriginStatus530() + { + return $this->container['origin_status_530']; + } + + /** + * Sets origin_status_530 + * + * @param int|null $origin_status_530 Number of responses received from origin with status code 530. + * + * @return self + */ + public function setOriginStatus530($origin_status_530) + { + $this->container['origin_status_530'] = $origin_status_530; + + return $this; + } + /** * Gets origin_status_1xx * diff --git a/lib/Model/WebsocketsResponseBodyEnable.php b/lib/Model/WebsocketsResponseBodyEnable.php new file mode 100644 index 00000000..aea8a9be --- /dev/null +++ b/lib/Model/WebsocketsResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class WebsocketsResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'websockets_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\WebsocketsResponseProductProduct', + 'service' => '\Fastly\Model\BotManagementResponseServiceService', + '_links' => '\Fastly\Model\WebsocketsResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\WebsocketsResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\WebsocketsResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\WebsocketsResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\WebsocketsResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WebsocketsResponseLinks.php b/lib/Model/WebsocketsResponseLinks.php new file mode 100644 index 00000000..d851fa6d --- /dev/null +++ b/lib/Model/WebsocketsResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class WebsocketsResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'websockets_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\WebsocketsResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\WebsocketsResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\WebsocketsResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WebsocketsResponseLinksLinks.php b/lib/Model/WebsocketsResponseLinksLinks.php new file mode 100644 index 00000000..0d6ed24f --- /dev/null +++ b/lib/Model/WebsocketsResponseLinksLinks.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class WebsocketsResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'websockets_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string', + 'service' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri', + 'service' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self', + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf', + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf', + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + + /** + * Gets service + * + * @return string|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param string|null $service Location of the service resource + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WebsocketsResponseProduct.php b/lib/Model/WebsocketsResponseProduct.php new file mode 100644 index 00000000..b9f00f73 --- /dev/null +++ b/lib/Model/WebsocketsResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class WebsocketsResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'websockets_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\WebsocketsResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\WebsocketsResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\WebsocketsResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ConfiguredProductResponseProduct.php b/lib/Model/WebsocketsResponseProductProduct.php similarity index 96% rename from lib/Model/ConfiguredProductResponseProduct.php rename to lib/Model/WebsocketsResponseProductProduct.php index ccace6c0..d9283303 100644 --- a/lib/Model/ConfiguredProductResponseProduct.php +++ b/lib/Model/WebsocketsResponseProductProduct.php @@ -1,6 +1,6 @@ + * @template TKey int|null + * @template TValue mixed|null + */ +class WebsocketsResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'websockets_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\BotManagementResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\BotManagementResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/sig.json b/sig.json index 4729e57b..9c285bae 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "8147d17d", "D": "c00fd741"} +{"G": "79ac6bf4", "D": "e46daecd"} From b6d8ade32746aa87da8beeae97e4bf0ac326fe59 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 13 Mar 2025 11:28:53 +0000 Subject: [PATCH 2/8] Generated v8.0.0 --- CHANGELOG.md | 35 + README.md | 5 +- docs/Api/BillingApi.md | 133 -- docs/Api/BillingUsageMetricsApi.md | 18 +- docs/Api/HeaderApi.md | 16 +- docs/Api/KvStoreItemApi.md | 8 +- docs/Api/LoggingAzureblobApi.md | 8 +- docs/Api/SnippetApi.md | 4 +- docs/Api/TlsBulkCertificatesApi.md | 4 + docs/Model/AutomationToken.md | 2 +- .../AutomationTokenCreateRequestAttributes.md | 2 +- docs/Model/AutomationTokenCreateResponse.md | 10 +- .../AutomationTokenCreateResponseAllOf.md | 6 +- docs/Model/AutomationTokenResponse.md | 10 +- docs/Model/AutomationTokenResponseAllOf.md | 8 +- docs/Model/Billing.md | 16 - docs/Model/BillingBandwidth.md | 11 - docs/Model/BillingBandwidthTiers.md | 14 - docs/Model/BillingEstimateInvoiceId.md | 10 - docs/Model/BillingEstimateLines.md | 10 - docs/Model/BillingEstimateLinesLineItems.md | 18 - docs/Model/BillingEstimateResponse.md | 18 - docs/Model/BillingInvoiceId.md | 10 - docs/Model/BillingRegions.md | 13 - docs/Model/BillingResponse.md | 18 - docs/Model/BillingResponseItemItemsData.md | 10 - docs/Model/BillingResponseLineItem.md | 29 - docs/Model/BillingStatus.md | 11 - docs/Model/BillingTotal.md | 25 - docs/Model/BillingTotalExtras.md | 12 - docs/Model/ComputeAclListEntriesMeta.md | 2 +- docs/Model/Header.md | 2 + docs/Model/HeaderResponseAdditional.md | 11 - docs/Model/LineItemData.md | 26 - docs/Model/LoggingAzureblobAdditional.md | 2 +- docs/Model/LoggingAzureblobResponse.md | 2 +- docs/Model/Results.md | 7 + docs/Model/SchemasSnippetResponseCommon.md | 15 - docs/Model/SnippetAllOf.md | 10 - docs/Model/SnippetCommon.md | 13 - ...CommonAllOf.md => SnippetResponseAllOf.md} | 2 +- docs/Model/SnippetResponseCommon.md | 15 - docs/Model/SnippetResponsePost.md | 20 - docs/Model/SnippetWithDynamicNumber.md | 14 - docs/Model/SnippetWithDynamicNumberAllOf.md | 10 - lib/Api/AutomationTokensApi.php | 22 +- lib/Api/BillingApi.php | 1185 ----------------- lib/Api/BillingUsageMetricsApi.php | 57 +- lib/Api/HeaderApi.php | 44 +- lib/Api/KvStoreItemApi.php | 24 +- lib/Api/LoggingAzureblobApi.php | 20 +- lib/Api/SnippetApi.php | 14 +- lib/Api/TlsBulkCertificatesApi.php | 34 + lib/Configuration.php | 4 +- lib/Model/AutomationToken.php | 2 +- ...AutomationTokenCreateRequestAttributes.php | 2 +- lib/Model/AutomationTokenCreateResponse.php | 150 +-- .../AutomationTokenCreateResponseAllOf.php | 60 +- lib/Model/AutomationTokenResponse.php | 162 +-- lib/Model/AutomationTokenResponseAllOf.php | 34 +- lib/Model/Billing.php | 494 ------- lib/Model/BillingBandwidth.php | 344 ----- lib/Model/BillingBandwidthTiers.php | 434 ------ lib/Model/BillingEstimateInvoiceId.php | 314 ----- lib/Model/BillingEstimateLines.php | 314 ----- lib/Model/BillingEstimateLinesLineItems.php | 554 -------- lib/Model/BillingEstimateResponse.php | 554 -------- lib/Model/BillingInvoiceId.php | 314 ----- lib/Model/BillingRegions.php | 404 ------ lib/Model/BillingResponse.php | 554 -------- lib/Model/BillingResponseItemItemsData.php | 314 ----- lib/Model/BillingResponseLineItem.php | 884 ------------ lib/Model/BillingStatus.php | 384 ------ lib/Model/BillingTotal.php | 765 ----------- lib/Model/BillingTotalExtras.php | 374 ------ lib/Model/ComputeAclListEntriesMeta.php | 6 +- lib/Model/Header.php | 70 +- lib/Model/HeaderResponseAdditional.php | 344 ----- lib/Model/LineItemData.php | 794 ----------- lib/Model/LoggingAzureblobAdditional.php | 2 +- lib/Model/LoggingAzureblobResponse.php | 2 +- lib/Model/Results.php | 210 +++ lib/Model/SchemasSnippetResponseCommon.php | 464 ------- lib/Model/SnippetAllOf.php | 348 ----- lib/Model/SnippetCommon.php | 456 ------- ...mmonAllOf.php => SnippetResponseAllOf.php} | 8 +- lib/Model/SnippetResponseCommon.php | 464 ------- lib/Model/SnippetResponsePost.php | 700 ---------- lib/Model/SnippetWithDynamicNumber.php | 520 -------- lib/Model/SnippetWithDynamicNumberAllOf.php | 348 ----- sig.json | 2 +- 91 files changed, 663 insertions(+), 13535 deletions(-) delete mode 100644 docs/Api/BillingApi.md delete mode 100644 docs/Model/Billing.md delete mode 100644 docs/Model/BillingBandwidth.md delete mode 100644 docs/Model/BillingBandwidthTiers.md delete mode 100644 docs/Model/BillingEstimateInvoiceId.md delete mode 100644 docs/Model/BillingEstimateLines.md delete mode 100644 docs/Model/BillingEstimateLinesLineItems.md delete mode 100644 docs/Model/BillingEstimateResponse.md delete mode 100644 docs/Model/BillingInvoiceId.md delete mode 100644 docs/Model/BillingRegions.md delete mode 100644 docs/Model/BillingResponse.md delete mode 100644 docs/Model/BillingResponseItemItemsData.md delete mode 100644 docs/Model/BillingResponseLineItem.md delete mode 100644 docs/Model/BillingStatus.md delete mode 100644 docs/Model/BillingTotal.md delete mode 100644 docs/Model/BillingTotalExtras.md delete mode 100644 docs/Model/HeaderResponseAdditional.md delete mode 100644 docs/Model/LineItemData.md delete mode 100644 docs/Model/SchemasSnippetResponseCommon.md delete mode 100644 docs/Model/SnippetAllOf.md delete mode 100644 docs/Model/SnippetCommon.md rename docs/Model/{SnippetResponseCommonAllOf.md => SnippetResponseAllOf.md} (93%) delete mode 100644 docs/Model/SnippetResponseCommon.md delete mode 100644 docs/Model/SnippetResponsePost.md delete mode 100644 docs/Model/SnippetWithDynamicNumber.md delete mode 100644 docs/Model/SnippetWithDynamicNumberAllOf.md delete mode 100644 lib/Api/BillingApi.php delete mode 100644 lib/Model/Billing.php delete mode 100644 lib/Model/BillingBandwidth.php delete mode 100644 lib/Model/BillingBandwidthTiers.php delete mode 100644 lib/Model/BillingEstimateInvoiceId.php delete mode 100644 lib/Model/BillingEstimateLines.php delete mode 100644 lib/Model/BillingEstimateLinesLineItems.php delete mode 100644 lib/Model/BillingEstimateResponse.php delete mode 100644 lib/Model/BillingInvoiceId.php delete mode 100644 lib/Model/BillingRegions.php delete mode 100644 lib/Model/BillingResponse.php delete mode 100644 lib/Model/BillingResponseItemItemsData.php delete mode 100644 lib/Model/BillingResponseLineItem.php delete mode 100644 lib/Model/BillingStatus.php delete mode 100644 lib/Model/BillingTotal.php delete mode 100644 lib/Model/BillingTotalExtras.php delete mode 100644 lib/Model/HeaderResponseAdditional.php delete mode 100644 lib/Model/LineItemData.php delete mode 100644 lib/Model/SchemasSnippetResponseCommon.php delete mode 100644 lib/Model/SnippetAllOf.php delete mode 100644 lib/Model/SnippetCommon.php rename lib/Model/{SnippetResponseCommonAllOf.php => SnippetResponseAllOf.php} (96%) delete mode 100644 lib/Model/SnippetResponseCommon.php delete mode 100644 lib/Model/SnippetResponsePost.php delete mode 100644 lib/Model/SnippetWithDynamicNumber.php delete mode 100644 lib/Model/SnippetWithDynamicNumberAllOf.php diff --git a/CHANGELOG.md b/CHANGELOG.md index b5a13529..a2e4720b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## [v8.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v8.0.0) (2025-03-13) + +**Breaking Changes:** + +- fix(automation_tokens): Response content types corrected. +- fix(automation_tokens): Removed timestamp fields. +- removed(billing): Billing v2 API has been removed. + +- fix(acls_in_compute): Corrected `meta.limit` field type from string to integer. + +- fix(condition): Condition responses now always have a string value for the priority field. +- fix(header): Header responses now always have a string value for the priority field. +- fix(snippet): Snippet responses now always have string values for the priority and dynamic fields. + +- fix(kv_store_item): `kv-store-get-item` returns an inline object instead of a File object. + + +**Enhancements:** + +- fix(automation_tokens): Added tls_access, creator_id fields to responses. +- feat(billing_usage_metrics): Added filter by service identifier for service-usage-metrics endpoint. +- feat(historical): Added new metrics: `ngwaf_requests_total_count`, `ngwaf_requests_unknown_count`, + `ngwaf_requests_allowed_count`, `ngwaf_requests_logged_count`, `ngwaf_requests_blocked_count`, + `ngwaf_requests_timeout_count`, and `ngwaf_requests_challenged_count`. +- feat(tls_bulk_certificates): Added `not_before` and `not_after` filter parameters to allow for filtering of bulk TLS + certificates by expiry. + + +**Documentation:** + +- doc(billing_usage_metrics): Correct documentation of pagination limits. +- doc(billing_usage_metrics): Correct documentation of api conditions for product_id and usage_type_name filters. +- doc(logging_azureblob): Mention Azure Block size limits. + + ## [v7.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v7.0.0) (2025-02-26) **Breaking Changes:** diff --git a/README.md b/README.md index 54c7ee6f..d5e2032c 100644 --- a/README.md +++ b/README.md @@ -117,9 +117,6 @@ Class | Method | Description [*BackendApi*](docs/Api/BackendApi.md) | [**getBackend**](docs/Api/BackendApi.md#getbackend) | Describe a backend [*BackendApi*](docs/Api/BackendApi.md) | [**listBackends**](docs/Api/BackendApi.md#listbackends) | List backends [*BackendApi*](docs/Api/BackendApi.md) | [**updateBackend**](docs/Api/BackendApi.md#updatebackend) | Update a backend -[*BillingApi*](docs/Api/BillingApi.md) | [**getInvoice**](docs/Api/BillingApi.md#getinvoice) | Get an invoice -[*BillingApi*](docs/Api/BillingApi.md) | [**getInvoiceById**](docs/Api/BillingApi.md#getinvoicebyid) | Get an invoice -[*BillingApi*](docs/Api/BillingApi.md) | [**getInvoiceMtd**](docs/Api/BillingApi.md#getinvoicemtd) | Get month-to-date billing estimate [*BillingAddressApi*](docs/Api/BillingAddressApi.md) | [**addBillingAddr**](docs/Api/BillingAddressApi.md#addbillingaddr) | Add a billing address to a customer [*BillingAddressApi*](docs/Api/BillingAddressApi.md) | [**deleteBillingAddr**](docs/Api/BillingAddressApi.md#deletebillingaddr) | Delete a billing address [*BillingAddressApi*](docs/Api/BillingAddressApi.md) | [**getBillingAddr**](docs/Api/BillingAddressApi.md#getbillingaddr) | Get a billing address @@ -127,7 +124,7 @@ Class | Method | Description [*BillingInvoicesApi*](docs/Api/BillingInvoicesApi.md) | [**getInvoiceByInvoiceId**](docs/Api/BillingInvoicesApi.md#getinvoicebyinvoiceid) | Get invoice by ID. [*BillingInvoicesApi*](docs/Api/BillingInvoicesApi.md) | [**getMonthToDateInvoice**](docs/Api/BillingInvoicesApi.md#getmonthtodateinvoice) | Get month-to-date invoice. [*BillingInvoicesApi*](docs/Api/BillingInvoicesApi.md) | [**listInvoices**](docs/Api/BillingInvoicesApi.md#listinvoices) | List of invoices. -[*BillingUsageMetricsApi*](docs/Api/BillingUsageMetricsApi.md) | [**getServiceLevelUsage**](docs/Api/BillingUsageMetricsApi.md#getservicelevelusage) | Retrieve service-level usage metrics for a product. +[*BillingUsageMetricsApi*](docs/Api/BillingUsageMetricsApi.md) | [**getServiceLevelUsage**](docs/Api/BillingUsageMetricsApi.md#getservicelevelusage) | Retrieve service-level usage metrics for services with non-zero usage units. [*BillingUsageMetricsApi*](docs/Api/BillingUsageMetricsApi.md) | [**getUsageMetrics**](docs/Api/BillingUsageMetricsApi.md#getusagemetrics) | Get monthly usage metrics [*CacheSettingsApi*](docs/Api/CacheSettingsApi.md) | [**createCacheSettings**](docs/Api/CacheSettingsApi.md#createcachesettings) | Create a cache settings object [*CacheSettingsApi*](docs/Api/CacheSettingsApi.md) | [**deleteCacheSettings**](docs/Api/CacheSettingsApi.md#deletecachesettings) | Delete a cache settings object diff --git a/docs/Api/BillingApi.md b/docs/Api/BillingApi.md deleted file mode 100644 index 3a17e5cc..00000000 --- a/docs/Api/BillingApi.md +++ /dev/null @@ -1,133 +0,0 @@ -# Fastly\Api\BillingApi - - -```php -$apiInstance = new Fastly\Api\BillingApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getInvoice()**](BillingApi.md#getInvoice) | **GET** /billing/v2/year/{year}/month/{month} | Get an invoice -[**getInvoiceById()**](BillingApi.md#getInvoiceById) | **GET** /billing/v2/account_customers/{customer_id}/invoices/{invoice_id} | Get an invoice -[**getInvoiceMtd()**](BillingApi.md#getInvoiceMtd) | **GET** /billing/v2/account_customers/{customer_id}/mtd_invoice | Get month-to-date billing estimate - - -## `getInvoice()` - -```php -getInvoice($options): \Fastly\Model\BillingResponse // Get an invoice -``` - -Get the invoice for a given year and month. Can be any month from when the Customer was created to the current month. - -### Example -```php - $options['month'] = 05; // string | 2-digit month. -$options['year'] = 2020; // string | 4-digit year. - -try { - $result = $apiInstance->getInvoice($options); -} catch (Exception $e) { - echo 'Exception when calling BillingApi->getInvoice: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**month** | **string** | 2-digit month. | -**year** | **string** | 4-digit year. | - -### Return type - -[**\Fastly\Model\BillingResponse**](../Model/BillingResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getInvoiceById()` - -```php -getInvoiceById($options): \Fastly\Model\BillingResponse // Get an invoice -``` - -Get the invoice for the given invoice_id. - -### Example -```php - $options['customer_id'] = 'customer_id_example'; // string | Alphanumeric string identifying the customer. -$options['invoice_id'] = 4183280; // int - -try { - $result = $apiInstance->getInvoiceById($options); -} catch (Exception $e) { - echo 'Exception when calling BillingApi->getInvoiceById: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**customer_id** | **string** | Alphanumeric string identifying the customer. | -**invoice_id** | **int** | | - -### Return type - -[**\Fastly\Model\BillingResponse**](../Model/BillingResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getInvoiceMtd()` - -```php -getInvoiceMtd($options): \Fastly\Model\BillingEstimateResponse // Get month-to-date billing estimate -``` - -Get the current month-to-date estimate. This endpoint has two different responses. Under normal circumstances, it generally takes less than 5 seconds to generate but in certain cases can take up to 60 seconds. Once generated the month-to-date estimate is cached for 4 hours, and is available the next request will return the JSON representation of the month-to-date estimate. While a report is being generated in the background, this endpoint will return a `202 Accepted` response. The full format of which can be found in detail in our [billing calculation guide](https://docs.fastly.com/en/guides/how-we-calculate-your-bill). There are certain accounts for which we are unable to generate a month-to-date estimate. For example, accounts who have parent-pay are unable to generate an MTD estimate. The parent accounts are able to generate a month-to-date estimate but that estimate will not include the child accounts amounts at this time. - -### Example -```php - $options['customer_id'] = 'customer_id_example'; // string | Alphanumeric string identifying the customer. -$options['month'] = 05; // string | 2-digit month. -$options['year'] = 2020; // string | 4-digit year. - -try { - $result = $apiInstance->getInvoiceMtd($options); -} catch (Exception $e) { - echo 'Exception when calling BillingApi->getInvoiceMtd: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**customer_id** | **string** | Alphanumeric string identifying the customer. | -**month** | **string** | 2-digit month. | [optional] -**year** | **string** | 4-digit year. | [optional] - -### Return type - -[**\Fastly\Model\BillingEstimateResponse**](../Model/BillingEstimateResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/BillingUsageMetricsApi.md b/docs/Api/BillingUsageMetricsApi.md index bb03b82a..8952badc 100644 --- a/docs/Api/BillingUsageMetricsApi.md +++ b/docs/Api/BillingUsageMetricsApi.md @@ -17,25 +17,26 @@ $apiInstance = new Fastly\Api\BillingUsageMetricsApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**getServiceLevelUsage()**](BillingUsageMetricsApi.md#getServiceLevelUsage) | **GET** /billing/v3/service-usage-metrics | Retrieve service-level usage metrics for a product. +[**getServiceLevelUsage()**](BillingUsageMetricsApi.md#getServiceLevelUsage) | **GET** /billing/v3/service-usage-metrics | Retrieve service-level usage metrics for services with non-zero usage units. [**getUsageMetrics()**](BillingUsageMetricsApi.md#getUsageMetrics) | **GET** /billing/v3/usage-metrics | Get monthly usage metrics ## `getServiceLevelUsage()` ```php -getServiceLevelUsage($options): \Fastly\Model\Serviceusagemetrics // Retrieve service-level usage metrics for a product. +getServiceLevelUsage($options): \Fastly\Model\Serviceusagemetrics // Retrieve service-level usage metrics for services with non-zero usage units. ``` Returns product usage, broken down by service. ### Example ```php - $options['product_id'] = 'product_id_example'; // string | The product identifier for the metrics returned (e.g., `cdn_usage`). -$options['usage_type_name'] = 'usage_type_name_example'; // string | The usage type name for the metrics returned (e.g., `North America Requests`). + $options['product_id'] = 'product_id_example'; // string | The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. +$options['service'] = 'service_example'; // string | The service identifier for the metrics being requested. +$options['usage_type_name'] = 'usage_type_name_example'; // string | The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. $options['start_month'] = 2023-01; // string $options['end_month'] = 2023-03; // string -$options['limit'] = '5'; // string | Number of results per page. The maximum is 100. +$options['limit'] = '1000'; // string | Number of results per page. The maximum is 10000. $options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. try { @@ -51,11 +52,12 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**product_id** | **string** | The product identifier for the metrics returned (e.g., `cdn_usage`). | [optional] -**usage_type_name** | **string** | The usage type name for the metrics returned (e.g., `North America Requests`). | [optional] +**product_id** | **string** | The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. | [optional] +**service** | **string** | The service identifier for the metrics being requested. | [optional] +**usage_type_name** | **string** | The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. | [optional] **start_month** | **string** | | [optional] **end_month** | **string** | | [optional] -**limit** | **string** | Number of results per page. The maximum is 100. | [optional] [defaults to '5'] +**limit** | **string** | Number of results per page. The maximum is 10000. | [optional] [defaults to '1000'] **cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] ### Return type diff --git a/docs/Api/HeaderApi.md b/docs/Api/HeaderApi.md index d5e9e590..362ce1a5 100644 --- a/docs/Api/HeaderApi.md +++ b/docs/Api/HeaderApi.md @@ -46,8 +46,8 @@ $options['response_condition'] = 'response_condition_example'; // string | Optio $options['src'] = 'src_example'; // string | Variable to be used as a source for the header content. Does not apply to `delete` action. $options['substitution'] = 'substitution_example'; // string | Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. $options['type'] = 'type_example'; // string | Accepts a string value. -$options['ignore_if_set'] = 56; // int | Don't add the header if it is added already. Only applies to 'set' action. -$options['priority'] = 100; // int | Priority determines execution order. Lower numbers execute first. +$options['ignore_if_set'] = 'ignore_if_set_example'; // string | Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) +$options['priority'] = '100'; // string | Priority determines execution order. Lower numbers execute first. try { $result = $apiInstance->createHeaderObject($options); @@ -74,8 +74,8 @@ Name | Type | Description | Notes **src** | **string** | Variable to be used as a source for the header content. Does not apply to `delete` action. | [optional] **substitution** | **string** | Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. | [optional] **type** | **string** | Accepts a string value. | [optional] [one of: 'request', 'cache', 'response'] -**ignore_if_set** | **int** | Don't add the header if it is added already. Only applies to 'set' action. | [optional] -**priority** | **int** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to 100] +**ignore_if_set** | **string** | Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) | [optional] +**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] ### Return type @@ -219,8 +219,8 @@ $options['response_condition'] = 'response_condition_example'; // string | Optio $options['src'] = 'src_example'; // string | Variable to be used as a source for the header content. Does not apply to `delete` action. $options['substitution'] = 'substitution_example'; // string | Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. $options['type'] = 'type_example'; // string | Accepts a string value. -$options['ignore_if_set'] = 56; // int | Don't add the header if it is added already. Only applies to 'set' action. -$options['priority'] = 100; // int | Priority determines execution order. Lower numbers execute first. +$options['ignore_if_set'] = 'ignore_if_set_example'; // string | Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) +$options['priority'] = '100'; // string | Priority determines execution order. Lower numbers execute first. try { $result = $apiInstance->updateHeaderObject($options); @@ -248,8 +248,8 @@ Name | Type | Description | Notes **src** | **string** | Variable to be used as a source for the header content. Does not apply to `delete` action. | [optional] **substitution** | **string** | Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. | [optional] **type** | **string** | Accepts a string value. | [optional] [one of: 'request', 'cache', 'response'] -**ignore_if_set** | **int** | Don't add the header if it is added already. Only applies to 'set' action. | [optional] -**priority** | **int** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to 100] +**ignore_if_set** | **string** | Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) | [optional] +**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] ### Return type diff --git a/docs/Api/KvStoreItemApi.md b/docs/Api/KvStoreItemApi.md index 516f8725..1ff8705a 100644 --- a/docs/Api/KvStoreItemApi.md +++ b/docs/Api/KvStoreItemApi.md @@ -66,7 +66,7 @@ void (empty response body) ## `kvStoreGetItem()` ```php -kvStoreGetItem($options): \SplFileObject // Get an item. +kvStoreGetItem($options): string // Get an item. ``` Get an item, including its value, metadata (if any), and generation marker. @@ -94,7 +94,7 @@ Name | Type | Description | Notes ### Return type -**\SplFileObject** +**string** [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) @@ -160,7 +160,7 @@ $options['add'] = false; // bool $options['append'] = false; // bool $options['prepend'] = false; // bool $options['background_fetch'] = false; // bool -$options['body'] = "/path/to/file.txt"; // \SplFileObject +$options['body'] = 'body_example'; // string try { $apiInstance->kvStoreUpsertItem($options); @@ -184,7 +184,7 @@ Name | Type | Description | Notes **append** | **bool** | | [optional] [defaults to false] **prepend** | **bool** | | [optional] [defaults to false] **background_fetch** | **bool** | | [optional] [defaults to false] -**body** | **\SplFileObject****\SplFileObject** | | [optional] +**body** | **string** | | [optional] ### Return type diff --git a/docs/Api/LoggingAzureblobApi.md b/docs/Api/LoggingAzureblobApi.md index 3f1e5cb5..9de34647 100644 --- a/docs/Api/LoggingAzureblobApi.md +++ b/docs/Api/LoggingAzureblobApi.md @@ -51,7 +51,7 @@ $options['account_name'] = 'account_name_example'; // string | The unique Azure $options['container'] = 'container_example'; // string | The name of the Azure Blob Storage container in which to store logs. Required. $options['sas_token'] = 'sas_token_example'; // string | The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. $options['public_key'] = 'null'; // string | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. -$options['file_max_bytes'] = 56; // int | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) +$options['file_max_bytes'] = 56; // int | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). try { $result = $apiInstance->createLogAzure($options); @@ -83,7 +83,7 @@ Name | Type | Description | Notes **container** | **string** | The name of the Azure Blob Storage container in which to store logs. Required. | [optional] **sas_token** | **string** | The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. | [optional] **public_key** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [optional] [defaults to 'null'] -**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). | [optional] ### Return type @@ -232,7 +232,7 @@ $options['account_name'] = 'account_name_example'; // string | The unique Azure $options['container'] = 'container_example'; // string | The name of the Azure Blob Storage container in which to store logs. Required. $options['sas_token'] = 'sas_token_example'; // string | The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. $options['public_key'] = 'null'; // string | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. -$options['file_max_bytes'] = 56; // int | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) +$options['file_max_bytes'] = 56; // int | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). try { $result = $apiInstance->updateLogAzure($options); @@ -265,7 +265,7 @@ Name | Type | Description | Notes **container** | **string** | The name of the Azure Blob Storage container in which to store logs. Required. | [optional] **sas_token** | **string** | The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. | [optional] **public_key** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [optional] [defaults to 'null'] -**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). | [optional] ### Return type diff --git a/docs/Api/SnippetApi.md b/docs/Api/SnippetApi.md index 7ae18004..e53c3c59 100644 --- a/docs/Api/SnippetApi.md +++ b/docs/Api/SnippetApi.md @@ -29,7 +29,7 @@ Method | HTTP request | Description ## `createSnippet()` ```php -createSnippet($options): \Fastly\Model\SnippetResponsePost // Create a snippet +createSnippet($options): \Fastly\Model\SnippetResponse // Create a snippet ``` Create a snippet for a particular service and version. @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\SnippetResponsePost**](../Model/SnippetResponsePost.md) +[**\Fastly\Model\SnippetResponse**](../Model/SnippetResponse.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/TlsBulkCertificatesApi.md b/docs/Api/TlsBulkCertificatesApi.md index eb44cd2b..87126c01 100644 --- a/docs/Api/TlsBulkCertificatesApi.md +++ b/docs/Api/TlsBulkCertificatesApi.md @@ -103,6 +103,8 @@ List all certificates. ### Example ```php $options['filter_tls_domain_id'] = 'filter_tls_domain_id_example'; // string | Filter certificates by their matching, fully-qualified domain name. +$options['filter_not_before'] = 'filter_not_before_example'; // string | Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). +$options['filter_not_after'] = 'filter_not_after_example'; // string | Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). $options['page_number'] = 1; // int | Current page. $options['page_size'] = 20; // int | Number of records per page. $options['sort'] = created_at; // string | The order in which to list the results by creation date. @@ -121,6 +123,8 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **filter_tls_domain_id** | **string** | Filter certificates by their matching, fully-qualified domain name. | [optional] +**filter_not_before** | **string** | Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). | [optional] +**filter_not_after** | **string** | Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). | [optional] **page_number** | **int** | Current page. | [optional] **page_size** | **int** | Number of records per page. | [optional] [defaults to 20] **sort** | **string** | The order in which to list the results by creation date. | [optional] [one of: 'created_at', '-created_at'] [defaults to 'created_at'] diff --git a/docs/Model/AutomationToken.md b/docs/Model/AutomationToken.md index f0ae0bfb..8e0706b6 100644 --- a/docs/Model/AutomationToken.md +++ b/docs/Model/AutomationToken.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **role** | **string** | The role on the token. | [optional] [one of: 'billing', 'engineer', 'user'] **services** | **string[]** | (Optional) The service IDs of the services the token will have access to. Separate service IDs with a space. If no services are specified, the token will have access to all services on the account. | [optional] **scope** | **string** | A space-delimited list of authorization scope. | [optional] [one of: 'global', 'purge_select', 'purge_all', 'global:read'] [defaults to 'global'] -**expires_at** | **string** | A UTC time-stamp of when the token expires. | [optional] +**expires_at** | **string** | A UTC timestamp of when the token expires. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AutomationTokenCreateRequestAttributes.md b/docs/Model/AutomationTokenCreateRequestAttributes.md index 29d43617..5b315151 100644 --- a/docs/Model/AutomationTokenCreateRequestAttributes.md +++ b/docs/Model/AutomationTokenCreateRequestAttributes.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **role** | **string** | | [optional] [one of: 'engineer', 'billing', 'user'] **services** | **string[]** | List of service ids to limit the token | [optional] **scope** | **string** | | [optional] [one of: 'global', 'global:read', 'purge_all', 'purge_select'] [defaults to 'global'] -**expires_at** | **\DateTime** | A UTC time-stamp of when the token will expire. | [optional] +**expires_at** | **\DateTime** | A UTC timestamp of when the token will expire. | [optional] **tls_access** | **bool** | Indicates whether TLS access is enabled for the token. | [optional] diff --git a/docs/Model/AutomationTokenCreateResponse.md b/docs/Model/AutomationTokenCreateResponse.md index d8c0d52d..0f196f8f 100644 --- a/docs/Model/AutomationTokenCreateResponse.md +++ b/docs/Model/AutomationTokenCreateResponse.md @@ -8,16 +8,14 @@ Name | Type | Description | Notes **role** | **string** | The role on the token. | [optional] [one of: 'billing', 'engineer', 'user'] **services** | **string[]** | (Optional) The service IDs of the services the token will have access to. Separate service IDs with a space. If no services are specified, the token will have access to all services on the account. | [optional] **scope** | **string** | A space-delimited list of authorization scope. | [optional] [one of: 'global', 'purge_select', 'purge_all', 'global:read'] [defaults to 'global'] -**expires_at** | **string** | A UTC time-stamp of when the token expires. | [optional] -**created_at** | **\DateTime** | A UTC time-stamp of when the token was created. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**expires_at** | **string** | A UTC timestamp of when the token expires. | [optional] **id** | [**\Fastly\Model\ReadOnlyId**](ReadOnlyId.md) | | [optional] **user_id** | [**\Fastly\Model\ReadOnlyUserId**](ReadOnlyUserId.md) | | [optional] **customer_id** | [**\Fastly\Model\ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] -**sudo_expires_at** | **\DateTime** | | [optional] [readonly] +**created_at** | **\DateTime** | A UTC timestamp of when the token was created. | [optional] [readonly] **access_token** | **string** | | [optional] [readonly] -**last_used_at** | **\DateTime** | A UTC time-stamp of when the token was last used. | [optional] [readonly] +**tls_access** | **bool** | Indicates whether TLS access is enabled for the token. | [optional] +**last_used_at** | **\DateTime** | A UTC timestamp of when the token was last used. | [optional] [readonly] **user_agent** | **string** | The User-Agent header of the client that last used the token. | [optional] diff --git a/docs/Model/AutomationTokenCreateResponseAllOf.md b/docs/Model/AutomationTokenCreateResponseAllOf.md index 475f1796..0460fedd 100644 --- a/docs/Model/AutomationTokenCreateResponseAllOf.md +++ b/docs/Model/AutomationTokenCreateResponseAllOf.md @@ -7,10 +7,10 @@ Name | Type | Description | Notes **id** | [**\Fastly\Model\ReadOnlyId**](ReadOnlyId.md) | | [optional] **user_id** | [**\Fastly\Model\ReadOnlyUserId**](ReadOnlyUserId.md) | | [optional] **customer_id** | [**\Fastly\Model\ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] -**sudo_expires_at** | **\DateTime** | | [optional] [readonly] -**created_at** | **\DateTime** | A UTC time-stamp of when the token was created. | [optional] [readonly] +**created_at** | **\DateTime** | A UTC timestamp of when the token was created. | [optional] [readonly] **access_token** | **string** | | [optional] [readonly] -**last_used_at** | **\DateTime** | A UTC time-stamp of when the token was last used. | [optional] [readonly] +**tls_access** | **bool** | Indicates whether TLS access is enabled for the token. | [optional] +**last_used_at** | **\DateTime** | A UTC timestamp of when the token was last used. | [optional] [readonly] **user_agent** | **string** | The User-Agent header of the client that last used the token. | [optional] diff --git a/docs/Model/AutomationTokenResponse.md b/docs/Model/AutomationTokenResponse.md index c401f57b..bceae2e6 100644 --- a/docs/Model/AutomationTokenResponse.md +++ b/docs/Model/AutomationTokenResponse.md @@ -8,16 +8,14 @@ Name | Type | Description | Notes **role** | **string** | | [optional] **services** | **string[]** | (Optional) The service IDs of the services the token will have access to. Separate service IDs with a space. If no services are specified, the token will have access to all services on the account. | [optional] **scope** | **string** | A space-delimited list of authorization scope. | [optional] [one of: 'global', 'purge_select', 'purge_all', 'global:read'] [defaults to 'global'] -**expires_at** | **string** | (optional) A UTC time-stamp of when the token will expire. | [optional] -**created_at** | **string** | A UTC time-stamp of when the token was created. | [optional] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**expires_at** | **string** | (optional) A UTC timestamp of when the token will expire. | [optional] **id** | [**\Fastly\Model\ReadOnlyId**](ReadOnlyId.md) | | [optional] **customer_id** | [**\Fastly\Model\ReadOnlyCustomerId**](ReadOnlyCustomerId.md) | | [optional] **ip** | **string** | The IP address of the client that last used the token. | [optional] **user_agent** | **string** | The User-Agent header of the client that last used the token. | [optional] -**sudo_expires_at** | **string** | | [optional] [readonly] -**last_used_at** | **\DateTime** | A UTC time-stamp of when the token was last used. | [optional] [readonly] +**tls_access** | **bool** | Indicates whether TLS access is enabled for the token. | [optional] +**last_used_at** | **\DateTime** | A UTC timestamp of when the token was last used. | [optional] [readonly] +**created_at** | **string** | A UTC timestamp of when the token was created. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AutomationTokenResponseAllOf.md b/docs/Model/AutomationTokenResponseAllOf.md index b51c599d..fd93821f 100644 --- a/docs/Model/AutomationTokenResponseAllOf.md +++ b/docs/Model/AutomationTokenResponseAllOf.md @@ -9,10 +9,10 @@ Name | Type | Description | Notes **role** | **string** | | [optional] **ip** | **string** | The IP address of the client that last used the token. | [optional] **user_agent** | **string** | The User-Agent header of the client that last used the token. | [optional] -**sudo_expires_at** | **string** | | [optional] [readonly] -**last_used_at** | **\DateTime** | A UTC time-stamp of when the token was last used. | [optional] [readonly] -**created_at** | **string** | A UTC time-stamp of when the token was created. | [optional] -**expires_at** | **string** | (optional) A UTC time-stamp of when the token will expire. | [optional] +**tls_access** | **bool** | Indicates whether TLS access is enabled for the token. | [optional] +**last_used_at** | **\DateTime** | A UTC timestamp of when the token was last used. | [optional] [readonly] +**created_at** | **string** | A UTC timestamp of when the token was created. | [optional] +**expires_at** | **string** | (optional) A UTC timestamp of when the token will expire. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Billing.md b/docs/Model/Billing.md deleted file mode 100644 index 697dd0e2..00000000 --- a/docs/Model/Billing.md +++ /dev/null @@ -1,16 +0,0 @@ -# # Billing - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**end_time** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**start_time** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**customer_id** | **string** | | [optional] [readonly] -**vendor_state** | **string** | The current state of our third-party billing vendor. One of `up` or `down`. | [optional] [readonly] -**status** | [**\Fastly\Model\BillingStatus**](BillingStatus.md) | | [optional] -**total** | [**\Fastly\Model\BillingTotal**](BillingTotal.md) | | [optional] -**regions** | [**array<string,\Fastly\Model\BillingRegions>**](BillingRegions.md) | Breakdown of regional data for products that are region based. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingBandwidth.md b/docs/Model/BillingBandwidth.md deleted file mode 100644 index dd3d0da9..00000000 --- a/docs/Model/BillingBandwidth.md +++ /dev/null @@ -1,11 +0,0 @@ -# # BillingBandwidth - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**total** | **float** | | [optional] -**tiers** | [**\Fastly\Model\BillingBandwidthTiers[]**](BillingBandwidthTiers.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingBandwidthTiers.md b/docs/Model/BillingBandwidthTiers.md deleted file mode 100644 index 13e8dd95..00000000 --- a/docs/Model/BillingBandwidthTiers.md +++ /dev/null @@ -1,14 +0,0 @@ -# # BillingBandwidthTiers - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | [optional] -**units** | **float** | | [optional] -**price** | **float** | | [optional] -**discounted_price** | **float** | | [optional] -**total** | **float** | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingEstimateInvoiceId.md b/docs/Model/BillingEstimateInvoiceId.md deleted file mode 100644 index 2b6b2f69..00000000 --- a/docs/Model/BillingEstimateInvoiceId.md +++ /dev/null @@ -1,10 +0,0 @@ -# # BillingEstimateInvoiceId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invoice_id** | **string** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingEstimateLines.md b/docs/Model/BillingEstimateLines.md deleted file mode 100644 index a06a4aa1..00000000 --- a/docs/Model/BillingEstimateLines.md +++ /dev/null @@ -1,10 +0,0 @@ -# # BillingEstimateLines - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**line_items** | [**\Fastly\Model\BillingEstimateLinesLineItems[]**](BillingEstimateLinesLineItems.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingEstimateLinesLineItems.md b/docs/Model/BillingEstimateLinesLineItems.md deleted file mode 100644 index 6fea0960..00000000 --- a/docs/Model/BillingEstimateLinesLineItems.md +++ /dev/null @@ -1,18 +0,0 @@ -# # BillingEstimateLinesLineItems - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**plan_no** | **int** | | [optional] -**description** | **string** | | [optional] -**units** | **float** | | [optional] -**per_unit_cost** | **float** | | [optional] -**service_no** | **float** | | [optional] -**service_type** | **string** | | [optional] -**amount** | **float** | | [optional] -**client_service_id** | **string** | | [optional] -**client_plan_id** | **string** | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingEstimateResponse.md b/docs/Model/BillingEstimateResponse.md deleted file mode 100644 index 22cac7bf..00000000 --- a/docs/Model/BillingEstimateResponse.md +++ /dev/null @@ -1,18 +0,0 @@ -# # BillingEstimateResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**end_time** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**start_time** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**customer_id** | **string** | | [optional] [readonly] -**vendor_state** | **string** | The current state of our third-party billing vendor. One of `up` or `down`. | [optional] [readonly] -**status** | [**\Fastly\Model\BillingStatus**](BillingStatus.md) | | [optional] -**total** | [**\Fastly\Model\BillingTotal**](BillingTotal.md) | | [optional] -**regions** | [**array<string,\Fastly\Model\BillingRegions>**](BillingRegions.md) | Breakdown of regional data for products that are region based. | [optional] -**invoice_id** | **string** | | [optional] [readonly] -**line_items** | [**\Fastly\Model\BillingEstimateLinesLineItems[]**](BillingEstimateLinesLineItems.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingInvoiceId.md b/docs/Model/BillingInvoiceId.md deleted file mode 100644 index f9420fb0..00000000 --- a/docs/Model/BillingInvoiceId.md +++ /dev/null @@ -1,10 +0,0 @@ -# # BillingInvoiceId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invoice_id** | **int** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingRegions.md b/docs/Model/BillingRegions.md deleted file mode 100644 index 4a36f60d..00000000 --- a/docs/Model/BillingRegions.md +++ /dev/null @@ -1,13 +0,0 @@ -# # BillingRegions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cost** | **float** | | [optional] -**bandwidth** | [**\Fastly\Model\BillingBandwidth**](BillingBandwidth.md) | | [optional] -**percentile** | [**\Fastly\Model\BillingBandwidth**](BillingBandwidth.md) | | [optional] -**requests** | [**\Fastly\Model\BillingBandwidth**](BillingBandwidth.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingResponse.md b/docs/Model/BillingResponse.md deleted file mode 100644 index faec0dd1..00000000 --- a/docs/Model/BillingResponse.md +++ /dev/null @@ -1,18 +0,0 @@ -# # BillingResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**end_time** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**start_time** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**customer_id** | **string** | | [optional] [readonly] -**vendor_state** | **string** | The current state of our third-party billing vendor. One of `up` or `down`. | [optional] [readonly] -**status** | [**\Fastly\Model\BillingStatus**](BillingStatus.md) | | [optional] -**total** | [**\Fastly\Model\BillingTotal**](BillingTotal.md) | | [optional] -**regions** | [**array<string,\Fastly\Model\BillingRegions>**](BillingRegions.md) | Breakdown of regional data for products that are region based. | [optional] -**invoice_id** | **int** | | [optional] [readonly] -**line_items** | [**\Fastly\Model\BillingResponseLineItem[]**](BillingResponseLineItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingResponseItemItemsData.md b/docs/Model/BillingResponseItemItemsData.md deleted file mode 100644 index 50c9bf0a..00000000 --- a/docs/Model/BillingResponseItemItemsData.md +++ /dev/null @@ -1,10 +0,0 @@ -# # BillingResponseItemItemsData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**line_items** | [**\Fastly\Model\BillingResponseLineItem[]**](BillingResponseLineItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingResponseLineItem.md b/docs/Model/BillingResponseLineItem.md deleted file mode 100644 index 0344c157..00000000 --- a/docs/Model/BillingResponseLineItem.md +++ /dev/null @@ -1,29 +0,0 @@ -# # BillingResponseLineItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**amount** | **float** | | [optional] -**aria_invoice_id** | **string** | An alphanumeric string identifying the invoice. | [optional] [readonly] -**client_service_id** | **string** | | [optional] -**credit_coupon_code** | **string** | | [optional] -**description** | **string** | | [optional] -**id** | **string** | | [optional] -**line_number** | **int** | | [optional] -**plan_name** | **string** | | [optional] -**plan_no** | **float** | | [optional] -**rate_per_unit** | **float** | | [optional] -**rate_schedule_no** | **float** | | [optional] -**rate_schedule_tier_no** | **float** | | [optional] -**service_name** | **string** | | [optional] -**service_no** | **float** | | [optional] -**units** | **float** | | [optional] -**usage_type_cd** | **string** | | [optional] -**usage_type_no** | **float** | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingStatus.md b/docs/Model/BillingStatus.md deleted file mode 100644 index 5b1904f4..00000000 --- a/docs/Model/BillingStatus.md +++ /dev/null @@ -1,11 +0,0 @@ -# # BillingStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **string** | What the current status of this invoice can be. | [optional] [one of: 'Pending', 'Outstanding', 'Paid', 'MTD'] -**sent_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingTotal.md b/docs/Model/BillingTotal.md deleted file mode 100644 index aadf5b0f..00000000 --- a/docs/Model/BillingTotal.md +++ /dev/null @@ -1,25 +0,0 @@ -# # BillingTotal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bandwidth** | **float** | The total amount of bandwidth used this month (See bandwidth_units for measurement). | [optional] -**bandwidth_cost** | **float** | The cost of the bandwidth used this month in USD. | [optional] -**bandwidth_units** | **string** | Bandwidth measurement units based on billing plan. | [optional] -**cost** | **float** | The final amount to be paid. | [optional] -**cost_before_discount** | **float** | Total incurred cost plus extras cost. | [optional] -**discount** | **float** | Calculated discount rate. | [optional] -**extras** | [**\Fastly\Model\BillingTotalExtras[]**](BillingTotalExtras.md) | A list of any extras for this invoice. | [optional] -**extras_cost** | **float** | Total cost of all extras. | [optional] -**incurred_cost** | **float** | The total cost of bandwidth and requests used this month. | [optional] -**overage** | **float** | How much over the plan minimum has been incurred. | [optional] -**plan_code** | **string** | The short code the plan this invoice was generated under. | [optional] -**plan_minimum** | **float** | The minimum cost of this plan. | [optional] -**plan_name** | **string** | The name of the plan this invoice was generated under. | [optional] -**requests** | **float** | The total number of requests used this month. | [optional] -**requests_cost** | **float** | The cost of the requests used this month. | [optional] -**terms** | **string** | Payment terms. Almost always Net15. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BillingTotalExtras.md b/docs/Model/BillingTotalExtras.md deleted file mode 100644 index 028df690..00000000 --- a/docs/Model/BillingTotalExtras.md +++ /dev/null @@ -1,12 +0,0 @@ -# # BillingTotalExtras - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name of this extra cost. | [optional] -**recurring** | **float** | Recurring monthly cost in USD. Not present if $0.0. | [optional] -**setup** | **float** | Initial set up cost in USD. Not present if $0.0 or this is not the month the extra was added. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ComputeAclListEntriesMeta.md b/docs/Model/ComputeAclListEntriesMeta.md index 0e888307..40ad0f14 100644 --- a/docs/Model/ComputeAclListEntriesMeta.md +++ b/docs/Model/ComputeAclListEntriesMeta.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**limit** | **string** | The maximum number of results shown in this response. | [optional] +**limit** | **int** | The maximum number of results shown in this response. | [optional] **next_cursor** | **string** | Used for pagination, supply to the next request to get the next block of results. | [optional] diff --git a/docs/Model/Header.md b/docs/Model/Header.md index c66d695c..d354bcd7 100644 --- a/docs/Model/Header.md +++ b/docs/Model/Header.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **src** | **string** | Variable to be used as a source for the header content. Does not apply to `delete` action. | [optional] **substitution** | **string** | Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. | [optional] **type** | **string** | Accepts a string value. | [optional] [one of: 'request', 'cache', 'response'] +**ignore_if_set** | **string** | Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\"0\" = false, \"1\" = true) | [optional] +**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/HeaderResponseAdditional.md b/docs/Model/HeaderResponseAdditional.md deleted file mode 100644 index 5f02b39f..00000000 --- a/docs/Model/HeaderResponseAdditional.md +++ /dev/null @@ -1,11 +0,0 @@ -# # HeaderResponseAdditional - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ignore_if_set** | **string** | Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\"0\" = false, \"1\" = true) | [optional] -**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LineItemData.md b/docs/Model/LineItemData.md deleted file mode 100644 index 93e8edbc..00000000 --- a/docs/Model/LineItemData.md +++ /dev/null @@ -1,26 +0,0 @@ -# # LineItemData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | **float** | | [optional] -**aria_invoice_id** | **string** | An alphanumeric string identifying the invoice. | [optional] [readonly] -**client_service_id** | **string** | | [optional] -**credit_coupon_code** | **string** | | [optional] -**description** | **string** | | [optional] -**id** | **string** | | [optional] -**line_number** | **int** | | [optional] -**plan_name** | **string** | | [optional] -**plan_no** | **float** | | [optional] -**rate_per_unit** | **float** | | [optional] -**rate_schedule_no** | **float** | | [optional] -**rate_schedule_tier_no** | **float** | | [optional] -**service_name** | **string** | | [optional] -**service_no** | **float** | | [optional] -**units** | **float** | | [optional] -**usage_type_cd** | **string** | | [optional] -**usage_type_no** | **float** | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingAzureblobAdditional.md b/docs/Model/LoggingAzureblobAdditional.md index 876e6e3d..c5728052 100644 --- a/docs/Model/LoggingAzureblobAdditional.md +++ b/docs/Model/LoggingAzureblobAdditional.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **container** | **string** | The name of the Azure Blob Storage container in which to store logs. Required. | [optional] **sas_token** | **string** | The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. | [optional] **public_key** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [optional] [defaults to 'null'] -**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingAzureblobResponse.md b/docs/Model/LoggingAzureblobResponse.md index b274ca5d..6487a5a2 100644 --- a/docs/Model/LoggingAzureblobResponse.md +++ b/docs/Model/LoggingAzureblobResponse.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **container** | **string** | The name of the Azure Blob Storage container in which to store logs. Required. | [optional] **sas_token** | **string** | The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. | [optional] **public_key** | **string** | A PGP public key that Fastly will use to encrypt your log files before writing them to disk. | [optional] [defaults to 'null'] -**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) | [optional] +**file_max_bytes** | **int** | The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Results.md b/docs/Model/Results.md index b5be473a..68ff2f62 100644 --- a/docs/Model/Results.md +++ b/docs/Model/Results.md @@ -265,6 +265,13 @@ Name | Type | Description | Notes **request_collapse_usable_count** | **int** | Number of requests that were collapsed and satisfied by a usable cache object. | [optional] **request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] **compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] +**ngwaf_requests_total_count** | **int** | Total number of Next-Gen WAF (Edge WAF & Core WAF) requests. | [optional] +**ngwaf_requests_unknown_count** | **int** | Count of Edge WAF requests with an unknown outcome. | [optional] +**ngwaf_requests_allowed_count** | **int** | Count of Edge WAF requests allowed. | [optional] +**ngwaf_requests_logged_count** | **int** | Count of Edge WAF requests logged. | [optional] +**ngwaf_requests_blocked_count** | **int** | Count of Edge WAF requests blocked. | [optional] +**ngwaf_requests_timeout_count** | **int** | Count of Edge WAF requests timed outcome. | [optional] +**ngwaf_requests_challenged_count** | **int** | Count of Edge WAF requests challenged. | [optional] **service_id** | **string** | | [optional] [readonly] **start_time** | **int** | Timestamp for the start of the time period being reported | [optional] diff --git a/docs/Model/SchemasSnippetResponseCommon.md b/docs/Model/SchemasSnippetResponseCommon.md deleted file mode 100644 index 3071b984..00000000 --- a/docs/Model/SchemasSnippetResponseCommon.md +++ /dev/null @@ -1,15 +0,0 @@ -# # SchemasSnippetResponseCommon - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**service_id** | **string** | | [optional] [readonly] -**version** | **string** | String representing the number identifying a version of the service. | [optional] [readonly] -**id** | **string** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SnippetAllOf.md b/docs/Model/SnippetAllOf.md deleted file mode 100644 index fe33ae8a..00000000 --- a/docs/Model/SnippetAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# # SnippetAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dynamic** | **string** | Sets the snippet version. | [optional] [one of: '0', '1'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SnippetCommon.md b/docs/Model/SnippetCommon.md deleted file mode 100644 index eab442e1..00000000 --- a/docs/Model/SnippetCommon.md +++ /dev/null @@ -1,13 +0,0 @@ -# # SnippetCommon - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name for the snippet. | [optional] -**type** | **string** | The location in generated VCL where the snippet should be placed. | [optional] [one of: 'init', 'recv', 'hash', 'hit', 'miss', 'pass', 'fetch', 'error', 'deliver', 'log', 'none'] -**content** | **string** | The VCL code that specifies exactly what the snippet does. | [optional] -**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SnippetResponseCommonAllOf.md b/docs/Model/SnippetResponseAllOf.md similarity index 93% rename from docs/Model/SnippetResponseCommonAllOf.md rename to docs/Model/SnippetResponseAllOf.md index 7674f021..b152c48e 100644 --- a/docs/Model/SnippetResponseCommonAllOf.md +++ b/docs/Model/SnippetResponseAllOf.md @@ -1,4 +1,4 @@ -# # SnippetResponseCommonAllOf +# # SnippetResponseAllOf ## Properties diff --git a/docs/Model/SnippetResponseCommon.md b/docs/Model/SnippetResponseCommon.md deleted file mode 100644 index aaecf222..00000000 --- a/docs/Model/SnippetResponseCommon.md +++ /dev/null @@ -1,15 +0,0 @@ -# # SnippetResponseCommon - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**service_id** | **string** | | [optional] [readonly] -**version** | **string** | String representing the number identifying a version of the service. | [optional] [readonly] -**id** | **string** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SnippetResponsePost.md b/docs/Model/SnippetResponsePost.md deleted file mode 100644 index 385c8374..00000000 --- a/docs/Model/SnippetResponsePost.md +++ /dev/null @@ -1,20 +0,0 @@ -# # SnippetResponsePost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name for the snippet. | [optional] -**type** | **string** | The location in generated VCL where the snippet should be placed. | [optional] [one of: 'init', 'recv', 'hash', 'hit', 'miss', 'pass', 'fetch', 'error', 'deliver', 'log', 'none'] -**content** | **string** | The VCL code that specifies exactly what the snippet does. | [optional] -**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] -**dynamic** | **float** | Sets the snippet version. | [optional] [one of: 0, 1] -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**service_id** | **string** | | [optional] [readonly] -**version** | **string** | String representing the number identifying a version of the service. | [optional] [readonly] -**id** | **string** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SnippetWithDynamicNumber.md b/docs/Model/SnippetWithDynamicNumber.md deleted file mode 100644 index e0060851..00000000 --- a/docs/Model/SnippetWithDynamicNumber.md +++ /dev/null @@ -1,14 +0,0 @@ -# # SnippetWithDynamicNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | The name for the snippet. | [optional] -**type** | **string** | The location in generated VCL where the snippet should be placed. | [optional] [one of: 'init', 'recv', 'hash', 'hit', 'miss', 'pass', 'fetch', 'error', 'deliver', 'log', 'none'] -**content** | **string** | The VCL code that specifies exactly what the snippet does. | [optional] -**priority** | **string** | Priority determines execution order. Lower numbers execute first. | [optional] [defaults to '100'] -**dynamic** | **float** | Sets the snippet version. | [optional] [one of: 0, 1] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SnippetWithDynamicNumberAllOf.md b/docs/Model/SnippetWithDynamicNumberAllOf.md deleted file mode 100644 index a593b57d..00000000 --- a/docs/Model/SnippetWithDynamicNumberAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# # SnippetWithDynamicNumberAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dynamic** | **float** | Sets the snippet version. | [optional] [one of: 0, 1] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/AutomationTokensApi.php b/lib/Api/AutomationTokensApi.php index c878d73d..1cc81654 100644 --- a/lib/Api/AutomationTokensApi.php +++ b/lib/Api/AutomationTokensApi.php @@ -351,12 +351,12 @@ public function createAutomationTokenRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + ['application/json'], + ['application/json'] ); } @@ -719,11 +719,11 @@ public function getAutomationTokenIdRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json', 'application/problem+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json', 'application/problem+json'], + ['application/json', 'application/problem+json'], [] ); } @@ -1115,11 +1115,11 @@ public function getAutomationTokensIdServicesRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json', 'application/problem+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json', 'application/problem+json'], + ['application/json', 'application/problem+json'], [] ); } @@ -1491,11 +1491,11 @@ public function listAutomationTokensRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json', 'application/problem+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json', 'application/problem+json'], + ['application/json', 'application/problem+json'], [] ); } @@ -1893,11 +1893,11 @@ public function revokeAutomationTokenIdRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json', 'application/problem+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json', 'application/problem+json'], + ['application/json', 'application/problem+json'], [] ); } diff --git a/lib/Api/BillingApi.php b/lib/Api/BillingApi.php deleted file mode 100644 index 3a6f10ef..00000000 --- a/lib/Api/BillingApi.php +++ /dev/null @@ -1,1185 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getInvoice - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $month 2-digit month. (required) - * @param string $year 4-digit year. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\BillingResponse - * @deprecated - */ - public function getInvoice($options) - { - list($response) = $this->getInvoiceWithHttpInfo($options); - return $response; - } - - /** - * Operation getInvoiceWithHttpInfo - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $month 2-digit month. (required) - * @param string $year 4-digit year. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\BillingResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getInvoiceWithHttpInfo($options) - { - $request = $this->getInvoiceRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\BillingResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\BillingResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\BillingResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\BillingResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getInvoiceAsync - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $month 2-digit month. (required) - * @param string $year 4-digit year. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getInvoiceAsync($options) - { - return $this->getInvoiceAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getInvoiceAsyncWithHttpInfo - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $month 2-digit month. (required) - * @param string $year 4-digit year. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getInvoiceAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\BillingResponse'; - $request = $this->getInvoiceRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getInvoice' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $month 2-digit month. (required) - * @param string $year 4-digit year. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getInvoiceRequest($options) - { - // unbox the parameters from the associative array - $month = array_key_exists('month', $options) ? $options['month'] : null; - $year = array_key_exists('year', $options) ? $options['year'] : null; - - // verify the required parameter 'month' is set - if ($month === null || (is_array($month) && count($month) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $month when calling getInvoice' - ); - } - // verify the required parameter 'year' is set - if ($year === null || (is_array($year) && count($year) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $year when calling getInvoice' - ); - } - - $resourcePath = '/billing/v2/year/{year}/month/{month}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($month !== null) { - $resourcePath = str_replace( - '{' . 'month' . '}', - ObjectSerializer::toPathValue($month), - $resourcePath - ); - } - // path params - if ($year !== null) { - $resourcePath = str_replace( - '{' . 'year' . '}', - ObjectSerializer::toPathValue($year), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'text/csv', 'application/pdf'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'application/pdf'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getInvoiceById - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param int $invoice_id invoice_id (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\BillingResponse - * @deprecated - */ - public function getInvoiceById($options) - { - list($response) = $this->getInvoiceByIdWithHttpInfo($options); - return $response; - } - - /** - * Operation getInvoiceByIdWithHttpInfo - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param int $invoice_id (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\BillingResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getInvoiceByIdWithHttpInfo($options) - { - $request = $this->getInvoiceByIdRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\BillingResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\BillingResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\BillingResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\BillingResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getInvoiceByIdAsync - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param int $invoice_id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getInvoiceByIdAsync($options) - { - return $this->getInvoiceByIdAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getInvoiceByIdAsyncWithHttpInfo - * - * Get an invoice - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param int $invoice_id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getInvoiceByIdAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\BillingResponse'; - $request = $this->getInvoiceByIdRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getInvoiceById' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param int $invoice_id (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getInvoiceByIdRequest($options) - { - // unbox the parameters from the associative array - $customer_id = array_key_exists('customer_id', $options) ? $options['customer_id'] : null; - $invoice_id = array_key_exists('invoice_id', $options) ? $options['invoice_id'] : null; - - // verify the required parameter 'customer_id' is set - if ($customer_id === null || (is_array($customer_id) && count($customer_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $customer_id when calling getInvoiceById' - ); - } - // verify the required parameter 'invoice_id' is set - if ($invoice_id === null || (is_array($invoice_id) && count($invoice_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $invoice_id when calling getInvoiceById' - ); - } - - $resourcePath = '/billing/v2/account_customers/{customer_id}/invoices/{invoice_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($customer_id !== null) { - $resourcePath = str_replace( - '{' . 'customer_id' . '}', - ObjectSerializer::toPathValue($customer_id), - $resourcePath - ); - } - // path params - if ($invoice_id !== null) { - $resourcePath = str_replace( - '{' . 'invoice_id' . '}', - ObjectSerializer::toPathValue($invoice_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'text/csv', 'application/pdf'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'text/csv', 'application/pdf'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getInvoiceMtd - * - * Get month-to-date billing estimate - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param string $month 2-digit month. (optional) - * @param string $year 4-digit year. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\BillingEstimateResponse - * @deprecated - */ - public function getInvoiceMtd($options) - { - list($response) = $this->getInvoiceMtdWithHttpInfo($options); - return $response; - } - - /** - * Operation getInvoiceMtdWithHttpInfo - * - * Get month-to-date billing estimate - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param string $month 2-digit month. (optional) - * @param string $year 4-digit year. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\BillingEstimateResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getInvoiceMtdWithHttpInfo($options) - { - $request = $this->getInvoiceMtdRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\BillingEstimateResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\BillingEstimateResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\BillingEstimateResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\BillingEstimateResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getInvoiceMtdAsync - * - * Get month-to-date billing estimate - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param string $month 2-digit month. (optional) - * @param string $year 4-digit year. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getInvoiceMtdAsync($options) - { - return $this->getInvoiceMtdAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getInvoiceMtdAsyncWithHttpInfo - * - * Get month-to-date billing estimate - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param string $month 2-digit month. (optional) - * @param string $year 4-digit year. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getInvoiceMtdAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\BillingEstimateResponse'; - $request = $this->getInvoiceMtdRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getInvoiceMtd' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $customer_id Alphanumeric string identifying the customer. (required) - * @param string $month 2-digit month. (optional) - * @param string $year 4-digit year. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getInvoiceMtdRequest($options) - { - // unbox the parameters from the associative array - $customer_id = array_key_exists('customer_id', $options) ? $options['customer_id'] : null; - $month = array_key_exists('month', $options) ? $options['month'] : null; - $year = array_key_exists('year', $options) ? $options['year'] : null; - - // verify the required parameter 'customer_id' is set - if ($customer_id === null || (is_array($customer_id) && count($customer_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $customer_id when calling getInvoiceMtd' - ); - } - - $resourcePath = '/billing/v2/account_customers/{customer_id}/mtd_invoice'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($month !== null) { - if('form' === 'form' && is_array($month)) { - foreach($month as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['month'] = ObjectSerializer::toString($month); - } - } - // query params - if ($year !== null) { - if('form' === 'form' && is_array($year)) { - foreach($year as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['year'] = ObjectSerializer::toString($year); - } - } - - - // path params - if ($customer_id !== null) { - $resourcePath = str_replace( - '{' . 'customer_id' . '}', - ObjectSerializer::toPathValue($customer_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/BillingUsageMetricsApi.php b/lib/Api/BillingUsageMetricsApi.php index f57550f5..678fe080 100644 --- a/lib/Api/BillingUsageMetricsApi.php +++ b/lib/Api/BillingUsageMetricsApi.php @@ -112,18 +112,19 @@ public function getConfig() /** * Operation getServiceLevelUsage * - * Retrieve service-level usage metrics for a product. + * Retrieve service-level usage metrics for services with non-zero usage units. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. (optional) + * @param string $service The service identifier for the metrics being requested. (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. (optional) * @param string $start_month start_month (optional) * @param string $end_month end_month (optional) - * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \Fastly\ApiException on non-2xx response @@ -139,18 +140,19 @@ public function getServiceLevelUsage($options) /** * Operation getServiceLevelUsageWithHttpInfo * - * Retrieve service-level usage metrics for a product. + * Retrieve service-level usage metrics for services with non-zero usage units. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. (optional) + * @param string $service The service identifier for the metrics being requested. (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. (optional) * @param string $start_month (optional) * @param string $end_month (optional) - * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \Fastly\ApiException on non-2xx response @@ -314,18 +316,19 @@ public function getServiceLevelUsageWithHttpInfo($options) /** * Operation getServiceLevelUsageAsync * - * Retrieve service-level usage metrics for a product. + * Retrieve service-level usage metrics for services with non-zero usage units. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. (optional) + * @param string $service The service identifier for the metrics being requested. (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. (optional) * @param string $start_month (optional) * @param string $end_month (optional) - * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \InvalidArgumentException @@ -344,18 +347,19 @@ function ($response) { /** * Operation getServiceLevelUsageAsyncWithHttpInfo * - * Retrieve service-level usage metrics for a product. + * Retrieve service-level usage metrics for services with non-zero usage units. * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. (optional) + * @param string $service The service identifier for the metrics being requested. (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. (optional) * @param string $start_month (optional) * @param string $end_month (optional) - * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \InvalidArgumentException @@ -407,11 +411,12 @@ function ($exception) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). (optional) - * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). (optional) + * @param string $product_id The product identifier for the metrics returned (e.g., `cdn_usage`). This should be used along with `usage_type_name`. (optional) + * @param string $service The service identifier for the metrics being requested. (optional) + * @param string $usage_type_name The usage type name for the metrics returned (e.g., `North America Requests`). This should be used along with `product_id`. (optional) * @param string $start_month (optional) * @param string $end_month (optional) - * @param string $limit Number of results per page. The maximum is 100. (optional, default to '5') + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \InvalidArgumentException @@ -421,10 +426,11 @@ public function getServiceLevelUsageRequest($options) { // unbox the parameters from the associative array $product_id = array_key_exists('product_id', $options) ? $options['product_id'] : null; + $service = array_key_exists('service', $options) ? $options['service'] : null; $usage_type_name = array_key_exists('usage_type_name', $options) ? $options['usage_type_name'] : null; $start_month = array_key_exists('start_month', $options) ? $options['start_month'] : null; $end_month = array_key_exists('end_month', $options) ? $options['end_month'] : null; - $limit = array_key_exists('limit', $options) ? $options['limit'] : '5'; + $limit = array_key_exists('limit', $options) ? $options['limit'] : '1000'; $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; if ($start_month !== null && !preg_match("/^[0-9]{4}-[0-9]{2}$/", $start_month)) { @@ -455,6 +461,17 @@ public function getServiceLevelUsageRequest($options) } } // query params + if ($service !== null) { + if('form' === 'form' && is_array($service)) { + foreach($service as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['service'] = ObjectSerializer::toString($service); + } + } + // query params if ($usage_type_name !== null) { if('form' === 'form' && is_array($usage_type_name)) { foreach($usage_type_name as $key => $value) { diff --git a/lib/Api/HeaderApi.php b/lib/Api/HeaderApi.php index 7f50a5f6..3a5fbdc0 100644 --- a/lib/Api/HeaderApi.php +++ b/lib/Api/HeaderApi.php @@ -131,8 +131,8 @@ public function getConfig() * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -166,8 +166,8 @@ public function createHeaderObject($options) * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -289,8 +289,8 @@ public function createHeaderObjectWithHttpInfo($options) * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -327,8 +327,8 @@ function ($response) { * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -391,8 +391,8 @@ function ($exception) { * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -413,7 +413,7 @@ public function createHeaderObjectRequest($options) $substitution = array_key_exists('substitution', $options) ? $options['substitution'] : null; $type = array_key_exists('type', $options) ? $options['type'] : null; $ignore_if_set = array_key_exists('ignore_if_set', $options) ? $options['ignore_if_set'] : null; - $priority = array_key_exists('priority', $options) ? $options['priority'] : 100; + $priority = array_key_exists('priority', $options) ? $options['priority'] : '100'; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -1660,8 +1660,8 @@ public function listHeaderObjectsRequest($options) * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1696,8 +1696,8 @@ public function updateHeaderObject($options) * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1820,8 +1820,8 @@ public function updateHeaderObjectWithHttpInfo($options) * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1859,8 +1859,8 @@ function ($response) { * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1924,8 +1924,8 @@ function ($exception) { * @param string $src Variable to be used as a source for the header content. Does not apply to `delete` action. (optional) * @param string $substitution Value to substitute in place of regular expression. Only applies to `regex` and `regex_repeat` actions. (optional) * @param string $type Accepts a string value. (optional) - * @param int $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. (optional) - * @param int $priority Priority determines execution order. Lower numbers execute first. (optional, default to 100) + * @param string $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\\\"0\\\" = false, \\\"1\\\" = true) (optional) + * @param string $priority Priority determines execution order. Lower numbers execute first. (optional, default to '100') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1947,7 +1947,7 @@ public function updateHeaderObjectRequest($options) $substitution = array_key_exists('substitution', $options) ? $options['substitution'] : null; $type = array_key_exists('type', $options) ? $options['type'] : null; $ignore_if_set = array_key_exists('ignore_if_set', $options) ? $options['ignore_if_set'] : null; - $priority = array_key_exists('priority', $options) ? $options['priority'] : 100; + $priority = array_key_exists('priority', $options) ? $options['priority'] : '100'; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { diff --git a/lib/Api/KvStoreItemApi.php b/lib/Api/KvStoreItemApi.php index c4278d06..7077f512 100644 --- a/lib/Api/KvStoreItemApi.php +++ b/lib/Api/KvStoreItemApi.php @@ -448,7 +448,7 @@ public function kvStoreDeleteItemRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SplFileObject + * @return string */ public function kvStoreGetItem($options) { @@ -471,7 +471,7 @@ public function kvStoreGetItem($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SplFileObject, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreGetItemWithHttpInfo($options) { @@ -526,20 +526,20 @@ public function kvStoreGetItemWithHttpInfo($options) switch($statusCode) { case 200: - if ('\SplFileObject' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\SplFileObject', []), + ObjectSerializer::deserialize($content, 'string', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\SplFileObject'; + $returnType = 'string'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -557,7 +557,7 @@ public function kvStoreGetItemWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SplFileObject', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -611,7 +611,7 @@ function ($response) { */ public function kvStoreGetItemAsyncWithHttpInfo($options) { - $returnType = '\SplFileObject'; + $returnType = 'string'; $request = $this->kvStoreGetItemRequest($options); return $this->client @@ -1188,7 +1188,7 @@ public function kvStoreListItemKeysRequest($options) * @param bool $append append (optional, default to false) * @param bool $prepend prepend (optional, default to false) * @param bool $background_fetch background_fetch (optional, default to false) - * @param \SplFileObject $body body (optional) + * @param string $body body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1218,7 +1218,7 @@ public function kvStoreUpsertItem($options) * @param bool $append (optional, default to false) * @param bool $prepend (optional, default to false) * @param bool $background_fetch (optional, default to false) - * @param \SplFileObject $body (optional) + * @param string $body (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1303,7 +1303,7 @@ public function kvStoreUpsertItemWithHttpInfo($options) * @param bool $append (optional, default to false) * @param bool $prepend (optional, default to false) * @param bool $background_fetch (optional, default to false) - * @param \SplFileObject $body (optional) + * @param string $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1337,7 +1337,7 @@ function ($response) { * @param bool $append (optional, default to false) * @param bool $prepend (optional, default to false) * @param bool $background_fetch (optional, default to false) - * @param \SplFileObject $body (optional) + * @param string $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1387,7 +1387,7 @@ function ($exception) { * @param bool $append (optional, default to false) * @param bool $prepend (optional, default to false) * @param bool $background_fetch (optional, default to false) - * @param \SplFileObject $body (optional) + * @param string $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/LoggingAzureblobApi.php b/lib/Api/LoggingAzureblobApi.php index 05785a8c..43013171 100644 --- a/lib/Api/LoggingAzureblobApi.php +++ b/lib/Api/LoggingAzureblobApi.php @@ -136,7 +136,7 @@ public function getConfig() * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -175,7 +175,7 @@ public function createLogAzure($options) * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -302,7 +302,7 @@ public function createLogAzureWithHttpInfo($options) * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -344,7 +344,7 @@ function ($response) { * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -412,7 +412,7 @@ function ($exception) { * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1709,7 +1709,7 @@ public function listLogAzureRequest($options) * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1749,7 +1749,7 @@ public function updateLogAzure($options) * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1877,7 +1877,7 @@ public function updateLogAzureWithHttpInfo($options) * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1920,7 +1920,7 @@ function ($response) { * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1989,7 +1989,7 @@ function ($exception) { * @param string $container The name of the Azure Blob Storage container in which to store logs. Required. (optional) * @param string $sas_token The Azure shared access signature providing write access to the blob service objects. Be sure to update your token before it expires or the logging functionality will not work. Required. (optional) * @param string $public_key A PGP public key that Fastly will use to encrypt your log files before writing them to disk. (optional, default to 'null') - * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) (optional) + * @param int $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/SnippetApi.php b/lib/Api/SnippetApi.php index 99d4c85b..b73b558a 100644 --- a/lib/Api/SnippetApi.php +++ b/lib/Api/SnippetApi.php @@ -129,7 +129,7 @@ public function getConfig() * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\SnippetResponsePost + * @return \Fastly\Model\SnippetResponse */ public function createSnippet($options) { @@ -157,7 +157,7 @@ public function createSnippet($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\SnippetResponsePost, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\SnippetResponse, HTTP status code, HTTP response headers (array of strings) */ public function createSnippetWithHttpInfo($options) { @@ -212,20 +212,20 @@ public function createSnippetWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\SnippetResponsePost' === '\SplFileObject') { + if ('\Fastly\Model\SnippetResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\SnippetResponsePost', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\SnippetResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\SnippetResponsePost'; + $returnType = '\Fastly\Model\SnippetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -243,7 +243,7 @@ public function createSnippetWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\SnippetResponsePost', + '\Fastly\Model\SnippetResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -307,7 +307,7 @@ function ($response) { */ public function createSnippetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\SnippetResponsePost'; + $returnType = '\Fastly\Model\SnippetResponse'; $request = $this->createSnippetRequest($options); return $this->client diff --git a/lib/Api/TlsBulkCertificatesApi.php b/lib/Api/TlsBulkCertificatesApi.php index 8b5c41cc..05feebd8 100644 --- a/lib/Api/TlsBulkCertificatesApi.php +++ b/lib/Api/TlsBulkCertificatesApi.php @@ -719,6 +719,8 @@ public function getTlsBulkCertRequest($options) * URL: https://api.fastly.com * * @param string $filter_tls_domain_id Filter certificates by their matching, fully-qualified domain name. (optional) + * @param string $filter_not_before Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). (optional) + * @param string $filter_not_after Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). (optional) * @param int $page_number Current page. (optional) * @param int $page_size Number of records per page. (optional, default to 20) * @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -744,6 +746,8 @@ public function listTlsBulkCerts($options) * URL: https://api.fastly.com * * @param string $filter_tls_domain_id Filter certificates by their matching, fully-qualified domain name. (optional) + * @param string $filter_not_before Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). (optional) + * @param string $filter_not_after Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). (optional) * @param int $page_number Current page. (optional) * @param int $page_size Number of records per page. (optional, default to 20) * @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -857,6 +861,8 @@ public function listTlsBulkCertsWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $filter_tls_domain_id Filter certificates by their matching, fully-qualified domain name. (optional) + * @param string $filter_not_before Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). (optional) + * @param string $filter_not_after Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). (optional) * @param int $page_number Current page. (optional) * @param int $page_size Number of records per page. (optional, default to 20) * @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -885,6 +891,8 @@ function ($response) { * URL: https://api.fastly.com * * @param string $filter_tls_domain_id Filter certificates by their matching, fully-qualified domain name. (optional) + * @param string $filter_not_before Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). (optional) + * @param string $filter_not_after Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). (optional) * @param int $page_number Current page. (optional) * @param int $page_size Number of records per page. (optional, default to 20) * @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -939,6 +947,8 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $filter_tls_domain_id Filter certificates by their matching, fully-qualified domain name. (optional) + * @param string $filter_not_before Filter the returned certificates by not_before date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_before][gte]=2020-05-05). (optional) + * @param string $filter_not_after Filter the returned certificates by expiry date in UTC. Accepts parameters: lt, lte, gt, gte (e.g., filter[not_after][lte]=2020-05-05). (optional) * @param int $page_number Current page. (optional) * @param int $page_size Number of records per page. (optional, default to 20) * @param string $sort The order in which to list the results by creation date. (optional, default to 'created_at') @@ -950,6 +960,8 @@ public function listTlsBulkCertsRequest($options) { // unbox the parameters from the associative array $filter_tls_domain_id = array_key_exists('filter_tls_domain_id', $options) ? $options['filter_tls_domain_id'] : null; + $filter_not_before = array_key_exists('filter_not_before', $options) ? $options['filter_not_before'] : null; + $filter_not_after = array_key_exists('filter_not_after', $options) ? $options['filter_not_after'] : null; $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; $sort = array_key_exists('sort', $options) ? $options['sort'] : 'created_at'; @@ -981,6 +993,28 @@ public function listTlsBulkCertsRequest($options) } } // query params + if ($filter_not_before !== null) { + if('form' === 'form' && is_array($filter_not_before)) { + foreach($filter_not_before as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['filter[not_before]'] = ObjectSerializer::toString($filter_not_before); + } + } + // query params + if ($filter_not_after !== null) { + if('form' === 'form' && is_array($filter_not_after)) { + foreach($filter_not_after as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['filter[not_after]'] = ObjectSerializer::toString($filter_not_after); + } + } + // query params if ($page_number !== null) { if('form' === 'form' && is_array($page_number)) { foreach($page_number as $key => $value) { diff --git a/lib/Configuration.php b/lib/Configuration.php index 039a89e2..f767af6e 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/7.0.0'; + protected $userAgent = 'fastly-php/8.0.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 7.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 8.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/AutomationToken.php b/lib/Model/AutomationToken.php index 484ec943..0daf6cbd 100644 --- a/lib/Model/AutomationToken.php +++ b/lib/Model/AutomationToken.php @@ -406,7 +406,7 @@ public function getExpiresAt() /** * Sets expires_at * - * @param string|null $expires_at A UTC time-stamp of when the token expires. + * @param string|null $expires_at A UTC timestamp of when the token expires. * * @return self */ diff --git a/lib/Model/AutomationTokenCreateRequestAttributes.php b/lib/Model/AutomationTokenCreateRequestAttributes.php index 34043280..ffa57070 100644 --- a/lib/Model/AutomationTokenCreateRequestAttributes.php +++ b/lib/Model/AutomationTokenCreateRequestAttributes.php @@ -412,7 +412,7 @@ public function getExpiresAt() /** * Sets expires_at * - * @param \DateTime|null $expires_at A UTC time-stamp of when the token will expire. + * @param \DateTime|null $expires_at A UTC timestamp of when the token will expire. * * @return self */ diff --git a/lib/Model/AutomationTokenCreateResponse.php b/lib/Model/AutomationTokenCreateResponse.php index 0e95ca7c..f4d0b5af 100644 --- a/lib/Model/AutomationTokenCreateResponse.php +++ b/lib/Model/AutomationTokenCreateResponse.php @@ -58,14 +58,12 @@ class AutomationTokenCreateResponse implements ModelInterface, ArrayAccess, \Jso 'services' => 'string[]', 'scope' => 'string', 'expires_at' => 'string', - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', 'id' => '\Fastly\Model\ReadOnlyId', 'user_id' => '\Fastly\Model\ReadOnlyUserId', 'customer_id' => '\Fastly\Model\ReadOnlyCustomerId', - 'sudo_expires_at' => '\DateTime', + 'created_at' => '\DateTime', 'access_token' => 'string', + 'tls_access' => 'bool', 'last_used_at' => '\DateTime', 'user_agent' => 'string' ]; @@ -83,14 +81,12 @@ class AutomationTokenCreateResponse implements ModelInterface, ArrayAccess, \Jso 'services' => null, 'scope' => null, 'expires_at' => null, - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', 'id' => null, 'user_id' => null, 'customer_id' => null, - 'sudo_expires_at' => 'date-time', + 'created_at' => 'date-time', 'access_token' => null, + 'tls_access' => null, 'last_used_at' => 'date-time', 'user_agent' => null ]; @@ -127,14 +123,12 @@ public static function fastlyFormats() 'services' => 'services', 'scope' => 'scope', 'expires_at' => 'expires_at', - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', 'id' => 'id', 'user_id' => 'user_id', 'customer_id' => 'customer_id', - 'sudo_expires_at' => 'sudo_expires_at', + 'created_at' => 'created_at', 'access_token' => 'access_token', + 'tls_access' => 'tls_access', 'last_used_at' => 'last_used_at', 'user_agent' => 'user_agent' ]; @@ -150,14 +144,12 @@ public static function fastlyFormats() 'services' => 'setServices', 'scope' => 'setScope', 'expires_at' => 'setExpiresAt', - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', 'id' => 'setId', 'user_id' => 'setUserId', 'customer_id' => 'setCustomerId', - 'sudo_expires_at' => 'setSudoExpiresAt', + 'created_at' => 'setCreatedAt', 'access_token' => 'setAccessToken', + 'tls_access' => 'setTlsAccess', 'last_used_at' => 'setLastUsedAt', 'user_agent' => 'setUserAgent' ]; @@ -173,14 +165,12 @@ public static function fastlyFormats() 'services' => 'getServices', 'scope' => 'getScope', 'expires_at' => 'getExpiresAt', - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', 'id' => 'getId', 'user_id' => 'getUserId', 'customer_id' => 'getCustomerId', - 'sudo_expires_at' => 'getSudoExpiresAt', + 'created_at' => 'getCreatedAt', 'access_token' => 'getAccessToken', + 'tls_access' => 'getTlsAccess', 'last_used_at' => 'getLastUsedAt', 'user_agent' => 'getUserAgent' ]; @@ -283,14 +273,12 @@ public function __construct(array $data = null) $this->container['services'] = $data['services'] ?? null; $this->container['scope'] = $data['scope'] ?? 'global'; $this->container['expires_at'] = $data['expires_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['user_id'] = $data['user_id'] ?? null; $this->container['customer_id'] = $data['customer_id'] ?? null; - $this->container['sudo_expires_at'] = $data['sudo_expires_at'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; $this->container['access_token'] = $data['access_token'] ?? null; + $this->container['tls_access'] = $data['tls_access'] ?? null; $this->container['last_used_at'] = $data['last_used_at'] ?? null; $this->container['user_agent'] = $data['user_agent'] ?? null; } @@ -466,7 +454,7 @@ public function getExpiresAt() /** * Sets expires_at * - * @param string|null $expires_at A UTC time-stamp of when the token expires. + * @param string|null $expires_at A UTC timestamp of when the token expires. * * @return self */ @@ -477,78 +465,6 @@ public function setExpiresAt($expires_at) return $this; } - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at A UTC time-stamp of when the token was created. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - /** * Gets id * @@ -622,25 +538,25 @@ public function setCustomerId($customer_id) } /** - * Gets sudo_expires_at + * Gets created_at * * @return \DateTime|null */ - public function getSudoExpiresAt() + public function getCreatedAt() { - return $this->container['sudo_expires_at']; + return $this->container['created_at']; } /** - * Sets sudo_expires_at + * Sets created_at * - * @param \DateTime|null $sudo_expires_at sudo_expires_at + * @param \DateTime|null $created_at A UTC timestamp of when the token was created. * * @return self */ - public function setSudoExpiresAt($sudo_expires_at) + public function setCreatedAt($created_at) { - $this->container['sudo_expires_at'] = $sudo_expires_at; + $this->container['created_at'] = $created_at; return $this; } @@ -669,6 +585,30 @@ public function setAccessToken($access_token) return $this; } + /** + * Gets tls_access + * + * @return bool|null + */ + public function getTlsAccess() + { + return $this->container['tls_access']; + } + + /** + * Sets tls_access + * + * @param bool|null $tls_access Indicates whether TLS access is enabled for the token. + * + * @return self + */ + public function setTlsAccess($tls_access) + { + $this->container['tls_access'] = $tls_access; + + return $this; + } + /** * Gets last_used_at * @@ -682,7 +622,7 @@ public function getLastUsedAt() /** * Sets last_used_at * - * @param \DateTime|null $last_used_at A UTC time-stamp of when the token was last used. + * @param \DateTime|null $last_used_at A UTC timestamp of when the token was last used. * * @return self */ diff --git a/lib/Model/AutomationTokenCreateResponseAllOf.php b/lib/Model/AutomationTokenCreateResponseAllOf.php index 8fde6fa5..da3c9fa5 100644 --- a/lib/Model/AutomationTokenCreateResponseAllOf.php +++ b/lib/Model/AutomationTokenCreateResponseAllOf.php @@ -56,9 +56,9 @@ class AutomationTokenCreateResponseAllOf implements ModelInterface, ArrayAccess, 'id' => '\Fastly\Model\ReadOnlyId', 'user_id' => '\Fastly\Model\ReadOnlyUserId', 'customer_id' => '\Fastly\Model\ReadOnlyCustomerId', - 'sudo_expires_at' => '\DateTime', 'created_at' => '\DateTime', 'access_token' => 'string', + 'tls_access' => 'bool', 'last_used_at' => '\DateTime', 'user_agent' => 'string' ]; @@ -74,9 +74,9 @@ class AutomationTokenCreateResponseAllOf implements ModelInterface, ArrayAccess, 'id' => null, 'user_id' => null, 'customer_id' => null, - 'sudo_expires_at' => 'date-time', 'created_at' => 'date-time', 'access_token' => null, + 'tls_access' => null, 'last_used_at' => 'date-time', 'user_agent' => null ]; @@ -111,9 +111,9 @@ public static function fastlyFormats() 'id' => 'id', 'user_id' => 'user_id', 'customer_id' => 'customer_id', - 'sudo_expires_at' => 'sudo_expires_at', 'created_at' => 'created_at', 'access_token' => 'access_token', + 'tls_access' => 'tls_access', 'last_used_at' => 'last_used_at', 'user_agent' => 'user_agent' ]; @@ -127,9 +127,9 @@ public static function fastlyFormats() 'id' => 'setId', 'user_id' => 'setUserId', 'customer_id' => 'setCustomerId', - 'sudo_expires_at' => 'setSudoExpiresAt', 'created_at' => 'setCreatedAt', 'access_token' => 'setAccessToken', + 'tls_access' => 'setTlsAccess', 'last_used_at' => 'setLastUsedAt', 'user_agent' => 'setUserAgent' ]; @@ -143,9 +143,9 @@ public static function fastlyFormats() 'id' => 'getId', 'user_id' => 'getUserId', 'customer_id' => 'getCustomerId', - 'sudo_expires_at' => 'getSudoExpiresAt', 'created_at' => 'getCreatedAt', 'access_token' => 'getAccessToken', + 'tls_access' => 'getTlsAccess', 'last_used_at' => 'getLastUsedAt', 'user_agent' => 'getUserAgent' ]; @@ -210,9 +210,9 @@ public function __construct(array $data = null) $this->container['id'] = $data['id'] ?? null; $this->container['user_id'] = $data['user_id'] ?? null; $this->container['customer_id'] = $data['customer_id'] ?? null; - $this->container['sudo_expires_at'] = $data['sudo_expires_at'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['access_token'] = $data['access_token'] ?? null; + $this->container['tls_access'] = $data['tls_access'] ?? null; $this->container['last_used_at'] = $data['last_used_at'] ?? null; $this->container['user_agent'] = $data['user_agent'] ?? null; } @@ -314,73 +314,73 @@ public function setCustomerId($customer_id) } /** - * Gets sudo_expires_at + * Gets created_at * * @return \DateTime|null */ - public function getSudoExpiresAt() + public function getCreatedAt() { - return $this->container['sudo_expires_at']; + return $this->container['created_at']; } /** - * Sets sudo_expires_at + * Sets created_at * - * @param \DateTime|null $sudo_expires_at sudo_expires_at + * @param \DateTime|null $created_at A UTC timestamp of when the token was created. * * @return self */ - public function setSudoExpiresAt($sudo_expires_at) + public function setCreatedAt($created_at) { - $this->container['sudo_expires_at'] = $sudo_expires_at; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets created_at + * Gets access_token * - * @return \DateTime|null + * @return string|null */ - public function getCreatedAt() + public function getAccessToken() { - return $this->container['created_at']; + return $this->container['access_token']; } /** - * Sets created_at + * Sets access_token * - * @param \DateTime|null $created_at A UTC time-stamp of when the token was created. + * @param string|null $access_token access_token * * @return self */ - public function setCreatedAt($created_at) + public function setAccessToken($access_token) { - $this->container['created_at'] = $created_at; + $this->container['access_token'] = $access_token; return $this; } /** - * Gets access_token + * Gets tls_access * - * @return string|null + * @return bool|null */ - public function getAccessToken() + public function getTlsAccess() { - return $this->container['access_token']; + return $this->container['tls_access']; } /** - * Sets access_token + * Sets tls_access * - * @param string|null $access_token access_token + * @param bool|null $tls_access Indicates whether TLS access is enabled for the token. * * @return self */ - public function setAccessToken($access_token) + public function setTlsAccess($tls_access) { - $this->container['access_token'] = $access_token; + $this->container['tls_access'] = $tls_access; return $this; } @@ -398,7 +398,7 @@ public function getLastUsedAt() /** * Sets last_used_at * - * @param \DateTime|null $last_used_at A UTC time-stamp of when the token was last used. + * @param \DateTime|null $last_used_at A UTC timestamp of when the token was last used. * * @return self */ diff --git a/lib/Model/AutomationTokenResponse.php b/lib/Model/AutomationTokenResponse.php index 5c4b258f..14854bd8 100644 --- a/lib/Model/AutomationTokenResponse.php +++ b/lib/Model/AutomationTokenResponse.php @@ -58,15 +58,13 @@ class AutomationTokenResponse implements ModelInterface, ArrayAccess, \JsonSeria 'services' => 'string[]', 'scope' => 'string', 'expires_at' => 'string', - 'created_at' => 'string', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', 'id' => '\Fastly\Model\ReadOnlyId', 'customer_id' => '\Fastly\Model\ReadOnlyCustomerId', 'ip' => 'string', 'user_agent' => 'string', - 'sudo_expires_at' => 'string', - 'last_used_at' => '\DateTime' + 'tls_access' => 'bool', + 'last_used_at' => '\DateTime', + 'created_at' => 'string' ]; /** @@ -82,15 +80,13 @@ class AutomationTokenResponse implements ModelInterface, ArrayAccess, \JsonSeria 'services' => null, 'scope' => null, 'expires_at' => null, - 'created_at' => null, - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', 'id' => null, 'customer_id' => null, 'ip' => null, 'user_agent' => null, - 'sudo_expires_at' => null, - 'last_used_at' => 'date-time' + 'tls_access' => null, + 'last_used_at' => 'date-time', + 'created_at' => null ]; /** @@ -125,15 +121,13 @@ public static function fastlyFormats() 'services' => 'services', 'scope' => 'scope', 'expires_at' => 'expires_at', - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', 'id' => 'id', 'customer_id' => 'customer_id', 'ip' => 'ip', 'user_agent' => 'user_agent', - 'sudo_expires_at' => 'sudo_expires_at', - 'last_used_at' => 'last_used_at' + 'tls_access' => 'tls_access', + 'last_used_at' => 'last_used_at', + 'created_at' => 'created_at' ]; /** @@ -147,15 +141,13 @@ public static function fastlyFormats() 'services' => 'setServices', 'scope' => 'setScope', 'expires_at' => 'setExpiresAt', - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', 'id' => 'setId', 'customer_id' => 'setCustomerId', 'ip' => 'setIp', 'user_agent' => 'setUserAgent', - 'sudo_expires_at' => 'setSudoExpiresAt', - 'last_used_at' => 'setLastUsedAt' + 'tls_access' => 'setTlsAccess', + 'last_used_at' => 'setLastUsedAt', + 'created_at' => 'setCreatedAt' ]; /** @@ -169,15 +161,13 @@ public static function fastlyFormats() 'services' => 'getServices', 'scope' => 'getScope', 'expires_at' => 'getExpiresAt', - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', 'id' => 'getId', 'customer_id' => 'getCustomerId', 'ip' => 'getIp', 'user_agent' => 'getUserAgent', - 'sudo_expires_at' => 'getSudoExpiresAt', - 'last_used_at' => 'getLastUsedAt' + 'tls_access' => 'getTlsAccess', + 'last_used_at' => 'getLastUsedAt', + 'created_at' => 'getCreatedAt' ]; /** @@ -261,15 +251,13 @@ public function __construct(array $data = null) $this->container['services'] = $data['services'] ?? null; $this->container['scope'] = $data['scope'] ?? 'global'; $this->container['expires_at'] = $data['expires_at'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['ip'] = $data['ip'] ?? null; $this->container['user_agent'] = $data['user_agent'] ?? null; - $this->container['sudo_expires_at'] = $data['sudo_expires_at'] ?? null; + $this->container['tls_access'] = $data['tls_access'] ?? null; $this->container['last_used_at'] = $data['last_used_at'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; } /** @@ -424,7 +412,7 @@ public function getExpiresAt() /** * Sets expires_at * - * @param string|null $expires_at (optional) A UTC time-stamp of when the token will expire. + * @param string|null $expires_at (optional) A UTC timestamp of when the token will expire. * * @return self */ @@ -435,78 +423,6 @@ public function setExpiresAt($expires_at) return $this; } - /** - * Gets created_at - * - * @return string|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param string|null $created_at A UTC time-stamp of when the token was created. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - /** * Gets id * @@ -604,25 +520,25 @@ public function setUserAgent($user_agent) } /** - * Gets sudo_expires_at + * Gets tls_access * - * @return string|null + * @return bool|null */ - public function getSudoExpiresAt() + public function getTlsAccess() { - return $this->container['sudo_expires_at']; + return $this->container['tls_access']; } /** - * Sets sudo_expires_at + * Sets tls_access * - * @param string|null $sudo_expires_at sudo_expires_at + * @param bool|null $tls_access Indicates whether TLS access is enabled for the token. * * @return self */ - public function setSudoExpiresAt($sudo_expires_at) + public function setTlsAccess($tls_access) { - $this->container['sudo_expires_at'] = $sudo_expires_at; + $this->container['tls_access'] = $tls_access; return $this; } @@ -640,7 +556,7 @@ public function getLastUsedAt() /** * Sets last_used_at * - * @param \DateTime|null $last_used_at A UTC time-stamp of when the token was last used. + * @param \DateTime|null $last_used_at A UTC timestamp of when the token was last used. * * @return self */ @@ -650,6 +566,30 @@ public function setLastUsedAt($last_used_at) return $this; } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at A UTC timestamp of when the token was created. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/AutomationTokenResponseAllOf.php b/lib/Model/AutomationTokenResponseAllOf.php index 7f51bfb6..c318da89 100644 --- a/lib/Model/AutomationTokenResponseAllOf.php +++ b/lib/Model/AutomationTokenResponseAllOf.php @@ -58,7 +58,7 @@ class AutomationTokenResponseAllOf implements ModelInterface, ArrayAccess, \Json 'role' => 'string', 'ip' => 'string', 'user_agent' => 'string', - 'sudo_expires_at' => 'string', + 'tls_access' => 'bool', 'last_used_at' => '\DateTime', 'created_at' => 'string', 'expires_at' => 'string' @@ -77,7 +77,7 @@ class AutomationTokenResponseAllOf implements ModelInterface, ArrayAccess, \Json 'role' => null, 'ip' => null, 'user_agent' => null, - 'sudo_expires_at' => null, + 'tls_access' => null, 'last_used_at' => 'date-time', 'created_at' => null, 'expires_at' => null @@ -115,7 +115,7 @@ public static function fastlyFormats() 'role' => 'role', 'ip' => 'ip', 'user_agent' => 'user_agent', - 'sudo_expires_at' => 'sudo_expires_at', + 'tls_access' => 'tls_access', 'last_used_at' => 'last_used_at', 'created_at' => 'created_at', 'expires_at' => 'expires_at' @@ -132,7 +132,7 @@ public static function fastlyFormats() 'role' => 'setRole', 'ip' => 'setIp', 'user_agent' => 'setUserAgent', - 'sudo_expires_at' => 'setSudoExpiresAt', + 'tls_access' => 'setTlsAccess', 'last_used_at' => 'setLastUsedAt', 'created_at' => 'setCreatedAt', 'expires_at' => 'setExpiresAt' @@ -149,7 +149,7 @@ public static function fastlyFormats() 'role' => 'getRole', 'ip' => 'getIp', 'user_agent' => 'getUserAgent', - 'sudo_expires_at' => 'getSudoExpiresAt', + 'tls_access' => 'getTlsAccess', 'last_used_at' => 'getLastUsedAt', 'created_at' => 'getCreatedAt', 'expires_at' => 'getExpiresAt' @@ -217,7 +217,7 @@ public function __construct(array $data = null) $this->container['role'] = $data['role'] ?? null; $this->container['ip'] = $data['ip'] ?? null; $this->container['user_agent'] = $data['user_agent'] ?? null; - $this->container['sudo_expires_at'] = $data['sudo_expires_at'] ?? null; + $this->container['tls_access'] = $data['tls_access'] ?? null; $this->container['last_used_at'] = $data['last_used_at'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['expires_at'] = $data['expires_at'] ?? null; @@ -368,25 +368,25 @@ public function setUserAgent($user_agent) } /** - * Gets sudo_expires_at + * Gets tls_access * - * @return string|null + * @return bool|null */ - public function getSudoExpiresAt() + public function getTlsAccess() { - return $this->container['sudo_expires_at']; + return $this->container['tls_access']; } /** - * Sets sudo_expires_at + * Sets tls_access * - * @param string|null $sudo_expires_at sudo_expires_at + * @param bool|null $tls_access Indicates whether TLS access is enabled for the token. * * @return self */ - public function setSudoExpiresAt($sudo_expires_at) + public function setTlsAccess($tls_access) { - $this->container['sudo_expires_at'] = $sudo_expires_at; + $this->container['tls_access'] = $tls_access; return $this; } @@ -404,7 +404,7 @@ public function getLastUsedAt() /** * Sets last_used_at * - * @param \DateTime|null $last_used_at A UTC time-stamp of when the token was last used. + * @param \DateTime|null $last_used_at A UTC timestamp of when the token was last used. * * @return self */ @@ -428,7 +428,7 @@ public function getCreatedAt() /** * Sets created_at * - * @param string|null $created_at A UTC time-stamp of when the token was created. + * @param string|null $created_at A UTC timestamp of when the token was created. * * @return self */ @@ -452,7 +452,7 @@ public function getExpiresAt() /** * Sets expires_at * - * @param string|null $expires_at (optional) A UTC time-stamp of when the token will expire. + * @param string|null $expires_at (optional) A UTC timestamp of when the token will expire. * * @return self */ diff --git a/lib/Model/Billing.php b/lib/Model/Billing.php deleted file mode 100644 index a70378e7..00000000 --- a/lib/Model/Billing.php +++ /dev/null @@ -1,494 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class Billing implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'end_time' => '\DateTime', - 'start_time' => '\DateTime', - 'customer_id' => 'string', - 'vendor_state' => 'string', - 'status' => '\Fastly\Model\BillingStatus', - 'total' => '\Fastly\Model\BillingTotal', - 'regions' => 'array' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'end_time' => 'date-time', - 'start_time' => 'date-time', - 'customer_id' => null, - 'vendor_state' => null, - 'status' => null, - 'total' => null, - 'regions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'end_time' => 'end_time', - 'start_time' => 'start_time', - 'customer_id' => 'customer_id', - 'vendor_state' => 'vendor_state', - 'status' => 'status', - 'total' => 'total', - 'regions' => 'regions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'end_time' => 'setEndTime', - 'start_time' => 'setStartTime', - 'customer_id' => 'setCustomerId', - 'vendor_state' => 'setVendorState', - 'status' => 'setStatus', - 'total' => 'setTotal', - 'regions' => 'setRegions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'end_time' => 'getEndTime', - 'start_time' => 'getStartTime', - 'customer_id' => 'getCustomerId', - 'vendor_state' => 'getVendorState', - 'status' => 'getStatus', - 'total' => 'getTotal', - 'regions' => 'getRegions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['end_time'] = $data['end_time'] ?? null; - $this->container['start_time'] = $data['start_time'] ?? null; - $this->container['customer_id'] = $data['customer_id'] ?? null; - $this->container['vendor_state'] = $data['vendor_state'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['total'] = $data['total'] ?? null; - $this->container['regions'] = $data['regions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets end_time - * - * @return \DateTime|null - */ - public function getEndTime() - { - return $this->container['end_time']; - } - - /** - * Sets end_time - * - * @param \DateTime|null $end_time Date and time in ISO 8601 format. - * - * @return self - */ - public function setEndTime($end_time) - { - $this->container['end_time'] = $end_time; - - return $this; - } - - /** - * Gets start_time - * - * @return \DateTime|null - */ - public function getStartTime() - { - return $this->container['start_time']; - } - - /** - * Sets start_time - * - * @param \DateTime|null $start_time Date and time in ISO 8601 format. - * - * @return self - */ - public function setStartTime($start_time) - { - $this->container['start_time'] = $start_time; - - return $this; - } - - /** - * Gets customer_id - * - * @return string|null - */ - public function getCustomerId() - { - return $this->container['customer_id']; - } - - /** - * Sets customer_id - * - * @param string|null $customer_id customer_id - * - * @return self - */ - public function setCustomerId($customer_id) - { - $this->container['customer_id'] = $customer_id; - - return $this; - } - - /** - * Gets vendor_state - * - * @return string|null - */ - public function getVendorState() - { - return $this->container['vendor_state']; - } - - /** - * Sets vendor_state - * - * @param string|null $vendor_state The current state of our third-party billing vendor. One of `up` or `down`. - * - * @return self - */ - public function setVendorState($vendor_state) - { - $this->container['vendor_state'] = $vendor_state; - - return $this; - } - - /** - * Gets status - * - * @return \Fastly\Model\BillingStatus|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param \Fastly\Model\BillingStatus|null $status status - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets total - * - * @return \Fastly\Model\BillingTotal|null - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param \Fastly\Model\BillingTotal|null $total total - * - * @return self - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - - /** - * Gets regions - * - * @return array|null - */ - public function getRegions() - { - return $this->container['regions']; - } - - /** - * Sets regions - * - * @param array|null $regions Breakdown of regional data for products that are region based. - * - * @return self - */ - public function setRegions($regions) - { - $this->container['regions'] = $regions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingBandwidth.php b/lib/Model/BillingBandwidth.php deleted file mode 100644 index e4a2c0ab..00000000 --- a/lib/Model/BillingBandwidth.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingBandwidth implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_bandwidth'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'total' => 'float', - 'tiers' => '\Fastly\Model\BillingBandwidthTiers[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'total' => null, - 'tiers' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'total' => 'total', - 'tiers' => 'tiers' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'total' => 'setTotal', - 'tiers' => 'setTiers' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'total' => 'getTotal', - 'tiers' => 'getTiers' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['total'] = $data['total'] ?? null; - $this->container['tiers'] = $data['tiers'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets total - * - * @return float|null - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param float|null $total total - * - * @return self - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - - /** - * Gets tiers - * - * @return \Fastly\Model\BillingBandwidthTiers[]|null - */ - public function getTiers() - { - return $this->container['tiers']; - } - - /** - * Sets tiers - * - * @param \Fastly\Model\BillingBandwidthTiers[]|null $tiers tiers - * - * @return self - */ - public function setTiers($tiers) - { - $this->container['tiers'] = $tiers; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingBandwidthTiers.php b/lib/Model/BillingBandwidthTiers.php deleted file mode 100644 index b238d077..00000000 --- a/lib/Model/BillingBandwidthTiers.php +++ /dev/null @@ -1,434 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingBandwidthTiers implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_bandwidth_tiers'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'name' => 'string', - 'units' => 'float', - 'price' => 'float', - 'discounted_price' => 'float', - 'total' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'name' => null, - 'units' => null, - 'price' => null, - 'discounted_price' => null, - 'total' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'units' => 'units', - 'price' => 'price', - 'discounted_price' => 'discounted_price', - 'total' => 'total' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'units' => 'setUnits', - 'price' => 'setPrice', - 'discounted_price' => 'setDiscountedPrice', - 'total' => 'setTotal' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'units' => 'getUnits', - 'price' => 'getPrice', - 'discounted_price' => 'getDiscountedPrice', - 'total' => 'getTotal' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['units'] = $data['units'] ?? null; - $this->container['price'] = $data['price'] ?? null; - $this->container['discounted_price'] = $data['discounted_price'] ?? null; - $this->container['total'] = $data['total'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets units - * - * @return float|null - */ - public function getUnits() - { - return $this->container['units']; - } - - /** - * Sets units - * - * @param float|null $units units - * - * @return self - */ - public function setUnits($units) - { - $this->container['units'] = $units; - - return $this; - } - - /** - * Gets price - * - * @return float|null - */ - public function getPrice() - { - return $this->container['price']; - } - - /** - * Sets price - * - * @param float|null $price price - * - * @return self - */ - public function setPrice($price) - { - $this->container['price'] = $price; - - return $this; - } - - /** - * Gets discounted_price - * - * @return float|null - */ - public function getDiscountedPrice() - { - return $this->container['discounted_price']; - } - - /** - * Sets discounted_price - * - * @param float|null $discounted_price discounted_price - * - * @return self - */ - public function setDiscountedPrice($discounted_price) - { - $this->container['discounted_price'] = $discounted_price; - - return $this; - } - - /** - * Gets total - * - * @return float|null - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param float|null $total total - * - * @return self - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingEstimateInvoiceId.php b/lib/Model/BillingEstimateInvoiceId.php deleted file mode 100644 index d9797b5f..00000000 --- a/lib/Model/BillingEstimateInvoiceId.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingEstimateInvoiceId implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_estimate_invoice_id'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'invoice_id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'invoice_id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'invoice_id' => 'invoice_id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'invoice_id' => 'setInvoiceId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'invoice_id' => 'getInvoiceId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['invoice_id'] = $data['invoice_id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets invoice_id - * - * @return string|null - */ - public function getInvoiceId() - { - return $this->container['invoice_id']; - } - - /** - * Sets invoice_id - * - * @param string|null $invoice_id invoice_id - * - * @return self - */ - public function setInvoiceId($invoice_id) - { - $this->container['invoice_id'] = $invoice_id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingEstimateLines.php b/lib/Model/BillingEstimateLines.php deleted file mode 100644 index 32342a0d..00000000 --- a/lib/Model/BillingEstimateLines.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingEstimateLines implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_estimate_lines'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'line_items' => '\Fastly\Model\BillingEstimateLinesLineItems[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'line_items' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'line_items' => 'line_items' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'line_items' => 'setLineItems' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'line_items' => 'getLineItems' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['line_items'] = $data['line_items'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets line_items - * - * @return \Fastly\Model\BillingEstimateLinesLineItems[]|null - */ - public function getLineItems() - { - return $this->container['line_items']; - } - - /** - * Sets line_items - * - * @param \Fastly\Model\BillingEstimateLinesLineItems[]|null $line_items line_items - * - * @return self - */ - public function setLineItems($line_items) - { - $this->container['line_items'] = $line_items; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingEstimateLinesLineItems.php b/lib/Model/BillingEstimateLinesLineItems.php deleted file mode 100644 index 0f592393..00000000 --- a/lib/Model/BillingEstimateLinesLineItems.php +++ /dev/null @@ -1,554 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingEstimateLinesLineItems implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_estimate_lines_line_items'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'plan_no' => 'int', - 'description' => 'string', - 'units' => 'float', - 'per_unit_cost' => 'float', - 'service_no' => 'float', - 'service_type' => 'string', - 'amount' => 'float', - 'client_service_id' => 'string', - 'client_plan_id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'plan_no' => null, - 'description' => null, - 'units' => null, - 'per_unit_cost' => null, - 'service_no' => null, - 'service_type' => null, - 'amount' => null, - 'client_service_id' => null, - 'client_plan_id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'plan_no' => 'plan_no', - 'description' => 'description', - 'units' => 'units', - 'per_unit_cost' => 'per_unit_cost', - 'service_no' => 'service_no', - 'service_type' => 'service_type', - 'amount' => 'amount', - 'client_service_id' => 'client_service_id', - 'client_plan_id' => 'client_plan_id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'plan_no' => 'setPlanNo', - 'description' => 'setDescription', - 'units' => 'setUnits', - 'per_unit_cost' => 'setPerUnitCost', - 'service_no' => 'setServiceNo', - 'service_type' => 'setServiceType', - 'amount' => 'setAmount', - 'client_service_id' => 'setClientServiceId', - 'client_plan_id' => 'setClientPlanId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'plan_no' => 'getPlanNo', - 'description' => 'getDescription', - 'units' => 'getUnits', - 'per_unit_cost' => 'getPerUnitCost', - 'service_no' => 'getServiceNo', - 'service_type' => 'getServiceType', - 'amount' => 'getAmount', - 'client_service_id' => 'getClientServiceId', - 'client_plan_id' => 'getClientPlanId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['plan_no'] = $data['plan_no'] ?? null; - $this->container['description'] = $data['description'] ?? null; - $this->container['units'] = $data['units'] ?? null; - $this->container['per_unit_cost'] = $data['per_unit_cost'] ?? null; - $this->container['service_no'] = $data['service_no'] ?? null; - $this->container['service_type'] = $data['service_type'] ?? null; - $this->container['amount'] = $data['amount'] ?? null; - $this->container['client_service_id'] = $data['client_service_id'] ?? null; - $this->container['client_plan_id'] = $data['client_plan_id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets plan_no - * - * @return int|null - */ - public function getPlanNo() - { - return $this->container['plan_no']; - } - - /** - * Sets plan_no - * - * @param int|null $plan_no plan_no - * - * @return self - */ - public function setPlanNo($plan_no) - { - $this->container['plan_no'] = $plan_no; - - return $this; - } - - /** - * Gets description - * - * @return string|null - */ - public function getDescription() - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string|null $description description - * - * @return self - */ - public function setDescription($description) - { - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets units - * - * @return float|null - */ - public function getUnits() - { - return $this->container['units']; - } - - /** - * Sets units - * - * @param float|null $units units - * - * @return self - */ - public function setUnits($units) - { - $this->container['units'] = $units; - - return $this; - } - - /** - * Gets per_unit_cost - * - * @return float|null - */ - public function getPerUnitCost() - { - return $this->container['per_unit_cost']; - } - - /** - * Sets per_unit_cost - * - * @param float|null $per_unit_cost per_unit_cost - * - * @return self - */ - public function setPerUnitCost($per_unit_cost) - { - $this->container['per_unit_cost'] = $per_unit_cost; - - return $this; - } - - /** - * Gets service_no - * - * @return float|null - */ - public function getServiceNo() - { - return $this->container['service_no']; - } - - /** - * Sets service_no - * - * @param float|null $service_no service_no - * - * @return self - */ - public function setServiceNo($service_no) - { - $this->container['service_no'] = $service_no; - - return $this; - } - - /** - * Gets service_type - * - * @return string|null - */ - public function getServiceType() - { - return $this->container['service_type']; - } - - /** - * Sets service_type - * - * @param string|null $service_type service_type - * - * @return self - */ - public function setServiceType($service_type) - { - $this->container['service_type'] = $service_type; - - return $this; - } - - /** - * Gets amount - * - * @return float|null - */ - public function getAmount() - { - return $this->container['amount']; - } - - /** - * Sets amount - * - * @param float|null $amount amount - * - * @return self - */ - public function setAmount($amount) - { - $this->container['amount'] = $amount; - - return $this; - } - - /** - * Gets client_service_id - * - * @return string|null - */ - public function getClientServiceId() - { - return $this->container['client_service_id']; - } - - /** - * Sets client_service_id - * - * @param string|null $client_service_id client_service_id - * - * @return self - */ - public function setClientServiceId($client_service_id) - { - $this->container['client_service_id'] = $client_service_id; - - return $this; - } - - /** - * Gets client_plan_id - * - * @return string|null - */ - public function getClientPlanId() - { - return $this->container['client_plan_id']; - } - - /** - * Sets client_plan_id - * - * @param string|null $client_plan_id client_plan_id - * - * @return self - */ - public function setClientPlanId($client_plan_id) - { - $this->container['client_plan_id'] = $client_plan_id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingEstimateResponse.php b/lib/Model/BillingEstimateResponse.php deleted file mode 100644 index 9ef82a44..00000000 --- a/lib/Model/BillingEstimateResponse.php +++ /dev/null @@ -1,554 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_estimate_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'end_time' => '\DateTime', - 'start_time' => '\DateTime', - 'customer_id' => 'string', - 'vendor_state' => 'string', - 'status' => '\Fastly\Model\BillingStatus', - 'total' => '\Fastly\Model\BillingTotal', - 'regions' => 'array', - 'invoice_id' => 'string', - 'line_items' => '\Fastly\Model\BillingEstimateLinesLineItems[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'end_time' => 'date-time', - 'start_time' => 'date-time', - 'customer_id' => null, - 'vendor_state' => null, - 'status' => null, - 'total' => null, - 'regions' => null, - 'invoice_id' => null, - 'line_items' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'end_time' => 'end_time', - 'start_time' => 'start_time', - 'customer_id' => 'customer_id', - 'vendor_state' => 'vendor_state', - 'status' => 'status', - 'total' => 'total', - 'regions' => 'regions', - 'invoice_id' => 'invoice_id', - 'line_items' => 'line_items' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'end_time' => 'setEndTime', - 'start_time' => 'setStartTime', - 'customer_id' => 'setCustomerId', - 'vendor_state' => 'setVendorState', - 'status' => 'setStatus', - 'total' => 'setTotal', - 'regions' => 'setRegions', - 'invoice_id' => 'setInvoiceId', - 'line_items' => 'setLineItems' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'end_time' => 'getEndTime', - 'start_time' => 'getStartTime', - 'customer_id' => 'getCustomerId', - 'vendor_state' => 'getVendorState', - 'status' => 'getStatus', - 'total' => 'getTotal', - 'regions' => 'getRegions', - 'invoice_id' => 'getInvoiceId', - 'line_items' => 'getLineItems' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['end_time'] = $data['end_time'] ?? null; - $this->container['start_time'] = $data['start_time'] ?? null; - $this->container['customer_id'] = $data['customer_id'] ?? null; - $this->container['vendor_state'] = $data['vendor_state'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['total'] = $data['total'] ?? null; - $this->container['regions'] = $data['regions'] ?? null; - $this->container['invoice_id'] = $data['invoice_id'] ?? null; - $this->container['line_items'] = $data['line_items'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets end_time - * - * @return \DateTime|null - */ - public function getEndTime() - { - return $this->container['end_time']; - } - - /** - * Sets end_time - * - * @param \DateTime|null $end_time Date and time in ISO 8601 format. - * - * @return self - */ - public function setEndTime($end_time) - { - $this->container['end_time'] = $end_time; - - return $this; - } - - /** - * Gets start_time - * - * @return \DateTime|null - */ - public function getStartTime() - { - return $this->container['start_time']; - } - - /** - * Sets start_time - * - * @param \DateTime|null $start_time Date and time in ISO 8601 format. - * - * @return self - */ - public function setStartTime($start_time) - { - $this->container['start_time'] = $start_time; - - return $this; - } - - /** - * Gets customer_id - * - * @return string|null - */ - public function getCustomerId() - { - return $this->container['customer_id']; - } - - /** - * Sets customer_id - * - * @param string|null $customer_id customer_id - * - * @return self - */ - public function setCustomerId($customer_id) - { - $this->container['customer_id'] = $customer_id; - - return $this; - } - - /** - * Gets vendor_state - * - * @return string|null - */ - public function getVendorState() - { - return $this->container['vendor_state']; - } - - /** - * Sets vendor_state - * - * @param string|null $vendor_state The current state of our third-party billing vendor. One of `up` or `down`. - * - * @return self - */ - public function setVendorState($vendor_state) - { - $this->container['vendor_state'] = $vendor_state; - - return $this; - } - - /** - * Gets status - * - * @return \Fastly\Model\BillingStatus|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param \Fastly\Model\BillingStatus|null $status status - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets total - * - * @return \Fastly\Model\BillingTotal|null - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param \Fastly\Model\BillingTotal|null $total total - * - * @return self - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - - /** - * Gets regions - * - * @return array|null - */ - public function getRegions() - { - return $this->container['regions']; - } - - /** - * Sets regions - * - * @param array|null $regions Breakdown of regional data for products that are region based. - * - * @return self - */ - public function setRegions($regions) - { - $this->container['regions'] = $regions; - - return $this; - } - - /** - * Gets invoice_id - * - * @return string|null - */ - public function getInvoiceId() - { - return $this->container['invoice_id']; - } - - /** - * Sets invoice_id - * - * @param string|null $invoice_id invoice_id - * - * @return self - */ - public function setInvoiceId($invoice_id) - { - $this->container['invoice_id'] = $invoice_id; - - return $this; - } - - /** - * Gets line_items - * - * @return \Fastly\Model\BillingEstimateLinesLineItems[]|null - */ - public function getLineItems() - { - return $this->container['line_items']; - } - - /** - * Sets line_items - * - * @param \Fastly\Model\BillingEstimateLinesLineItems[]|null $line_items line_items - * - * @return self - */ - public function setLineItems($line_items) - { - $this->container['line_items'] = $line_items; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingInvoiceId.php b/lib/Model/BillingInvoiceId.php deleted file mode 100644 index 1b5550ab..00000000 --- a/lib/Model/BillingInvoiceId.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingInvoiceId implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_invoice_id'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'invoice_id' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'invoice_id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'invoice_id' => 'invoice_id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'invoice_id' => 'setInvoiceId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'invoice_id' => 'getInvoiceId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['invoice_id'] = $data['invoice_id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets invoice_id - * - * @return int|null - */ - public function getInvoiceId() - { - return $this->container['invoice_id']; - } - - /** - * Sets invoice_id - * - * @param int|null $invoice_id invoice_id - * - * @return self - */ - public function setInvoiceId($invoice_id) - { - $this->container['invoice_id'] = $invoice_id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingRegions.php b/lib/Model/BillingRegions.php deleted file mode 100644 index b0a56237..00000000 --- a/lib/Model/BillingRegions.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingRegions implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_regions'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'cost' => 'float', - 'bandwidth' => '\Fastly\Model\BillingBandwidth', - 'percentile' => '\Fastly\Model\BillingBandwidth', - 'requests' => '\Fastly\Model\BillingBandwidth' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'cost' => null, - 'bandwidth' => null, - 'percentile' => null, - 'requests' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'cost' => 'cost', - 'bandwidth' => 'bandwidth', - 'percentile' => 'percentile', - 'requests' => 'requests' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'cost' => 'setCost', - 'bandwidth' => 'setBandwidth', - 'percentile' => 'setPercentile', - 'requests' => 'setRequests' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'cost' => 'getCost', - 'bandwidth' => 'getBandwidth', - 'percentile' => 'getPercentile', - 'requests' => 'getRequests' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['cost'] = $data['cost'] ?? null; - $this->container['bandwidth'] = $data['bandwidth'] ?? null; - $this->container['percentile'] = $data['percentile'] ?? null; - $this->container['requests'] = $data['requests'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets cost - * - * @return float|null - */ - public function getCost() - { - return $this->container['cost']; - } - - /** - * Sets cost - * - * @param float|null $cost cost - * - * @return self - */ - public function setCost($cost) - { - $this->container['cost'] = $cost; - - return $this; - } - - /** - * Gets bandwidth - * - * @return \Fastly\Model\BillingBandwidth|null - */ - public function getBandwidth() - { - return $this->container['bandwidth']; - } - - /** - * Sets bandwidth - * - * @param \Fastly\Model\BillingBandwidth|null $bandwidth bandwidth - * - * @return self - */ - public function setBandwidth($bandwidth) - { - $this->container['bandwidth'] = $bandwidth; - - return $this; - } - - /** - * Gets percentile - * - * @return \Fastly\Model\BillingBandwidth|null - */ - public function getPercentile() - { - return $this->container['percentile']; - } - - /** - * Sets percentile - * - * @param \Fastly\Model\BillingBandwidth|null $percentile percentile - * - * @return self - */ - public function setPercentile($percentile) - { - $this->container['percentile'] = $percentile; - - return $this; - } - - /** - * Gets requests - * - * @return \Fastly\Model\BillingBandwidth|null - */ - public function getRequests() - { - return $this->container['requests']; - } - - /** - * Sets requests - * - * @param \Fastly\Model\BillingBandwidth|null $requests requests - * - * @return self - */ - public function setRequests($requests) - { - $this->container['requests'] = $requests; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingResponse.php b/lib/Model/BillingResponse.php deleted file mode 100644 index 9e4f3cc7..00000000 --- a/lib/Model/BillingResponse.php +++ /dev/null @@ -1,554 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'end_time' => '\DateTime', - 'start_time' => '\DateTime', - 'customer_id' => 'string', - 'vendor_state' => 'string', - 'status' => '\Fastly\Model\BillingStatus', - 'total' => '\Fastly\Model\BillingTotal', - 'regions' => 'array', - 'invoice_id' => 'int', - 'line_items' => '\Fastly\Model\BillingResponseLineItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'end_time' => 'date-time', - 'start_time' => 'date-time', - 'customer_id' => null, - 'vendor_state' => null, - 'status' => null, - 'total' => null, - 'regions' => null, - 'invoice_id' => null, - 'line_items' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'end_time' => 'end_time', - 'start_time' => 'start_time', - 'customer_id' => 'customer_id', - 'vendor_state' => 'vendor_state', - 'status' => 'status', - 'total' => 'total', - 'regions' => 'regions', - 'invoice_id' => 'invoice_id', - 'line_items' => 'line_items' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'end_time' => 'setEndTime', - 'start_time' => 'setStartTime', - 'customer_id' => 'setCustomerId', - 'vendor_state' => 'setVendorState', - 'status' => 'setStatus', - 'total' => 'setTotal', - 'regions' => 'setRegions', - 'invoice_id' => 'setInvoiceId', - 'line_items' => 'setLineItems' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'end_time' => 'getEndTime', - 'start_time' => 'getStartTime', - 'customer_id' => 'getCustomerId', - 'vendor_state' => 'getVendorState', - 'status' => 'getStatus', - 'total' => 'getTotal', - 'regions' => 'getRegions', - 'invoice_id' => 'getInvoiceId', - 'line_items' => 'getLineItems' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['end_time'] = $data['end_time'] ?? null; - $this->container['start_time'] = $data['start_time'] ?? null; - $this->container['customer_id'] = $data['customer_id'] ?? null; - $this->container['vendor_state'] = $data['vendor_state'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['total'] = $data['total'] ?? null; - $this->container['regions'] = $data['regions'] ?? null; - $this->container['invoice_id'] = $data['invoice_id'] ?? null; - $this->container['line_items'] = $data['line_items'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets end_time - * - * @return \DateTime|null - */ - public function getEndTime() - { - return $this->container['end_time']; - } - - /** - * Sets end_time - * - * @param \DateTime|null $end_time Date and time in ISO 8601 format. - * - * @return self - */ - public function setEndTime($end_time) - { - $this->container['end_time'] = $end_time; - - return $this; - } - - /** - * Gets start_time - * - * @return \DateTime|null - */ - public function getStartTime() - { - return $this->container['start_time']; - } - - /** - * Sets start_time - * - * @param \DateTime|null $start_time Date and time in ISO 8601 format. - * - * @return self - */ - public function setStartTime($start_time) - { - $this->container['start_time'] = $start_time; - - return $this; - } - - /** - * Gets customer_id - * - * @return string|null - */ - public function getCustomerId() - { - return $this->container['customer_id']; - } - - /** - * Sets customer_id - * - * @param string|null $customer_id customer_id - * - * @return self - */ - public function setCustomerId($customer_id) - { - $this->container['customer_id'] = $customer_id; - - return $this; - } - - /** - * Gets vendor_state - * - * @return string|null - */ - public function getVendorState() - { - return $this->container['vendor_state']; - } - - /** - * Sets vendor_state - * - * @param string|null $vendor_state The current state of our third-party billing vendor. One of `up` or `down`. - * - * @return self - */ - public function setVendorState($vendor_state) - { - $this->container['vendor_state'] = $vendor_state; - - return $this; - } - - /** - * Gets status - * - * @return \Fastly\Model\BillingStatus|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param \Fastly\Model\BillingStatus|null $status status - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets total - * - * @return \Fastly\Model\BillingTotal|null - */ - public function getTotal() - { - return $this->container['total']; - } - - /** - * Sets total - * - * @param \Fastly\Model\BillingTotal|null $total total - * - * @return self - */ - public function setTotal($total) - { - $this->container['total'] = $total; - - return $this; - } - - /** - * Gets regions - * - * @return array|null - */ - public function getRegions() - { - return $this->container['regions']; - } - - /** - * Sets regions - * - * @param array|null $regions Breakdown of regional data for products that are region based. - * - * @return self - */ - public function setRegions($regions) - { - $this->container['regions'] = $regions; - - return $this; - } - - /** - * Gets invoice_id - * - * @return int|null - */ - public function getInvoiceId() - { - return $this->container['invoice_id']; - } - - /** - * Sets invoice_id - * - * @param int|null $invoice_id invoice_id - * - * @return self - */ - public function setInvoiceId($invoice_id) - { - $this->container['invoice_id'] = $invoice_id; - - return $this; - } - - /** - * Gets line_items - * - * @return \Fastly\Model\BillingResponseLineItem[]|null - */ - public function getLineItems() - { - return $this->container['line_items']; - } - - /** - * Sets line_items - * - * @param \Fastly\Model\BillingResponseLineItem[]|null $line_items line_items - * - * @return self - */ - public function setLineItems($line_items) - { - $this->container['line_items'] = $line_items; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingResponseItemItemsData.php b/lib/Model/BillingResponseItemItemsData.php deleted file mode 100644 index 88e9d5f3..00000000 --- a/lib/Model/BillingResponseItemItemsData.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingResponseItemItemsData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_response_item_items_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'line_items' => '\Fastly\Model\BillingResponseLineItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'line_items' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'line_items' => 'line_items' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'line_items' => 'setLineItems' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'line_items' => 'getLineItems' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['line_items'] = $data['line_items'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets line_items - * - * @return \Fastly\Model\BillingResponseLineItem[]|null - */ - public function getLineItems() - { - return $this->container['line_items']; - } - - /** - * Sets line_items - * - * @param \Fastly\Model\BillingResponseLineItem[]|null $line_items line_items - * - * @return self - */ - public function setLineItems($line_items) - { - $this->container['line_items'] = $line_items; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingResponseLineItem.php b/lib/Model/BillingResponseLineItem.php deleted file mode 100644 index 02c58044..00000000 --- a/lib/Model/BillingResponseLineItem.php +++ /dev/null @@ -1,884 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingResponseLineItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_response_line_item'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'amount' => 'float', - 'aria_invoice_id' => 'string', - 'client_service_id' => 'string', - 'credit_coupon_code' => 'string', - 'description' => 'string', - 'id' => 'string', - 'line_number' => 'int', - 'plan_name' => 'string', - 'plan_no' => 'float', - 'rate_per_unit' => 'float', - 'rate_schedule_no' => 'float', - 'rate_schedule_tier_no' => 'float', - 'service_name' => 'string', - 'service_no' => 'float', - 'units' => 'float', - 'usage_type_cd' => 'string', - 'usage_type_no' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', - 'amount' => null, - 'aria_invoice_id' => null, - 'client_service_id' => null, - 'credit_coupon_code' => null, - 'description' => null, - 'id' => null, - 'line_number' => null, - 'plan_name' => null, - 'plan_no' => null, - 'rate_per_unit' => null, - 'rate_schedule_no' => null, - 'rate_schedule_tier_no' => null, - 'service_name' => null, - 'service_no' => null, - 'units' => null, - 'usage_type_cd' => null, - 'usage_type_no' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', - 'amount' => 'amount', - 'aria_invoice_id' => 'aria_invoice_id', - 'client_service_id' => 'client_service_id', - 'credit_coupon_code' => 'credit_coupon_code', - 'description' => 'description', - 'id' => 'id', - 'line_number' => 'line_number', - 'plan_name' => 'plan_name', - 'plan_no' => 'plan_no', - 'rate_per_unit' => 'rate_per_unit', - 'rate_schedule_no' => 'rate_schedule_no', - 'rate_schedule_tier_no' => 'rate_schedule_tier_no', - 'service_name' => 'service_name', - 'service_no' => 'service_no', - 'units' => 'units', - 'usage_type_cd' => 'usage_type_cd', - 'usage_type_no' => 'usage_type_no' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', - 'amount' => 'setAmount', - 'aria_invoice_id' => 'setAriaInvoiceId', - 'client_service_id' => 'setClientServiceId', - 'credit_coupon_code' => 'setCreditCouponCode', - 'description' => 'setDescription', - 'id' => 'setId', - 'line_number' => 'setLineNumber', - 'plan_name' => 'setPlanName', - 'plan_no' => 'setPlanNo', - 'rate_per_unit' => 'setRatePerUnit', - 'rate_schedule_no' => 'setRateScheduleNo', - 'rate_schedule_tier_no' => 'setRateScheduleTierNo', - 'service_name' => 'setServiceName', - 'service_no' => 'setServiceNo', - 'units' => 'setUnits', - 'usage_type_cd' => 'setUsageTypeCd', - 'usage_type_no' => 'setUsageTypeNo' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', - 'amount' => 'getAmount', - 'aria_invoice_id' => 'getAriaInvoiceId', - 'client_service_id' => 'getClientServiceId', - 'credit_coupon_code' => 'getCreditCouponCode', - 'description' => 'getDescription', - 'id' => 'getId', - 'line_number' => 'getLineNumber', - 'plan_name' => 'getPlanName', - 'plan_no' => 'getPlanNo', - 'rate_per_unit' => 'getRatePerUnit', - 'rate_schedule_no' => 'getRateScheduleNo', - 'rate_schedule_tier_no' => 'getRateScheduleTierNo', - 'service_name' => 'getServiceName', - 'service_no' => 'getServiceNo', - 'units' => 'getUnits', - 'usage_type_cd' => 'getUsageTypeCd', - 'usage_type_no' => 'getUsageTypeNo' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['amount'] = $data['amount'] ?? null; - $this->container['aria_invoice_id'] = $data['aria_invoice_id'] ?? null; - $this->container['client_service_id'] = $data['client_service_id'] ?? null; - $this->container['credit_coupon_code'] = $data['credit_coupon_code'] ?? null; - $this->container['description'] = $data['description'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['line_number'] = $data['line_number'] ?? null; - $this->container['plan_name'] = $data['plan_name'] ?? null; - $this->container['plan_no'] = $data['plan_no'] ?? null; - $this->container['rate_per_unit'] = $data['rate_per_unit'] ?? null; - $this->container['rate_schedule_no'] = $data['rate_schedule_no'] ?? null; - $this->container['rate_schedule_tier_no'] = $data['rate_schedule_tier_no'] ?? null; - $this->container['service_name'] = $data['service_name'] ?? null; - $this->container['service_no'] = $data['service_no'] ?? null; - $this->container['units'] = $data['units'] ?? null; - $this->container['usage_type_cd'] = $data['usage_type_cd'] ?? null; - $this->container['usage_type_no'] = $data['usage_type_no'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets amount - * - * @return float|null - */ - public function getAmount() - { - return $this->container['amount']; - } - - /** - * Sets amount - * - * @param float|null $amount amount - * - * @return self - */ - public function setAmount($amount) - { - $this->container['amount'] = $amount; - - return $this; - } - - /** - * Gets aria_invoice_id - * - * @return string|null - */ - public function getAriaInvoiceId() - { - return $this->container['aria_invoice_id']; - } - - /** - * Sets aria_invoice_id - * - * @param string|null $aria_invoice_id An alphanumeric string identifying the invoice. - * - * @return self - */ - public function setAriaInvoiceId($aria_invoice_id) - { - $this->container['aria_invoice_id'] = $aria_invoice_id; - - return $this; - } - - /** - * Gets client_service_id - * - * @return string|null - */ - public function getClientServiceId() - { - return $this->container['client_service_id']; - } - - /** - * Sets client_service_id - * - * @param string|null $client_service_id client_service_id - * - * @return self - */ - public function setClientServiceId($client_service_id) - { - $this->container['client_service_id'] = $client_service_id; - - return $this; - } - - /** - * Gets credit_coupon_code - * - * @return string|null - */ - public function getCreditCouponCode() - { - return $this->container['credit_coupon_code']; - } - - /** - * Sets credit_coupon_code - * - * @param string|null $credit_coupon_code credit_coupon_code - * - * @return self - */ - public function setCreditCouponCode($credit_coupon_code) - { - $this->container['credit_coupon_code'] = $credit_coupon_code; - - return $this; - } - - /** - * Gets description - * - * @return string|null - */ - public function getDescription() - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string|null $description description - * - * @return self - */ - public function setDescription($description) - { - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets line_number - * - * @return int|null - */ - public function getLineNumber() - { - return $this->container['line_number']; - } - - /** - * Sets line_number - * - * @param int|null $line_number line_number - * - * @return self - */ - public function setLineNumber($line_number) - { - $this->container['line_number'] = $line_number; - - return $this; - } - - /** - * Gets plan_name - * - * @return string|null - */ - public function getPlanName() - { - return $this->container['plan_name']; - } - - /** - * Sets plan_name - * - * @param string|null $plan_name plan_name - * - * @return self - */ - public function setPlanName($plan_name) - { - $this->container['plan_name'] = $plan_name; - - return $this; - } - - /** - * Gets plan_no - * - * @return float|null - */ - public function getPlanNo() - { - return $this->container['plan_no']; - } - - /** - * Sets plan_no - * - * @param float|null $plan_no plan_no - * - * @return self - */ - public function setPlanNo($plan_no) - { - $this->container['plan_no'] = $plan_no; - - return $this; - } - - /** - * Gets rate_per_unit - * - * @return float|null - */ - public function getRatePerUnit() - { - return $this->container['rate_per_unit']; - } - - /** - * Sets rate_per_unit - * - * @param float|null $rate_per_unit rate_per_unit - * - * @return self - */ - public function setRatePerUnit($rate_per_unit) - { - $this->container['rate_per_unit'] = $rate_per_unit; - - return $this; - } - - /** - * Gets rate_schedule_no - * - * @return float|null - */ - public function getRateScheduleNo() - { - return $this->container['rate_schedule_no']; - } - - /** - * Sets rate_schedule_no - * - * @param float|null $rate_schedule_no rate_schedule_no - * - * @return self - */ - public function setRateScheduleNo($rate_schedule_no) - { - $this->container['rate_schedule_no'] = $rate_schedule_no; - - return $this; - } - - /** - * Gets rate_schedule_tier_no - * - * @return float|null - */ - public function getRateScheduleTierNo() - { - return $this->container['rate_schedule_tier_no']; - } - - /** - * Sets rate_schedule_tier_no - * - * @param float|null $rate_schedule_tier_no rate_schedule_tier_no - * - * @return self - */ - public function setRateScheduleTierNo($rate_schedule_tier_no) - { - $this->container['rate_schedule_tier_no'] = $rate_schedule_tier_no; - - return $this; - } - - /** - * Gets service_name - * - * @return string|null - */ - public function getServiceName() - { - return $this->container['service_name']; - } - - /** - * Sets service_name - * - * @param string|null $service_name service_name - * - * @return self - */ - public function setServiceName($service_name) - { - $this->container['service_name'] = $service_name; - - return $this; - } - - /** - * Gets service_no - * - * @return float|null - */ - public function getServiceNo() - { - return $this->container['service_no']; - } - - /** - * Sets service_no - * - * @param float|null $service_no service_no - * - * @return self - */ - public function setServiceNo($service_no) - { - $this->container['service_no'] = $service_no; - - return $this; - } - - /** - * Gets units - * - * @return float|null - */ - public function getUnits() - { - return $this->container['units']; - } - - /** - * Sets units - * - * @param float|null $units units - * - * @return self - */ - public function setUnits($units) - { - $this->container['units'] = $units; - - return $this; - } - - /** - * Gets usage_type_cd - * - * @return string|null - */ - public function getUsageTypeCd() - { - return $this->container['usage_type_cd']; - } - - /** - * Sets usage_type_cd - * - * @param string|null $usage_type_cd usage_type_cd - * - * @return self - */ - public function setUsageTypeCd($usage_type_cd) - { - $this->container['usage_type_cd'] = $usage_type_cd; - - return $this; - } - - /** - * Gets usage_type_no - * - * @return float|null - */ - public function getUsageTypeNo() - { - return $this->container['usage_type_no']; - } - - /** - * Sets usage_type_no - * - * @param float|null $usage_type_no usage_type_no - * - * @return self - */ - public function setUsageTypeNo($usage_type_no) - { - $this->container['usage_type_no'] = $usage_type_no; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingStatus.php b/lib/Model/BillingStatus.php deleted file mode 100644 index f9b348a7..00000000 --- a/lib/Model/BillingStatus.php +++ /dev/null @@ -1,384 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingStatus implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_status'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'status' => 'string', - 'sent_at' => '\DateTime' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'status' => null, - 'sent_at' => 'date-time' - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'status' => 'status', - 'sent_at' => 'sent_at' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'status' => 'setStatus', - 'sent_at' => 'setSentAt' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'status' => 'getStatus', - 'sent_at' => 'getSentAt' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const STATUS_PENDING = 'Pending'; - const STATUS_OUTSTANDING = 'Outstanding'; - const STATUS_PAID = 'Paid'; - const STATUS_MTD = 'MTD'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStatusAllowableValues() - { - return [ - self::STATUS_PENDING, - self::STATUS_OUTSTANDING, - self::STATUS_PAID, - self::STATUS_MTD, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['status'] = $data['status'] ?? null; - $this->container['sent_at'] = $data['sent_at'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'status', must be one of '%s'", - $this->container['status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets status - * - * @return string|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string|null $status What the current status of this invoice can be. - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($status) && !in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets sent_at - * - * @return \DateTime|null - * @deprecated - */ - public function getSentAt() - { - return $this->container['sent_at']; - } - - /** - * Sets sent_at - * - * @param \DateTime|null $sent_at Date and time in ISO 8601 format. - * - * @return self - * @deprecated - */ - public function setSentAt($sent_at) - { - $this->container['sent_at'] = $sent_at; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingTotal.php b/lib/Model/BillingTotal.php deleted file mode 100644 index bc2d60c2..00000000 --- a/lib/Model/BillingTotal.php +++ /dev/null @@ -1,765 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingTotal implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_total'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'bandwidth' => 'float', - 'bandwidth_cost' => 'float', - 'bandwidth_units' => 'string', - 'cost' => 'float', - 'cost_before_discount' => 'float', - 'discount' => 'float', - 'extras' => '\Fastly\Model\BillingTotalExtras[]', - 'extras_cost' => 'float', - 'incurred_cost' => 'float', - 'overage' => 'float', - 'plan_code' => 'string', - 'plan_minimum' => 'float', - 'plan_name' => 'string', - 'requests' => 'float', - 'requests_cost' => 'float', - 'terms' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'bandwidth' => null, - 'bandwidth_cost' => null, - 'bandwidth_units' => null, - 'cost' => null, - 'cost_before_discount' => null, - 'discount' => null, - 'extras' => null, - 'extras_cost' => null, - 'incurred_cost' => null, - 'overage' => null, - 'plan_code' => null, - 'plan_minimum' => null, - 'plan_name' => null, - 'requests' => null, - 'requests_cost' => null, - 'terms' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'bandwidth' => 'bandwidth', - 'bandwidth_cost' => 'bandwidth_cost', - 'bandwidth_units' => 'bandwidth_units', - 'cost' => 'cost', - 'cost_before_discount' => 'cost_before_discount', - 'discount' => 'discount', - 'extras' => 'extras', - 'extras_cost' => 'extras_cost', - 'incurred_cost' => 'incurred_cost', - 'overage' => 'overage', - 'plan_code' => 'plan_code', - 'plan_minimum' => 'plan_minimum', - 'plan_name' => 'plan_name', - 'requests' => 'requests', - 'requests_cost' => 'requests_cost', - 'terms' => 'terms' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'bandwidth' => 'setBandwidth', - 'bandwidth_cost' => 'setBandwidthCost', - 'bandwidth_units' => 'setBandwidthUnits', - 'cost' => 'setCost', - 'cost_before_discount' => 'setCostBeforeDiscount', - 'discount' => 'setDiscount', - 'extras' => 'setExtras', - 'extras_cost' => 'setExtrasCost', - 'incurred_cost' => 'setIncurredCost', - 'overage' => 'setOverage', - 'plan_code' => 'setPlanCode', - 'plan_minimum' => 'setPlanMinimum', - 'plan_name' => 'setPlanName', - 'requests' => 'setRequests', - 'requests_cost' => 'setRequestsCost', - 'terms' => 'setTerms' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'bandwidth' => 'getBandwidth', - 'bandwidth_cost' => 'getBandwidthCost', - 'bandwidth_units' => 'getBandwidthUnits', - 'cost' => 'getCost', - 'cost_before_discount' => 'getCostBeforeDiscount', - 'discount' => 'getDiscount', - 'extras' => 'getExtras', - 'extras_cost' => 'getExtrasCost', - 'incurred_cost' => 'getIncurredCost', - 'overage' => 'getOverage', - 'plan_code' => 'getPlanCode', - 'plan_minimum' => 'getPlanMinimum', - 'plan_name' => 'getPlanName', - 'requests' => 'getRequests', - 'requests_cost' => 'getRequestsCost', - 'terms' => 'getTerms' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['bandwidth'] = $data['bandwidth'] ?? null; - $this->container['bandwidth_cost'] = $data['bandwidth_cost'] ?? null; - $this->container['bandwidth_units'] = $data['bandwidth_units'] ?? null; - $this->container['cost'] = $data['cost'] ?? null; - $this->container['cost_before_discount'] = $data['cost_before_discount'] ?? null; - $this->container['discount'] = $data['discount'] ?? null; - $this->container['extras'] = $data['extras'] ?? null; - $this->container['extras_cost'] = $data['extras_cost'] ?? null; - $this->container['incurred_cost'] = $data['incurred_cost'] ?? null; - $this->container['overage'] = $data['overage'] ?? null; - $this->container['plan_code'] = $data['plan_code'] ?? null; - $this->container['plan_minimum'] = $data['plan_minimum'] ?? null; - $this->container['plan_name'] = $data['plan_name'] ?? null; - $this->container['requests'] = $data['requests'] ?? null; - $this->container['requests_cost'] = $data['requests_cost'] ?? null; - $this->container['terms'] = $data['terms'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets bandwidth - * - * @return float|null - */ - public function getBandwidth() - { - return $this->container['bandwidth']; - } - - /** - * Sets bandwidth - * - * @param float|null $bandwidth The total amount of bandwidth used this month (See bandwidth_units for measurement). - * - * @return self - */ - public function setBandwidth($bandwidth) - { - $this->container['bandwidth'] = $bandwidth; - - return $this; - } - - /** - * Gets bandwidth_cost - * - * @return float|null - */ - public function getBandwidthCost() - { - return $this->container['bandwidth_cost']; - } - - /** - * Sets bandwidth_cost - * - * @param float|null $bandwidth_cost The cost of the bandwidth used this month in USD. - * - * @return self - */ - public function setBandwidthCost($bandwidth_cost) - { - $this->container['bandwidth_cost'] = $bandwidth_cost; - - return $this; - } - - /** - * Gets bandwidth_units - * - * @return string|null - */ - public function getBandwidthUnits() - { - return $this->container['bandwidth_units']; - } - - /** - * Sets bandwidth_units - * - * @param string|null $bandwidth_units Bandwidth measurement units based on billing plan. - * - * @return self - */ - public function setBandwidthUnits($bandwidth_units) - { - $this->container['bandwidth_units'] = $bandwidth_units; - - return $this; - } - - /** - * Gets cost - * - * @return float|null - */ - public function getCost() - { - return $this->container['cost']; - } - - /** - * Sets cost - * - * @param float|null $cost The final amount to be paid. - * - * @return self - */ - public function setCost($cost) - { - $this->container['cost'] = $cost; - - return $this; - } - - /** - * Gets cost_before_discount - * - * @return float|null - */ - public function getCostBeforeDiscount() - { - return $this->container['cost_before_discount']; - } - - /** - * Sets cost_before_discount - * - * @param float|null $cost_before_discount Total incurred cost plus extras cost. - * - * @return self - */ - public function setCostBeforeDiscount($cost_before_discount) - { - $this->container['cost_before_discount'] = $cost_before_discount; - - return $this; - } - - /** - * Gets discount - * - * @return float|null - */ - public function getDiscount() - { - return $this->container['discount']; - } - - /** - * Sets discount - * - * @param float|null $discount Calculated discount rate. - * - * @return self - */ - public function setDiscount($discount) - { - $this->container['discount'] = $discount; - - return $this; - } - - /** - * Gets extras - * - * @return \Fastly\Model\BillingTotalExtras[]|null - */ - public function getExtras() - { - return $this->container['extras']; - } - - /** - * Sets extras - * - * @param \Fastly\Model\BillingTotalExtras[]|null $extras A list of any extras for this invoice. - * - * @return self - */ - public function setExtras($extras) - { - $this->container['extras'] = $extras; - - return $this; - } - - /** - * Gets extras_cost - * - * @return float|null - */ - public function getExtrasCost() - { - return $this->container['extras_cost']; - } - - /** - * Sets extras_cost - * - * @param float|null $extras_cost Total cost of all extras. - * - * @return self - */ - public function setExtrasCost($extras_cost) - { - $this->container['extras_cost'] = $extras_cost; - - return $this; - } - - /** - * Gets incurred_cost - * - * @return float|null - */ - public function getIncurredCost() - { - return $this->container['incurred_cost']; - } - - /** - * Sets incurred_cost - * - * @param float|null $incurred_cost The total cost of bandwidth and requests used this month. - * - * @return self - */ - public function setIncurredCost($incurred_cost) - { - $this->container['incurred_cost'] = $incurred_cost; - - return $this; - } - - /** - * Gets overage - * - * @return float|null - */ - public function getOverage() - { - return $this->container['overage']; - } - - /** - * Sets overage - * - * @param float|null $overage How much over the plan minimum has been incurred. - * - * @return self - */ - public function setOverage($overage) - { - $this->container['overage'] = $overage; - - return $this; - } - - /** - * Gets plan_code - * - * @return string|null - */ - public function getPlanCode() - { - return $this->container['plan_code']; - } - - /** - * Sets plan_code - * - * @param string|null $plan_code The short code the plan this invoice was generated under. - * - * @return self - */ - public function setPlanCode($plan_code) - { - $this->container['plan_code'] = $plan_code; - - return $this; - } - - /** - * Gets plan_minimum - * - * @return float|null - */ - public function getPlanMinimum() - { - return $this->container['plan_minimum']; - } - - /** - * Sets plan_minimum - * - * @param float|null $plan_minimum The minimum cost of this plan. - * - * @return self - */ - public function setPlanMinimum($plan_minimum) - { - $this->container['plan_minimum'] = $plan_minimum; - - return $this; - } - - /** - * Gets plan_name - * - * @return string|null - */ - public function getPlanName() - { - return $this->container['plan_name']; - } - - /** - * Sets plan_name - * - * @param string|null $plan_name The name of the plan this invoice was generated under. - * - * @return self - */ - public function setPlanName($plan_name) - { - $this->container['plan_name'] = $plan_name; - - return $this; - } - - /** - * Gets requests - * - * @return float|null - */ - public function getRequests() - { - return $this->container['requests']; - } - - /** - * Sets requests - * - * @param float|null $requests The total number of requests used this month. - * - * @return self - */ - public function setRequests($requests) - { - $this->container['requests'] = $requests; - - return $this; - } - - /** - * Gets requests_cost - * - * @return float|null - */ - public function getRequestsCost() - { - return $this->container['requests_cost']; - } - - /** - * Sets requests_cost - * - * @param float|null $requests_cost The cost of the requests used this month. - * - * @return self - */ - public function setRequestsCost($requests_cost) - { - $this->container['requests_cost'] = $requests_cost; - - return $this; - } - - /** - * Gets terms - * - * @return string|null - */ - public function getTerms() - { - return $this->container['terms']; - } - - /** - * Sets terms - * - * @param string|null $terms Payment terms. Almost always Net15. - * - * @return self - */ - public function setTerms($terms) - { - $this->container['terms'] = $terms; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/BillingTotalExtras.php b/lib/Model/BillingTotalExtras.php deleted file mode 100644 index 7f2da812..00000000 --- a/lib/Model/BillingTotalExtras.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class BillingTotalExtras implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'billing_total_extras'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'name' => 'string', - 'recurring' => 'float', - 'setup' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'name' => null, - 'recurring' => null, - 'setup' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'recurring' => 'recurring', - 'setup' => 'setup' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'recurring' => 'setRecurring', - 'setup' => 'setSetup' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'recurring' => 'getRecurring', - 'setup' => 'getSetup' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['recurring'] = $data['recurring'] ?? null; - $this->container['setup'] = $data['setup'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name of this extra cost. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets recurring - * - * @return float|null - */ - public function getRecurring() - { - return $this->container['recurring']; - } - - /** - * Sets recurring - * - * @param float|null $recurring Recurring monthly cost in USD. Not present if $0.0. - * - * @return self - */ - public function setRecurring($recurring) - { - $this->container['recurring'] = $recurring; - - return $this; - } - - /** - * Gets setup - * - * @return float|null - */ - public function getSetup() - { - return $this->container['setup']; - } - - /** - * Sets setup - * - * @param float|null $setup Initial set up cost in USD. Not present if $0.0 or this is not the month the extra was added. - * - * @return self - */ - public function setSetup($setup) - { - $this->container['setup'] = $setup; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/ComputeAclListEntriesMeta.php b/lib/Model/ComputeAclListEntriesMeta.php index 3c8ec9b9..cf0750aa 100644 --- a/lib/Model/ComputeAclListEntriesMeta.php +++ b/lib/Model/ComputeAclListEntriesMeta.php @@ -53,7 +53,7 @@ class ComputeAclListEntriesMeta implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $fastlyTypes = [ - 'limit' => 'string', + 'limit' => 'int', 'next_cursor' => 'string' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets limit * - * @return string|null + * @return int|null */ public function getLimit() { @@ -218,7 +218,7 @@ public function getLimit() /** * Sets limit * - * @param string|null $limit The maximum number of results shown in this response. + * @param int|null $limit The maximum number of results shown in this response. * * @return self */ diff --git a/lib/Model/Header.php b/lib/Model/Header.php index 899f2b35..2538d27b 100644 --- a/lib/Model/Header.php +++ b/lib/Model/Header.php @@ -62,7 +62,9 @@ class Header implements ModelInterface, ArrayAccess, \JsonSerializable 'response_condition' => 'string', 'src' => 'string', 'substitution' => 'string', - 'type' => 'string' + 'type' => 'string', + 'ignore_if_set' => 'string', + 'priority' => 'string' ]; /** @@ -82,7 +84,9 @@ class Header implements ModelInterface, ArrayAccess, \JsonSerializable 'response_condition' => null, 'src' => null, 'substitution' => null, - 'type' => null + 'type' => null, + 'ignore_if_set' => null, + 'priority' => null ]; /** @@ -121,7 +125,9 @@ public static function fastlyFormats() 'response_condition' => 'response_condition', 'src' => 'src', 'substitution' => 'substitution', - 'type' => 'type' + 'type' => 'type', + 'ignore_if_set' => 'ignore_if_set', + 'priority' => 'priority' ]; /** @@ -139,7 +145,9 @@ public static function fastlyFormats() 'response_condition' => 'setResponseCondition', 'src' => 'setSrc', 'substitution' => 'setSubstitution', - 'type' => 'setType' + 'type' => 'setType', + 'ignore_if_set' => 'setIgnoreIfSet', + 'priority' => 'setPriority' ]; /** @@ -157,7 +165,9 @@ public static function fastlyFormats() 'response_condition' => 'getResponseCondition', 'src' => 'getSrc', 'substitution' => 'getSubstitution', - 'type' => 'getType' + 'type' => 'getType', + 'ignore_if_set' => 'getIgnoreIfSet', + 'priority' => 'getPriority' ]; /** @@ -265,6 +275,8 @@ public function __construct(array $data = null) $this->container['src'] = $data['src'] ?? null; $this->container['substitution'] = $data['substitution'] ?? null; $this->container['type'] = $data['type'] ?? null; + $this->container['ignore_if_set'] = $data['ignore_if_set'] ?? null; + $this->container['priority'] = $data['priority'] ?? '100'; } /** @@ -568,6 +580,54 @@ public function setType($type) return $this; } + + /** + * Gets ignore_if_set + * + * @return string|null + */ + public function getIgnoreIfSet() + { + return $this->container['ignore_if_set']; + } + + /** + * Sets ignore_if_set + * + * @param string|null $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\"0\" = false, \"1\" = true) + * + * @return self + */ + public function setIgnoreIfSet($ignore_if_set) + { + $this->container['ignore_if_set'] = $ignore_if_set; + + return $this; + } + + /** + * Gets priority + * + * @return string|null + */ + public function getPriority() + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param string|null $priority Priority determines execution order. Lower numbers execute first. + * + * @return self + */ + public function setPriority($priority) + { + $this->container['priority'] = $priority; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/HeaderResponseAdditional.php b/lib/Model/HeaderResponseAdditional.php deleted file mode 100644 index cefe0815..00000000 --- a/lib/Model/HeaderResponseAdditional.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class HeaderResponseAdditional implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'header_response_additional'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'ignore_if_set' => 'string', - 'priority' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'ignore_if_set' => null, - 'priority' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'ignore_if_set' => 'ignore_if_set', - 'priority' => 'priority' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'ignore_if_set' => 'setIgnoreIfSet', - 'priority' => 'setPriority' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'ignore_if_set' => 'getIgnoreIfSet', - 'priority' => 'getPriority' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['ignore_if_set'] = $data['ignore_if_set'] ?? null; - $this->container['priority'] = $data['priority'] ?? '100'; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets ignore_if_set - * - * @return string|null - */ - public function getIgnoreIfSet() - { - return $this->container['ignore_if_set']; - } - - /** - * Sets ignore_if_set - * - * @param string|null $ignore_if_set Don't add the header if it is added already. Only applies to 'set' action. Numerical value (\"0\" = false, \"1\" = true) - * - * @return self - */ - public function setIgnoreIfSet($ignore_if_set) - { - $this->container['ignore_if_set'] = $ignore_if_set; - - return $this; - } - - /** - * Gets priority - * - * @return string|null - */ - public function getPriority() - { - return $this->container['priority']; - } - - /** - * Sets priority - * - * @param string|null $priority Priority determines execution order. Lower numbers execute first. - * - * @return self - */ - public function setPriority($priority) - { - $this->container['priority'] = $priority; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LineItemData.php b/lib/Model/LineItemData.php deleted file mode 100644 index 1d86d21d..00000000 --- a/lib/Model/LineItemData.php +++ /dev/null @@ -1,794 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class LineItemData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'line_item_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'amount' => 'float', - 'aria_invoice_id' => 'string', - 'client_service_id' => 'string', - 'credit_coupon_code' => 'string', - 'description' => 'string', - 'id' => 'string', - 'line_number' => 'int', - 'plan_name' => 'string', - 'plan_no' => 'float', - 'rate_per_unit' => 'float', - 'rate_schedule_no' => 'float', - 'rate_schedule_tier_no' => 'float', - 'service_name' => 'string', - 'service_no' => 'float', - 'units' => 'float', - 'usage_type_cd' => 'string', - 'usage_type_no' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'amount' => null, - 'aria_invoice_id' => null, - 'client_service_id' => null, - 'credit_coupon_code' => null, - 'description' => null, - 'id' => null, - 'line_number' => null, - 'plan_name' => null, - 'plan_no' => null, - 'rate_per_unit' => null, - 'rate_schedule_no' => null, - 'rate_schedule_tier_no' => null, - 'service_name' => null, - 'service_no' => null, - 'units' => null, - 'usage_type_cd' => null, - 'usage_type_no' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'amount' => 'amount', - 'aria_invoice_id' => 'aria_invoice_id', - 'client_service_id' => 'client_service_id', - 'credit_coupon_code' => 'credit_coupon_code', - 'description' => 'description', - 'id' => 'id', - 'line_number' => 'line_number', - 'plan_name' => 'plan_name', - 'plan_no' => 'plan_no', - 'rate_per_unit' => 'rate_per_unit', - 'rate_schedule_no' => 'rate_schedule_no', - 'rate_schedule_tier_no' => 'rate_schedule_tier_no', - 'service_name' => 'service_name', - 'service_no' => 'service_no', - 'units' => 'units', - 'usage_type_cd' => 'usage_type_cd', - 'usage_type_no' => 'usage_type_no' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'amount' => 'setAmount', - 'aria_invoice_id' => 'setAriaInvoiceId', - 'client_service_id' => 'setClientServiceId', - 'credit_coupon_code' => 'setCreditCouponCode', - 'description' => 'setDescription', - 'id' => 'setId', - 'line_number' => 'setLineNumber', - 'plan_name' => 'setPlanName', - 'plan_no' => 'setPlanNo', - 'rate_per_unit' => 'setRatePerUnit', - 'rate_schedule_no' => 'setRateScheduleNo', - 'rate_schedule_tier_no' => 'setRateScheduleTierNo', - 'service_name' => 'setServiceName', - 'service_no' => 'setServiceNo', - 'units' => 'setUnits', - 'usage_type_cd' => 'setUsageTypeCd', - 'usage_type_no' => 'setUsageTypeNo' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'amount' => 'getAmount', - 'aria_invoice_id' => 'getAriaInvoiceId', - 'client_service_id' => 'getClientServiceId', - 'credit_coupon_code' => 'getCreditCouponCode', - 'description' => 'getDescription', - 'id' => 'getId', - 'line_number' => 'getLineNumber', - 'plan_name' => 'getPlanName', - 'plan_no' => 'getPlanNo', - 'rate_per_unit' => 'getRatePerUnit', - 'rate_schedule_no' => 'getRateScheduleNo', - 'rate_schedule_tier_no' => 'getRateScheduleTierNo', - 'service_name' => 'getServiceName', - 'service_no' => 'getServiceNo', - 'units' => 'getUnits', - 'usage_type_cd' => 'getUsageTypeCd', - 'usage_type_no' => 'getUsageTypeNo' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['amount'] = $data['amount'] ?? null; - $this->container['aria_invoice_id'] = $data['aria_invoice_id'] ?? null; - $this->container['client_service_id'] = $data['client_service_id'] ?? null; - $this->container['credit_coupon_code'] = $data['credit_coupon_code'] ?? null; - $this->container['description'] = $data['description'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['line_number'] = $data['line_number'] ?? null; - $this->container['plan_name'] = $data['plan_name'] ?? null; - $this->container['plan_no'] = $data['plan_no'] ?? null; - $this->container['rate_per_unit'] = $data['rate_per_unit'] ?? null; - $this->container['rate_schedule_no'] = $data['rate_schedule_no'] ?? null; - $this->container['rate_schedule_tier_no'] = $data['rate_schedule_tier_no'] ?? null; - $this->container['service_name'] = $data['service_name'] ?? null; - $this->container['service_no'] = $data['service_no'] ?? null; - $this->container['units'] = $data['units'] ?? null; - $this->container['usage_type_cd'] = $data['usage_type_cd'] ?? null; - $this->container['usage_type_no'] = $data['usage_type_no'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets amount - * - * @return float|null - */ - public function getAmount() - { - return $this->container['amount']; - } - - /** - * Sets amount - * - * @param float|null $amount amount - * - * @return self - */ - public function setAmount($amount) - { - $this->container['amount'] = $amount; - - return $this; - } - - /** - * Gets aria_invoice_id - * - * @return string|null - */ - public function getAriaInvoiceId() - { - return $this->container['aria_invoice_id']; - } - - /** - * Sets aria_invoice_id - * - * @param string|null $aria_invoice_id An alphanumeric string identifying the invoice. - * - * @return self - */ - public function setAriaInvoiceId($aria_invoice_id) - { - $this->container['aria_invoice_id'] = $aria_invoice_id; - - return $this; - } - - /** - * Gets client_service_id - * - * @return string|null - */ - public function getClientServiceId() - { - return $this->container['client_service_id']; - } - - /** - * Sets client_service_id - * - * @param string|null $client_service_id client_service_id - * - * @return self - */ - public function setClientServiceId($client_service_id) - { - $this->container['client_service_id'] = $client_service_id; - - return $this; - } - - /** - * Gets credit_coupon_code - * - * @return string|null - */ - public function getCreditCouponCode() - { - return $this->container['credit_coupon_code']; - } - - /** - * Sets credit_coupon_code - * - * @param string|null $credit_coupon_code credit_coupon_code - * - * @return self - */ - public function setCreditCouponCode($credit_coupon_code) - { - $this->container['credit_coupon_code'] = $credit_coupon_code; - - return $this; - } - - /** - * Gets description - * - * @return string|null - */ - public function getDescription() - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string|null $description description - * - * @return self - */ - public function setDescription($description) - { - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets line_number - * - * @return int|null - */ - public function getLineNumber() - { - return $this->container['line_number']; - } - - /** - * Sets line_number - * - * @param int|null $line_number line_number - * - * @return self - */ - public function setLineNumber($line_number) - { - $this->container['line_number'] = $line_number; - - return $this; - } - - /** - * Gets plan_name - * - * @return string|null - */ - public function getPlanName() - { - return $this->container['plan_name']; - } - - /** - * Sets plan_name - * - * @param string|null $plan_name plan_name - * - * @return self - */ - public function setPlanName($plan_name) - { - $this->container['plan_name'] = $plan_name; - - return $this; - } - - /** - * Gets plan_no - * - * @return float|null - */ - public function getPlanNo() - { - return $this->container['plan_no']; - } - - /** - * Sets plan_no - * - * @param float|null $plan_no plan_no - * - * @return self - */ - public function setPlanNo($plan_no) - { - $this->container['plan_no'] = $plan_no; - - return $this; - } - - /** - * Gets rate_per_unit - * - * @return float|null - */ - public function getRatePerUnit() - { - return $this->container['rate_per_unit']; - } - - /** - * Sets rate_per_unit - * - * @param float|null $rate_per_unit rate_per_unit - * - * @return self - */ - public function setRatePerUnit($rate_per_unit) - { - $this->container['rate_per_unit'] = $rate_per_unit; - - return $this; - } - - /** - * Gets rate_schedule_no - * - * @return float|null - */ - public function getRateScheduleNo() - { - return $this->container['rate_schedule_no']; - } - - /** - * Sets rate_schedule_no - * - * @param float|null $rate_schedule_no rate_schedule_no - * - * @return self - */ - public function setRateScheduleNo($rate_schedule_no) - { - $this->container['rate_schedule_no'] = $rate_schedule_no; - - return $this; - } - - /** - * Gets rate_schedule_tier_no - * - * @return float|null - */ - public function getRateScheduleTierNo() - { - return $this->container['rate_schedule_tier_no']; - } - - /** - * Sets rate_schedule_tier_no - * - * @param float|null $rate_schedule_tier_no rate_schedule_tier_no - * - * @return self - */ - public function setRateScheduleTierNo($rate_schedule_tier_no) - { - $this->container['rate_schedule_tier_no'] = $rate_schedule_tier_no; - - return $this; - } - - /** - * Gets service_name - * - * @return string|null - */ - public function getServiceName() - { - return $this->container['service_name']; - } - - /** - * Sets service_name - * - * @param string|null $service_name service_name - * - * @return self - */ - public function setServiceName($service_name) - { - $this->container['service_name'] = $service_name; - - return $this; - } - - /** - * Gets service_no - * - * @return float|null - */ - public function getServiceNo() - { - return $this->container['service_no']; - } - - /** - * Sets service_no - * - * @param float|null $service_no service_no - * - * @return self - */ - public function setServiceNo($service_no) - { - $this->container['service_no'] = $service_no; - - return $this; - } - - /** - * Gets units - * - * @return float|null - */ - public function getUnits() - { - return $this->container['units']; - } - - /** - * Sets units - * - * @param float|null $units units - * - * @return self - */ - public function setUnits($units) - { - $this->container['units'] = $units; - - return $this; - } - - /** - * Gets usage_type_cd - * - * @return string|null - */ - public function getUsageTypeCd() - { - return $this->container['usage_type_cd']; - } - - /** - * Sets usage_type_cd - * - * @param string|null $usage_type_cd usage_type_cd - * - * @return self - */ - public function setUsageTypeCd($usage_type_cd) - { - $this->container['usage_type_cd'] = $usage_type_cd; - - return $this; - } - - /** - * Gets usage_type_no - * - * @return float|null - */ - public function getUsageTypeNo() - { - return $this->container['usage_type_no']; - } - - /** - * Sets usage_type_no - * - * @param float|null $usage_type_no usage_type_no - * - * @return self - */ - public function setUsageTypeNo($usage_type_no) - { - $this->container['usage_type_no'] = $usage_type_no; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/LoggingAzureblobAdditional.php b/lib/Model/LoggingAzureblobAdditional.php index 754f3cd6..72e4c86e 100644 --- a/lib/Model/LoggingAzureblobAdditional.php +++ b/lib/Model/LoggingAzureblobAdditional.php @@ -366,7 +366,7 @@ public function getFileMaxBytes() /** * Sets file_max_bytes * - * @param int|null $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) + * @param int|null $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). * * @return self */ diff --git a/lib/Model/LoggingAzureblobResponse.php b/lib/Model/LoggingAzureblobResponse.php index df551509..a54cd3a5 100644 --- a/lib/Model/LoggingAzureblobResponse.php +++ b/lib/Model/LoggingAzureblobResponse.php @@ -960,7 +960,7 @@ public function getFileMaxBytes() /** * Sets file_max_bytes * - * @param int|null $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB.) + * @param int|null $file_max_bytes The maximum number of bytes for each uploaded file. A value of 0 can be used to indicate there is no limit on the size of uploaded files, otherwise the minimum value is 1048576 bytes (1 MiB). Note that Microsoft Azure Storage has [block size limits](https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id#remarks). * * @return self */ diff --git a/lib/Model/Results.php b/lib/Model/Results.php index 88f08093..e2b2d4de 100644 --- a/lib/Model/Results.php +++ b/lib/Model/Results.php @@ -315,6 +315,13 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'request_collapse_usable_count' => 'int', 'request_collapse_unusable_count' => 'int', 'compute_cache_operations_count' => 'int', + 'ngwaf_requests_total_count' => 'int', + 'ngwaf_requests_unknown_count' => 'int', + 'ngwaf_requests_allowed_count' => 'int', + 'ngwaf_requests_logged_count' => 'int', + 'ngwaf_requests_blocked_count' => 'int', + 'ngwaf_requests_timeout_count' => 'int', + 'ngwaf_requests_challenged_count' => 'int', 'service_id' => 'string', 'start_time' => 'int' ]; @@ -588,6 +595,13 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'request_collapse_usable_count' => 'int64', 'request_collapse_unusable_count' => 'int64', 'compute_cache_operations_count' => 'int64', + 'ngwaf_requests_total_count' => null, + 'ngwaf_requests_unknown_count' => null, + 'ngwaf_requests_allowed_count' => null, + 'ngwaf_requests_logged_count' => null, + 'ngwaf_requests_blocked_count' => null, + 'ngwaf_requests_timeout_count' => null, + 'ngwaf_requests_challenged_count' => null, 'service_id' => null, 'start_time' => 'int64' ]; @@ -880,6 +894,13 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'request_collapse_usable_count', 'request_collapse_unusable_count' => 'request_collapse_unusable_count', 'compute_cache_operations_count' => 'compute_cache_operations_count', + 'ngwaf_requests_total_count' => 'ngwaf_requests_total_count', + 'ngwaf_requests_unknown_count' => 'ngwaf_requests_unknown_count', + 'ngwaf_requests_allowed_count' => 'ngwaf_requests_allowed_count', + 'ngwaf_requests_logged_count' => 'ngwaf_requests_logged_count', + 'ngwaf_requests_blocked_count' => 'ngwaf_requests_blocked_count', + 'ngwaf_requests_timeout_count' => 'ngwaf_requests_timeout_count', + 'ngwaf_requests_challenged_count' => 'ngwaf_requests_challenged_count', 'service_id' => 'service_id', 'start_time' => 'start_time' ]; @@ -1151,6 +1172,13 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', 'compute_cache_operations_count' => 'setComputeCacheOperationsCount', + 'ngwaf_requests_total_count' => 'setNgwafRequestsTotalCount', + 'ngwaf_requests_unknown_count' => 'setNgwafRequestsUnknownCount', + 'ngwaf_requests_allowed_count' => 'setNgwafRequestsAllowedCount', + 'ngwaf_requests_logged_count' => 'setNgwafRequestsLoggedCount', + 'ngwaf_requests_blocked_count' => 'setNgwafRequestsBlockedCount', + 'ngwaf_requests_timeout_count' => 'setNgwafRequestsTimeoutCount', + 'ngwaf_requests_challenged_count' => 'setNgwafRequestsChallengedCount', 'service_id' => 'setServiceId', 'start_time' => 'setStartTime' ]; @@ -1422,6 +1450,13 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', 'compute_cache_operations_count' => 'getComputeCacheOperationsCount', + 'ngwaf_requests_total_count' => 'getNgwafRequestsTotalCount', + 'ngwaf_requests_unknown_count' => 'getNgwafRequestsUnknownCount', + 'ngwaf_requests_allowed_count' => 'getNgwafRequestsAllowedCount', + 'ngwaf_requests_logged_count' => 'getNgwafRequestsLoggedCount', + 'ngwaf_requests_blocked_count' => 'getNgwafRequestsBlockedCount', + 'ngwaf_requests_timeout_count' => 'getNgwafRequestsTimeoutCount', + 'ngwaf_requests_challenged_count' => 'getNgwafRequestsChallengedCount', 'service_id' => 'getServiceId', 'start_time' => 'getStartTime' ]; @@ -1744,6 +1779,13 @@ public function __construct(array $data = null) $this->container['request_collapse_usable_count'] = $data['request_collapse_usable_count'] ?? null; $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; + $this->container['ngwaf_requests_total_count'] = $data['ngwaf_requests_total_count'] ?? null; + $this->container['ngwaf_requests_unknown_count'] = $data['ngwaf_requests_unknown_count'] ?? null; + $this->container['ngwaf_requests_allowed_count'] = $data['ngwaf_requests_allowed_count'] ?? null; + $this->container['ngwaf_requests_logged_count'] = $data['ngwaf_requests_logged_count'] ?? null; + $this->container['ngwaf_requests_blocked_count'] = $data['ngwaf_requests_blocked_count'] ?? null; + $this->container['ngwaf_requests_timeout_count'] = $data['ngwaf_requests_timeout_count'] ?? null; + $this->container['ngwaf_requests_challenged_count'] = $data['ngwaf_requests_challenged_count'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['start_time'] = $data['start_time'] ?? null; } @@ -8040,6 +8082,174 @@ public function setComputeCacheOperationsCount($compute_cache_operations_count) return $this; } + /** + * Gets ngwaf_requests_total_count + * + * @return int|null + */ + public function getNgwafRequestsTotalCount() + { + return $this->container['ngwaf_requests_total_count']; + } + + /** + * Sets ngwaf_requests_total_count + * + * @param int|null $ngwaf_requests_total_count Total number of Next-Gen WAF (Edge WAF & Core WAF) requests. + * + * @return self + */ + public function setNgwafRequestsTotalCount($ngwaf_requests_total_count) + { + $this->container['ngwaf_requests_total_count'] = $ngwaf_requests_total_count; + + return $this; + } + + /** + * Gets ngwaf_requests_unknown_count + * + * @return int|null + */ + public function getNgwafRequestsUnknownCount() + { + return $this->container['ngwaf_requests_unknown_count']; + } + + /** + * Sets ngwaf_requests_unknown_count + * + * @param int|null $ngwaf_requests_unknown_count Count of Edge WAF requests with an unknown outcome. + * + * @return self + */ + public function setNgwafRequestsUnknownCount($ngwaf_requests_unknown_count) + { + $this->container['ngwaf_requests_unknown_count'] = $ngwaf_requests_unknown_count; + + return $this; + } + + /** + * Gets ngwaf_requests_allowed_count + * + * @return int|null + */ + public function getNgwafRequestsAllowedCount() + { + return $this->container['ngwaf_requests_allowed_count']; + } + + /** + * Sets ngwaf_requests_allowed_count + * + * @param int|null $ngwaf_requests_allowed_count Count of Edge WAF requests allowed. + * + * @return self + */ + public function setNgwafRequestsAllowedCount($ngwaf_requests_allowed_count) + { + $this->container['ngwaf_requests_allowed_count'] = $ngwaf_requests_allowed_count; + + return $this; + } + + /** + * Gets ngwaf_requests_logged_count + * + * @return int|null + */ + public function getNgwafRequestsLoggedCount() + { + return $this->container['ngwaf_requests_logged_count']; + } + + /** + * Sets ngwaf_requests_logged_count + * + * @param int|null $ngwaf_requests_logged_count Count of Edge WAF requests logged. + * + * @return self + */ + public function setNgwafRequestsLoggedCount($ngwaf_requests_logged_count) + { + $this->container['ngwaf_requests_logged_count'] = $ngwaf_requests_logged_count; + + return $this; + } + + /** + * Gets ngwaf_requests_blocked_count + * + * @return int|null + */ + public function getNgwafRequestsBlockedCount() + { + return $this->container['ngwaf_requests_blocked_count']; + } + + /** + * Sets ngwaf_requests_blocked_count + * + * @param int|null $ngwaf_requests_blocked_count Count of Edge WAF requests blocked. + * + * @return self + */ + public function setNgwafRequestsBlockedCount($ngwaf_requests_blocked_count) + { + $this->container['ngwaf_requests_blocked_count'] = $ngwaf_requests_blocked_count; + + return $this; + } + + /** + * Gets ngwaf_requests_timeout_count + * + * @return int|null + */ + public function getNgwafRequestsTimeoutCount() + { + return $this->container['ngwaf_requests_timeout_count']; + } + + /** + * Sets ngwaf_requests_timeout_count + * + * @param int|null $ngwaf_requests_timeout_count Count of Edge WAF requests timed outcome. + * + * @return self + */ + public function setNgwafRequestsTimeoutCount($ngwaf_requests_timeout_count) + { + $this->container['ngwaf_requests_timeout_count'] = $ngwaf_requests_timeout_count; + + return $this; + } + + /** + * Gets ngwaf_requests_challenged_count + * + * @return int|null + */ + public function getNgwafRequestsChallengedCount() + { + return $this->container['ngwaf_requests_challenged_count']; + } + + /** + * Sets ngwaf_requests_challenged_count + * + * @param int|null $ngwaf_requests_challenged_count Count of Edge WAF requests challenged. + * + * @return self + */ + public function setNgwafRequestsChallengedCount($ngwaf_requests_challenged_count) + { + $this->container['ngwaf_requests_challenged_count'] = $ngwaf_requests_challenged_count; + + return $this; + } + /** * Gets service_id * diff --git a/lib/Model/SchemasSnippetResponseCommon.php b/lib/Model/SchemasSnippetResponseCommon.php deleted file mode 100644 index 9bee706a..00000000 --- a/lib/Model/SchemasSnippetResponseCommon.php +++ /dev/null @@ -1,464 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SchemasSnippetResponseCommon implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'schemas-snippet_response_common'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'service_id' => 'string', - 'version' => 'string', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', - 'service_id' => null, - 'version' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', - 'service_id' => 'service_id', - 'version' => 'version', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', - 'service_id' => 'setServiceId', - 'version' => 'setVersion', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', - 'service_id' => 'getServiceId', - 'version' => 'getVersion', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['version'] = $data['version'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets service_id - * - * @return string|null - */ - public function getServiceId() - { - return $this->container['service_id']; - } - - /** - * Sets service_id - * - * @param string|null $service_id service_id - * - * @return self - */ - public function setServiceId($service_id) - { - $this->container['service_id'] = $service_id; - - return $this; - } - - /** - * Gets version - * - * @return string|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string|null $version String representing the number identifying a version of the service. - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SnippetAllOf.php b/lib/Model/SnippetAllOf.php deleted file mode 100644 index 1afff0dc..00000000 --- a/lib/Model/SnippetAllOf.php +++ /dev/null @@ -1,348 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SnippetAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'snippet_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'dynamic' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'dynamic' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'dynamic' => 'dynamic' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'dynamic' => 'setDynamic' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'dynamic' => 'getDynamic' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const DYNAMIC_regular = '0'; - const DYNAMIC_dynamic = '1'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getDynamicAllowableValues() - { - return [ - self::DYNAMIC_regular, - self::DYNAMIC_dynamic, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['dynamic'] = $data['dynamic'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($this->container['dynamic']) && !in_array($this->container['dynamic'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'dynamic', must be one of '%s'", - $this->container['dynamic'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets dynamic - * - * @return string|null - */ - public function getDynamic() - { - return $this->container['dynamic']; - } - - /** - * Sets dynamic - * - * @param string|null $dynamic Sets the snippet version. - * - * @return self - */ - public function setDynamic($dynamic) - { - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($dynamic) && !in_array($dynamic, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'dynamic', must be one of '%s'", - $dynamic, - implode("', '", $allowedValues) - ) - ); - } - $this->container['dynamic'] = $dynamic; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SnippetCommon.php b/lib/Model/SnippetCommon.php deleted file mode 100644 index 0958029b..00000000 --- a/lib/Model/SnippetCommon.php +++ /dev/null @@ -1,456 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SnippetCommon implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'snippet_common'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'name' => 'string', - 'type' => 'string', - 'content' => 'string', - 'priority' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'name' => null, - 'type' => null, - 'content' => null, - 'priority' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'type' => 'type', - 'content' => 'content', - 'priority' => 'priority' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'type' => 'setType', - 'content' => 'setContent', - 'priority' => 'setPriority' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'type' => 'getType', - 'content' => 'getContent', - 'priority' => 'getPriority' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const TYPE_INIT = 'init'; - const TYPE_RECV = 'recv'; - const TYPE_HASH = 'hash'; - const TYPE_HIT = 'hit'; - const TYPE_MISS = 'miss'; - const TYPE_PASS = 'pass'; - const TYPE_FETCH = 'fetch'; - const TYPE_ERROR = 'error'; - const TYPE_DELIVER = 'deliver'; - const TYPE_LOG = 'log'; - const TYPE_NONE = 'none'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_INIT, - self::TYPE_RECV, - self::TYPE_HASH, - self::TYPE_HIT, - self::TYPE_MISS, - self::TYPE_PASS, - self::TYPE_FETCH, - self::TYPE_ERROR, - self::TYPE_DELIVER, - self::TYPE_LOG, - self::TYPE_NONE, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['content'] = $data['content'] ?? null; - $this->container['priority'] = $data['priority'] ?? '100'; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name for the snippet. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The location in generated VCL where the snippet should be placed. - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets content - * - * @return string|null - */ - public function getContent() - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param string|null $content The VCL code that specifies exactly what the snippet does. - * - * @return self - */ - public function setContent($content) - { - $this->container['content'] = $content; - - return $this; - } - - /** - * Gets priority - * - * @return string|null - */ - public function getPriority() - { - return $this->container['priority']; - } - - /** - * Sets priority - * - * @param string|null $priority Priority determines execution order. Lower numbers execute first. - * - * @return self - */ - public function setPriority($priority) - { - $this->container['priority'] = $priority; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SnippetResponseCommonAllOf.php b/lib/Model/SnippetResponseAllOf.php similarity index 96% rename from lib/Model/SnippetResponseCommonAllOf.php rename to lib/Model/SnippetResponseAllOf.php index fbbc5ba6..5de201f2 100644 --- a/lib/Model/SnippetResponseCommonAllOf.php +++ b/lib/Model/SnippetResponseAllOf.php @@ -1,6 +1,6 @@ - * @template TKey int|null - * @template TValue mixed|null - */ -class SnippetResponseCommon implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'snippet_response_common'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'service_id' => 'string', - 'version' => 'string', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', - 'service_id' => null, - 'version' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', - 'service_id' => 'service_id', - 'version' => 'version', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', - 'service_id' => 'setServiceId', - 'version' => 'setVersion', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', - 'service_id' => 'getServiceId', - 'version' => 'getVersion', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['version'] = $data['version'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets service_id - * - * @return string|null - */ - public function getServiceId() - { - return $this->container['service_id']; - } - - /** - * Sets service_id - * - * @param string|null $service_id service_id - * - * @return self - */ - public function setServiceId($service_id) - { - $this->container['service_id'] = $service_id; - - return $this; - } - - /** - * Gets version - * - * @return string|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string|null $version String representing the number identifying a version of the service. - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SnippetResponsePost.php b/lib/Model/SnippetResponsePost.php deleted file mode 100644 index 145c9be8..00000000 --- a/lib/Model/SnippetResponsePost.php +++ /dev/null @@ -1,700 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SnippetResponsePost implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'snippet_response_post'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'name' => 'string', - 'type' => 'string', - 'content' => 'string', - 'priority' => 'string', - 'dynamic' => 'float', - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'service_id' => 'string', - 'version' => 'string', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'name' => null, - 'type' => null, - 'content' => null, - 'priority' => null, - 'dynamic' => null, - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', - 'service_id' => null, - 'version' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'type' => 'type', - 'content' => 'content', - 'priority' => 'priority', - 'dynamic' => 'dynamic', - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', - 'service_id' => 'service_id', - 'version' => 'version', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'type' => 'setType', - 'content' => 'setContent', - 'priority' => 'setPriority', - 'dynamic' => 'setDynamic', - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', - 'service_id' => 'setServiceId', - 'version' => 'setVersion', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'type' => 'getType', - 'content' => 'getContent', - 'priority' => 'getPriority', - 'dynamic' => 'getDynamic', - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', - 'service_id' => 'getServiceId', - 'version' => 'getVersion', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const TYPE_INIT = 'init'; - const TYPE_RECV = 'recv'; - const TYPE_HASH = 'hash'; - const TYPE_HIT = 'hit'; - const TYPE_MISS = 'miss'; - const TYPE_PASS = 'pass'; - const TYPE_FETCH = 'fetch'; - const TYPE_ERROR = 'error'; - const TYPE_DELIVER = 'deliver'; - const TYPE_LOG = 'log'; - const TYPE_NONE = 'none'; - const DYNAMIC_regular = 0; - const DYNAMIC_dynamic = 1; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_INIT, - self::TYPE_RECV, - self::TYPE_HASH, - self::TYPE_HIT, - self::TYPE_MISS, - self::TYPE_PASS, - self::TYPE_FETCH, - self::TYPE_ERROR, - self::TYPE_DELIVER, - self::TYPE_LOG, - self::TYPE_NONE, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getDynamicAllowableValues() - { - return [ - self::DYNAMIC_regular, - self::DYNAMIC_dynamic, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['content'] = $data['content'] ?? null; - $this->container['priority'] = $data['priority'] ?? '100'; - $this->container['dynamic'] = $data['dynamic'] ?? null; - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['version'] = $data['version'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($this->container['dynamic']) && !in_array($this->container['dynamic'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'dynamic', must be one of '%s'", - $this->container['dynamic'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name for the snippet. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The location in generated VCL where the snippet should be placed. - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets content - * - * @return string|null - */ - public function getContent() - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param string|null $content The VCL code that specifies exactly what the snippet does. - * - * @return self - */ - public function setContent($content) - { - $this->container['content'] = $content; - - return $this; - } - - /** - * Gets priority - * - * @return string|null - */ - public function getPriority() - { - return $this->container['priority']; - } - - /** - * Sets priority - * - * @param string|null $priority Priority determines execution order. Lower numbers execute first. - * - * @return self - */ - public function setPriority($priority) - { - $this->container['priority'] = $priority; - - return $this; - } - - /** - * Gets dynamic - * - * @return float|null - */ - public function getDynamic() - { - return $this->container['dynamic']; - } - - /** - * Sets dynamic - * - * @param float|null $dynamic Sets the snippet version. - * - * @return self - */ - public function setDynamic($dynamic) - { - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($dynamic) && !in_array($dynamic, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'dynamic', must be one of '%s'", - $dynamic, - implode("', '", $allowedValues) - ) - ); - } - $this->container['dynamic'] = $dynamic; - - return $this; - } - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets service_id - * - * @return string|null - */ - public function getServiceId() - { - return $this->container['service_id']; - } - - /** - * Sets service_id - * - * @param string|null $service_id service_id - * - * @return self - */ - public function setServiceId($service_id) - { - $this->container['service_id'] = $service_id; - - return $this; - } - - /** - * Gets version - * - * @return string|null - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string|null $version String representing the number identifying a version of the service. - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SnippetWithDynamicNumber.php b/lib/Model/SnippetWithDynamicNumber.php deleted file mode 100644 index 1ba9685d..00000000 --- a/lib/Model/SnippetWithDynamicNumber.php +++ /dev/null @@ -1,520 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SnippetWithDynamicNumber implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'snippet_with_dynamic_number'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'name' => 'string', - 'type' => 'string', - 'content' => 'string', - 'priority' => 'string', - 'dynamic' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'name' => null, - 'type' => null, - 'content' => null, - 'priority' => null, - 'dynamic' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'type' => 'type', - 'content' => 'content', - 'priority' => 'priority', - 'dynamic' => 'dynamic' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'type' => 'setType', - 'content' => 'setContent', - 'priority' => 'setPriority', - 'dynamic' => 'setDynamic' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'type' => 'getType', - 'content' => 'getContent', - 'priority' => 'getPriority', - 'dynamic' => 'getDynamic' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const TYPE_INIT = 'init'; - const TYPE_RECV = 'recv'; - const TYPE_HASH = 'hash'; - const TYPE_HIT = 'hit'; - const TYPE_MISS = 'miss'; - const TYPE_PASS = 'pass'; - const TYPE_FETCH = 'fetch'; - const TYPE_ERROR = 'error'; - const TYPE_DELIVER = 'deliver'; - const TYPE_LOG = 'log'; - const TYPE_NONE = 'none'; - const DYNAMIC_regular = 0; - const DYNAMIC_dynamic = 1; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_INIT, - self::TYPE_RECV, - self::TYPE_HASH, - self::TYPE_HIT, - self::TYPE_MISS, - self::TYPE_PASS, - self::TYPE_FETCH, - self::TYPE_ERROR, - self::TYPE_DELIVER, - self::TYPE_LOG, - self::TYPE_NONE, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getDynamicAllowableValues() - { - return [ - self::DYNAMIC_regular, - self::DYNAMIC_dynamic, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['content'] = $data['content'] ?? null; - $this->container['priority'] = $data['priority'] ?? '100'; - $this->container['dynamic'] = $data['dynamic'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($this->container['dynamic']) && !in_array($this->container['dynamic'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'dynamic', must be one of '%s'", - $this->container['dynamic'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name The name for the snippet. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets type - * - * @return string|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string|null $type The location in generated VCL where the snippet should be placed. - * - * @return self - */ - public function setType($type) - { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets content - * - * @return string|null - */ - public function getContent() - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param string|null $content The VCL code that specifies exactly what the snippet does. - * - * @return self - */ - public function setContent($content) - { - $this->container['content'] = $content; - - return $this; - } - - /** - * Gets priority - * - * @return string|null - */ - public function getPriority() - { - return $this->container['priority']; - } - - /** - * Sets priority - * - * @param string|null $priority Priority determines execution order. Lower numbers execute first. - * - * @return self - */ - public function setPriority($priority) - { - $this->container['priority'] = $priority; - - return $this; - } - - /** - * Gets dynamic - * - * @return float|null - */ - public function getDynamic() - { - return $this->container['dynamic']; - } - - /** - * Sets dynamic - * - * @param float|null $dynamic Sets the snippet version. - * - * @return self - */ - public function setDynamic($dynamic) - { - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($dynamic) && !in_array($dynamic, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'dynamic', must be one of '%s'", - $dynamic, - implode("', '", $allowedValues) - ) - ); - } - $this->container['dynamic'] = $dynamic; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SnippetWithDynamicNumberAllOf.php b/lib/Model/SnippetWithDynamicNumberAllOf.php deleted file mode 100644 index bfad606b..00000000 --- a/lib/Model/SnippetWithDynamicNumberAllOf.php +++ /dev/null @@ -1,348 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SnippetWithDynamicNumberAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'snippet_with_dynamic_number_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'dynamic' => 'float' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'dynamic' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'dynamic' => 'dynamic' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'dynamic' => 'setDynamic' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'dynamic' => 'getDynamic' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const DYNAMIC_regular = 0; - const DYNAMIC_dynamic = 1; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getDynamicAllowableValues() - { - return [ - self::DYNAMIC_regular, - self::DYNAMIC_dynamic, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['dynamic'] = $data['dynamic'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($this->container['dynamic']) && !in_array($this->container['dynamic'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'dynamic', must be one of '%s'", - $this->container['dynamic'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets dynamic - * - * @return float|null - */ - public function getDynamic() - { - return $this->container['dynamic']; - } - - /** - * Sets dynamic - * - * @param float|null $dynamic Sets the snippet version. - * - * @return self - */ - public function setDynamic($dynamic) - { - $allowedValues = $this->getDynamicAllowableValues(); - if (!is_null($dynamic) && !in_array($dynamic, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'dynamic', must be one of '%s'", - $dynamic, - implode("', '", $allowedValues) - ) - ); - } - $this->container['dynamic'] = $dynamic; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/sig.json b/sig.json index 9c285bae..7ae3a1b7 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "79ac6bf4", "D": "e46daecd"} +{"G": "b5b58c2d", "D": "2741b776"} From ec0db1f316ca5e7118c60f8cf1c96a216fbe90bd Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 13 May 2025 05:39:45 +0000 Subject: [PATCH 3/8] Generated v9.0.0 --- CHANGELOG.md | 29 + README.md | 74 +- docs/Api/AclsInComputeApi.md | 2 +- docs/Api/BackendApi.md | 4 + docs/Api/DdosProtectionApi.md | 211 ++ docs/Api/DictionaryApi.md | 20 +- docs/Api/DictionaryInfoApi.md | 4 +- docs/Api/DictionaryItemApi.md | 30 +- docs/Api/DomainOwnershipsApi.md | 4 +- docs/Api/HistoricalApi.md | 20 +- docs/Api/KvStoreApi.md | 4 +- docs/Api/KvStoreItemApi.md | 4 +- .../ObservabilityAggregationsForLogsApi.md | 71 + docs/Api/ObservabilityTimeseriesForLogsApi.md | 67 + docs/Api/ProductBotManagementApi.md | 32 + docs/Api/ProductBrotliCompressionApi.md | 32 + docs/Api/ProductDdosProtectionApi.md | 34 +- docs/Api/ProductDomainInspectorApi.md | 32 + docs/Api/ProductFanoutApi.md | 32 + docs/Api/ProductImageOptimizerApi.md | 32 + docs/Api/ProductLogExplorerInsightsApi.md | 32 + docs/Api/ProductNgwafApi.md | 32 + docs/Api/ProductOriginInspectorApi.md | 32 + docs/Api/ProductWebsocketsApi.md | 32 + docs/Api/RateLimiterApi.md | 8 +- docs/Api/ResourceApi.md | 8 +- docs/Api/SecretStoreApi.md | 4 +- docs/Api/SecretStoreItemApi.md | 4 +- docs/Api/ServiceAuthorizationsApi.md | 4 +- docs/Api/WafActiveRulesApi.md | 350 -- docs/Api/WafExclusionsApi.md | 227 -- docs/Api/WafFirewallVersionsApi.md | 250 -- docs/Api/WafFirewallsApi.md | 211 -- docs/Api/WafRuleRevisionsApi.md | 100 - docs/Api/WafRulesApi.md | 104 - docs/Api/WafTagsApi.md | 61 - docs/Model/Backend.md | 1 + docs/Model/BackendResponse.md | 1 + ...BotManagementResponseBodyGetAllServices.md | 13 + docs/Model/BotManagementResponseCustomer.md | 10 + ... BotManagementResponseCustomerCustomer.md} | 6 +- .../BotManagementResponseEnabledServices.md | 10 + ...tManagementResponseLinksGetAllServices.md} | 4 +- ...gementResponseLinksGetAllServicesLinks.md} | 4 +- ...liCompressionResponseBodyGetAllServices.md | 13 + .../BrotliCompressionResponseCustomer.md | 10 + ...rotliCompressionResponseEnabledServices.md | 10 + ...iCompressionResponseLinksGetAllServices.md | 10 + ...ressionResponseLinksGetAllServicesLinks.md | 10 + docs/Model/ComputeAclUpdateEntry.md | 4 +- ...TypeWafRule.md => DdosProtectionAction.md} | 2 +- docs/Model/DdosProtectionAttributeStats.md | 11 + ...all.md => DdosProtectionAttributeValue.md} | 5 +- docs/Model/DdosProtectionError.md | 13 + docs/Model/DdosProtectionErrorErrors.md | 11 + docs/Model/DdosProtectionEvent.md | 17 + docs/Model/DdosProtectionEventAllOf.md | 15 + ...m.md => DdosProtectionNotAuthenticated.md} | 5 +- docs/Model/DdosProtectionNotFound.md | 11 + ...dosProtectionResponseBodyGetAllServices.md | 13 + docs/Model/DdosProtectionResponseCustomer.md | 10 + ... DdosProtectionResponseEnabledServices.md} | 4 +- ...sProtectionResponseLinksGetAllServices.md} | 4 +- ...tectionResponseLinksGetAllServicesLinks.md | 10 + docs/Model/DdosProtectionRule.md | 22 + docs/Model/DdosProtectionRuleAllOf.md | 20 + ...e.md => DdosProtectionTrafficAttribute.md} | 2 +- docs/Model/DdosProtectionTrafficStats.md | 14 + docs/Model/DdosProtectionTrafficStatsAllOf.md | 12 + ...mainInspectorResponseBodyGetAllServices.md | 13 + docs/Model/DomainInspectorResponseCustomer.md | 10 + ...DomainInspectorResponseEnabledServices.md} | 4 +- ...inInspectorResponseLinksGetAllServices.md} | 4 +- ...spectorResponseLinksGetAllServicesLinks.md | 10 + .../Model/FanoutResponseBodyGetAllServices.md | 13 + docs/Model/FanoutResponseCustomer.md | 10 + docs/Model/FanoutResponseEnabledServices.md | 10 + .../FanoutResponseLinksGetAllServices.md | 10 + .../FanoutResponseLinksGetAllServicesLinks.md | 10 + ...mageOptimizerResponseBodyGetAllServices.md | 13 + docs/Model/ImageOptimizerResponseCustomer.md | 10 + ... ImageOptimizerResponseEnabledServices.md} | 4 +- ...geOptimizerResponseLinksGetAllServices.md} | 5 +- ...timizerResponseLinksGetAllServicesLinks.md | 10 + docs/Model/IncludedWithWafActiveRuleItem.md | 13 - docs/Model/IncludedWithWafExclusionItem.md | 12 - docs/Model/IncludedWithWafRuleItem.md | 12 - docs/Model/InlineResponse2002.md | 3 +- docs/Model/InlineResponse2003.md | 2 +- docs/Model/InlineResponse2004.md | 3 +- docs/Model/InlineResponse2005.md | 2 +- docs/Model/InlineResponse2006.md | 2 +- docs/Model/InlineResponse2007.md | 3 +- ...fFirewallData.md => InlineResponse2008.md} | 6 +- docs/Model/InlineResponse2009.md | 10 + docs/Model/KvStoreRequestCreate.md | 2 +- docs/Model/LogAggregationsFilterFieldItem.md | 12 + docs/Model/LogAggregationsGetResponse.md | 11 + docs/Model/LogAggregationsGetResponseMeta.md | 15 + .../LogAggregationsGetResponseMetaFilters.md | 10 + docs/Model/LogAggregationsResult.md | 11 + ...rewall.md => LogAggregationsValueField.md} | 2 +- ...lorerInsightsResponseBodyGetAllServices.md | 13 + ...=> LogExplorerInsightsResponseCustomer.md} | 5 +- ...ExplorerInsightsResponseEnabledServices.md | 10 + ...orerInsightsResponseLinksGetAllServices.md | 10 + ...nsightsResponseLinksGetAllServicesLinks.md | 10 + docs/Model/LogTimeseriesFilterFieldItem.md | 12 + docs/Model/LogTimeseriesGetResponse.md | 11 + docs/Model/LogTimeseriesGetResponseMeta.md | 14 + .../LogTimeseriesGetResponseMetaFilters.md | 10 + docs/Model/LogTimeseriesResult.md | 11 + ...on.md => LogTimeseriesResultDimensions.md} | 3 +- ...lVersion.md => LogTimeseriesValueField.md} | 2 +- docs/Model/NgwafResponseBodyGetAllServices.md | 13 + ...afFirewall.md => NgwafResponseCustomer.md} | 4 +- docs/Model/NgwafResponseEnabledServices.md | 10 + .../Model/NgwafResponseLinksGetAllServices.md | 10 + .../NgwafResponseLinksGetAllServicesLinks.md | 10 + ...iginInspectorResponseBodyGetAllServices.md | 13 + docs/Model/OriginInspectorResponseCustomer.md | 10 + .../OriginInspectorResponseEnabledServices.md | 10 + ...ginInspectorResponseLinksGetAllServices.md | 10 + ...spectorResponseLinksGetAllServicesLinks.md | 10 + docs/Model/Pop.md | 6 +- docs/Model/RateLimiter.md | 2 +- docs/Model/RateLimiterResponse.md | 2 +- .../RelationshipMemberWafFirewallVersion.md | 11 - .../RelationshipMemberWafRuleRevision.md | 11 - docs/Model/RelationshipMemberWafTag.md | 11 - docs/Model/RelationshipWafFirewallVersion.md | 10 - ...hipWafFirewallVersionWafFirewallVersion.md | 10 - docs/Model/RelationshipWafFirewallVersions.md | 10 - docs/Model/RelationshipWafRuleRevision.md | 10 - ...tionshipWafRuleRevisionWafRuleRevisions.md | 10 - docs/Model/RelationshipWafRuleRevisions.md | 10 - docs/Model/RelationshipWafRules.md | 10 - docs/Model/RelationshipWafTagsWafTags.md | 10 - docs/Model/RelationshipsForWafActiveRule.md | 11 - docs/Model/RelationshipsForWafExclusion.md | 11 - .../RelationshipsForWafFirewallVersion.md | 11 - docs/Model/RelationshipsForWafRule.md | 11 - docs/Model/Resource.md | 2 +- docs/Model/ResourceResponse.md | 2 +- docs/Model/SchemasWafFirewallVersion.md | 10 - docs/Model/SchemasWafFirewallVersionData.md | 11 - docs/Model/TypeWafRuleRevision.md | 9 - docs/Model/TypeWafTag.md | 9 - docs/Model/WafActiveRule.md | 10 - docs/Model/WafActiveRuleCreationResponse.md | 13 - docs/Model/WafActiveRuleData.md | 12 - docs/Model/WafActiveRuleDataAttributes.md | 12 - docs/Model/WafActiveRuleResponse.md | 10 - docs/Model/WafActiveRuleResponseData.md | 13 - docs/Model/WafActiveRuleResponseDataAllOf.md | 12 - .../WafActiveRuleResponseDataAttributes.md | 14 - ...afActiveRuleResponseDataAttributesAllOf.md | 11 - .../WafActiveRuleResponseDataRelationships.md | 11 - docs/Model/WafActiveRulesResponse.md | 13 - docs/Model/WafActiveRulesResponseAllOf.md | 11 - docs/Model/WafExclusionData.md | 12 - docs/Model/WafExclusionDataAttributes.md | 15 - docs/Model/WafExclusionResponse.md | 10 - docs/Model/WafExclusionResponseData.md | 13 - docs/Model/WafExclusionResponseDataAllOf.md | 12 - .../WafExclusionResponseDataAttributes.md | 18 - ...WafExclusionResponseDataAttributesAllOf.md | 15 - .../WafExclusionResponseDataRelationships.md | 11 - docs/Model/WafExclusionsResponse.md | 13 - docs/Model/WafExclusionsResponseAllOf.md | 11 - docs/Model/WafFirewallDataAttributes.md | 13 - docs/Model/WafFirewallResponse.md | 11 - docs/Model/WafFirewallResponseData.md | 13 - docs/Model/WafFirewallResponseDataAllOf.md | 12 - .../WafFirewallResponseDataAttributes.md | 21 - .../WafFirewallResponseDataAttributesAllOf.md | 18 - docs/Model/WafFirewallVersion.md | 10 - docs/Model/WafFirewallVersionData.md | 11 - .../Model/WafFirewallVersionDataAttributes.md | 40 - docs/Model/WafFirewallVersionResponse.md | 11 - docs/Model/WafFirewallVersionResponseData.md | 13 - .../WafFirewallVersionResponseDataAllOf.md | 12 - ...afFirewallVersionResponseDataAttributes.md | 24 - ...ewallVersionResponseDataAttributesAllOf.md | 21 - docs/Model/WafFirewallVersionsResponse.md | 13 - .../Model/WafFirewallVersionsResponseAllOf.md | 11 - docs/Model/WafFirewallsResponse.md | 13 - docs/Model/WafFirewallsResponseAllOf.md | 11 - docs/Model/WafRule.md | 12 - docs/Model/WafRuleAttributes.md | 12 - docs/Model/WafRuleResponse.md | 11 - docs/Model/WafRuleResponseData.md | 13 - docs/Model/WafRuleResponseDataAllOf.md | 10 - docs/Model/WafRuleRevision.md | 12 - docs/Model/WafRuleRevisionAttributes.md | 17 - docs/Model/WafRuleRevisionOrLatest.md | 9 - docs/Model/WafRuleRevisionResponse.md | 11 - docs/Model/WafRuleRevisionResponseData.md | 13 - .../Model/WafRuleRevisionResponseDataAllOf.md | 10 - docs/Model/WafRuleRevisionsResponse.md | 13 - docs/Model/WafRuleRevisionsResponseAllOf.md | 11 - docs/Model/WafRulesResponse.md | 13 - docs/Model/WafRulesResponseAllOf.md | 11 - docs/Model/WafTag.md | 12 - docs/Model/WafTagAttributes.md | 10 - docs/Model/WafTagsResponse.md | 13 - docs/Model/WafTagsResponseAllOf.md | 11 - docs/Model/WafTagsResponseDataItem.md | 13 - .../WebsocketsResponseBodyGetAllServices.md | 13 + ...Rules.md => WebsocketsResponseCustomer.md} | 4 +- .../WebsocketsResponseEnabledServices.md | 10 + .../WebsocketsResponseLinksGetAllServices.md | 10 + ...socketsResponseLinksGetAllServicesLinks.md | 10 + lib/Api/BackendApi.php | 20 + ...xclusionsApi.php => DdosProtectionApi.php} | 1131 ++++--- lib/Api/DictionaryApi.php | 40 +- lib/Api/DictionaryInfoApi.php | 8 +- lib/Api/DictionaryItemApi.php | 72 +- lib/Api/DomainOwnershipsApi.php | 14 +- lib/Api/HistoricalApi.php | 50 +- lib/Api/KvStoreApi.php | 14 +- lib/Api/KvStoreItemApi.php | 14 +- .../ObservabilityAggregationsForLogsApi.php | 615 ++++ ... => ObservabilityTimeseriesForLogsApi.php} | 239 +- lib/Api/ProductBotManagementApi.php | 302 ++ lib/Api/ProductBrotliCompressionApi.php | 302 ++ lib/Api/ProductDdosProtectionApi.php | 302 ++ lib/Api/ProductDomainInspectorApi.php | 302 ++ lib/Api/ProductFanoutApi.php | 302 ++ lib/Api/ProductImageOptimizerApi.php | 302 ++ lib/Api/ProductLogExplorerInsightsApi.php | 302 ++ lib/Api/ProductNgwafApi.php | 302 ++ lib/Api/ProductOriginInspectorApi.php | 302 ++ lib/Api/ProductWebsocketsApi.php | 302 ++ lib/Api/RateLimiterApi.php | 20 +- lib/Api/ResourceApi.php | 20 +- lib/Api/SecretStoreApi.php | 14 +- lib/Api/SecretStoreItemApi.php | 14 +- lib/Api/ServiceAuthorizationsApi.php | 14 +- lib/Api/UserApi.php | 5 + lib/Api/WafActiveRulesApi.php | 3009 ----------------- lib/Api/WafFirewallVersionsApi.php | 2271 ------------- lib/Api/WafFirewallsApi.php | 1842 ---------- lib/Api/WafRuleRevisionsApi.php | 879 ----- lib/Api/WafRulesApi.php | 907 ----- lib/Configuration.php | 4 +- lib/Model/Backend.php | 30 + lib/Model/BackendResponse.php | 30 + ...tManagementResponseBodyGetAllServices.php} | 120 +- lib/Model/BotManagementResponseCustomer.php | 314 ++ ...BotManagementResponseCustomerCustomer.php} | 60 +- ... BotManagementResponseEnabledServices.php} | 36 +- ...tManagementResponseLinksGetAllServices.php | 314 ++ ...gementResponseLinksGetAllServicesLinks.php | 314 ++ ...CompressionResponseBodyGetAllServices.php} | 120 +- .../BrotliCompressionResponseCustomer.php | 314 ++ ...tliCompressionResponseEnabledServices.php} | 36 +- ...ompressionResponseLinksGetAllServices.php} | 36 +- ...ssionResponseLinksGetAllServicesLinks.php} | 36 +- lib/Model/ComputeAclUpdateEntry.php | 4 +- ...llVersion.php => DdosProtectionAction.php} | 21 +- ...f.php => DdosProtectionAttributeStats.php} | 64 +- ...n.php => DdosProtectionAttributeValue.php} | 64 +- ...eDataAllOf.php => DdosProtectionError.php} | 120 +- ...wall.php => DdosProtectionErrorErrors.php} | 62 +- lib/Model/DdosProtectionEvent.php | 524 +++ ...eData.php => DdosProtectionEventAllOf.php} | 166 +- ...php => DdosProtectionNotAuthenticated.php} | 80 +- ...uleItem.php => DdosProtectionNotFound.php} | 124 +- ...sProtectionResponseBodyGetAllServices.php} | 120 +- lib/Model/DdosProtectionResponseCustomer.php | 314 ++ ...DdosProtectionResponseEnabledServices.php} | 36 +- ...sProtectionResponseLinksGetAllServices.php | 314 ++ ...ectionResponseLinksGetAllServicesLinks.php | 314 ++ ...aAttributes.php => DdosProtectionRule.php} | 400 ++- ...ibutes.php => DdosProtectionRuleAllOf.php} | 388 ++- ...php => DdosProtectionTrafficAttribute.php} | 30 +- ...tes.php => DdosProtectionTrafficStats.php} | 106 +- ...hp => DdosProtectionTrafficStatsAllOf.php} | 68 +- ...ainInspectorResponseBodyGetAllServices.php | 404 +++ lib/Model/DomainInspectorResponseCustomer.php | 314 ++ ...DomainInspectorResponseEnabledServices.php | 314 ++ ...inInspectorResponseLinksGetAllServices.php | 314 ++ ...ectorResponseLinksGetAllServicesLinks.php} | 36 +- ...p => FanoutResponseBodyGetAllServices.php} | 120 +- lib/Model/FanoutResponseCustomer.php | 314 ++ ....php => FanoutResponseEnabledServices.php} | 36 +- .../FanoutResponseLinksGetAllServices.php | 314 ++ ...anoutResponseLinksGetAllServicesLinks.php} | 36 +- ...ageOptimizerResponseBodyGetAllServices.php | 404 +++ lib/Model/ImageOptimizerResponseCustomer.php | 314 ++ .../ImageOptimizerResponseEnabledServices.php | 314 ++ ...geOptimizerResponseLinksGetAllServices.php | 314 ++ ...imizerResponseLinksGetAllServicesLinks.php | 314 ++ lib/Model/IncludedWithWafExclusionItem.php | 374 -- lib/Model/InlineResponse2002.php | 58 +- lib/Model/InlineResponse2003.php | 6 +- lib/Model/InlineResponse2004.php | 58 +- lib/Model/InlineResponse2005.php | 6 +- lib/Model/InlineResponse2006.php | 6 +- lib/Model/InlineResponse2007.php | 44 +- ...sponseAllOf.php => InlineResponse2008.php} | 42 +- ...ActiveRules.php => InlineResponse2009.php} | 14 +- lib/Model/KvStoreRequestCreate.php | 2 +- ...php => LogAggregationsFilterFieldItem.php} | 167 +- ...nse.php => LogAggregationsGetResponse.php} | 42 +- ...php => LogAggregationsGetResponseMeta.php} | 256 +- ...LogAggregationsGetResponseMetaFilters.php} | 37 +- ...nseAllOf.php => LogAggregationsResult.php} | 64 +- ...wall.php => LogAggregationsValueField.php} | 43 +- ...orerInsightsResponseBodyGetAllServices.php | 404 +++ .../LogExplorerInsightsResponseCustomer.php | 314 ++ ...xplorerInsightsResponseEnabledServices.php | 314 ++ ...rerInsightsResponseLinksGetAllServices.php | 314 ++ ...sightsResponseLinksGetAllServicesLinks.php | 314 ++ ...m.php => LogTimeseriesFilterFieldItem.php} | 167 +- ...ponse.php => LogTimeseriesGetResponse.php} | 42 +- ...s.php => LogTimeseriesGetResponseMeta.php} | 146 +- ...> LogTimeseriesGetResponseMetaFilters.php} | 37 +- ...llResponse.php => LogTimeseriesResult.php} | 64 +- ....php => LogTimeseriesResultDimensions.php} | 34 +- ...Latest.php => LogTimeseriesValueField.php} | 8 +- ...hp => NgwafResponseBodyGetAllServices.php} | 120 +- lib/Model/NgwafResponseCustomer.php | 314 ++ lib/Model/NgwafResponseEnabledServices.php | 314 ++ ...p => NgwafResponseLinksGetAllServices.php} | 36 +- ...NgwafResponseLinksGetAllServicesLinks.php} | 36 +- ...ginInspectorResponseBodyGetAllServices.php | 404 +++ lib/Model/OriginInspectorResponseCustomer.php | 314 ++ ...OriginInspectorResponseEnabledServices.php | 314 ++ ...inInspectorResponseLinksGetAllServices.php | 314 ++ ...ectorResponseLinksGetAllServicesLinks.php} | 36 +- lib/Model/Pop.php | 10 + lib/Model/RateLimiter.php | 2 +- lib/Model/RateLimiterResponse.php | 2 +- lib/Model/RelationshipMemberWafActiveRule.php | 344 -- .../RelationshipMemberWafRuleRevision.php | 344 -- lib/Model/RelationshipMemberWafTag.php | 344 -- lib/Model/RelationshipWafActiveRules.php | 314 -- lib/Model/RelationshipWafFirewallVersion.php | 314 -- lib/Model/RelationshipWafFirewallVersions.php | 314 -- lib/Model/RelationshipWafRuleRevision.php | 314 -- ...ionshipWafRuleRevisionWafRuleRevisions.php | 314 -- lib/Model/RelationshipWafRuleRevisions.php | 314 -- lib/Model/RelationshipsForWafActiveRule.php | 344 -- lib/Model/RelationshipsForWafExclusion.php | 344 -- .../RelationshipsForWafFirewallVersion.php | 344 -- lib/Model/RelationshipsForWafRule.php | 344 -- lib/Model/Resource.php | 2 +- lib/Model/ResourceResponse.php | 2 +- lib/Model/SchemasWafFirewallVersion.php | 314 -- lib/Model/SchemasWafFirewallVersionData.php | 344 -- lib/Model/TypeWafActiveRule.php | 54 - lib/Model/TypeWafExclusion.php | 54 - lib/Model/TypeWafRule.php | 54 - lib/Model/TypeWafRuleRevision.php | 54 - lib/Model/TypeWafTag.php | 54 - lib/Model/WafActiveRuleData.php | 374 -- lib/Model/WafActiveRuleResponseData.php | 404 --- lib/Model/WafActiveRuleResponseDataAllOf.php | 374 -- ...fActiveRuleResponseDataAttributesAllOf.php | 344 -- ...WafActiveRuleResponseDataRelationships.php | 344 -- lib/Model/WafActiveRulesResponseAllOf.php | 344 -- lib/Model/WafExclusionData.php | 374 -- lib/Model/WafExclusionResponseData.php | 404 --- ...afExclusionResponseDataAttributesAllOf.php | 542 --- .../WafExclusionResponseDataRelationships.php | 344 -- lib/Model/WafExclusionsResponseAllOf.php | 344 -- lib/Model/WafFirewallData.php | 344 -- lib/Model/WafFirewallResponseData.php | 404 --- lib/Model/WafFirewallResponseDataAllOf.php | 374 -- .../WafFirewallResponseDataAttributes.php | 644 ---- ...WafFirewallResponseDataAttributesAllOf.php | 554 --- lib/Model/WafFirewallVersion.php | 314 -- lib/Model/WafFirewallVersionData.php | 344 -- .../WafFirewallVersionDataAttributes.php | 1214 ------- lib/Model/WafFirewallVersionResponse.php | 344 -- .../WafFirewallVersionResponseDataAllOf.php | 374 -- ...fFirewallVersionResponseDataAttributes.php | 774 ----- ...wallVersionResponseDataAttributesAllOf.php | 684 ---- .../WafFirewallVersionsResponseAllOf.php | 344 -- lib/Model/WafFirewallsResponseAllOf.php | 344 -- lib/Model/WafRuleRevision.php | 374 -- lib/Model/WafRuleRevisionAttributes.php | 558 --- lib/Model/WafRuleRevisionResponseData.php | 404 --- lib/Model/WafRuleRevisionsResponse.php | 404 --- lib/Model/WafRulesResponse.php | 404 --- lib/Model/WafTag.php | 374 -- lib/Model/WafTagsResponseDataItem.php | 404 --- ... WebsocketsResponseBodyGetAllServices.php} | 120 +- lib/Model/WebsocketsResponseCustomer.php | 314 ++ ... => WebsocketsResponseEnabledServices.php} | 36 +- ...WebsocketsResponseLinksGetAllServices.php} | 36 +- ...cketsResponseLinksGetAllServicesLinks.php} | 36 +- sig.json | 2 +- 395 files changed, 18806 insertions(+), 33928 deletions(-) create mode 100644 docs/Api/DdosProtectionApi.md create mode 100644 docs/Api/ObservabilityAggregationsForLogsApi.md create mode 100644 docs/Api/ObservabilityTimeseriesForLogsApi.md delete mode 100644 docs/Api/WafActiveRulesApi.md delete mode 100644 docs/Api/WafExclusionsApi.md delete mode 100644 docs/Api/WafFirewallVersionsApi.md delete mode 100644 docs/Api/WafFirewallsApi.md delete mode 100644 docs/Api/WafRuleRevisionsApi.md delete mode 100644 docs/Api/WafRulesApi.md delete mode 100644 docs/Api/WafTagsApi.md create mode 100644 docs/Model/BotManagementResponseBodyGetAllServices.md create mode 100644 docs/Model/BotManagementResponseCustomer.md rename docs/Model/{RelationshipMemberWafRule.md => BotManagementResponseCustomerCustomer.md} (55%) create mode 100644 docs/Model/BotManagementResponseEnabledServices.md rename docs/Model/{RelationshipWafActiveRules.md => BotManagementResponseLinksGetAllServices.md} (55%) rename docs/Model/{BulkWafActiveRules.md => BotManagementResponseLinksGetAllServicesLinks.md} (63%) create mode 100644 docs/Model/BrotliCompressionResponseBodyGetAllServices.md create mode 100644 docs/Model/BrotliCompressionResponseCustomer.md create mode 100644 docs/Model/BrotliCompressionResponseEnabledServices.md create mode 100644 docs/Model/BrotliCompressionResponseLinksGetAllServices.md create mode 100644 docs/Model/BrotliCompressionResponseLinksGetAllServicesLinks.md rename docs/Model/{TypeWafRule.md => DdosProtectionAction.md} (88%) create mode 100644 docs/Model/DdosProtectionAttributeStats.md rename docs/Model/{RelationshipWafFirewallWafFirewall.md => DdosProtectionAttributeValue.md} (55%) create mode 100644 docs/Model/DdosProtectionError.md create mode 100644 docs/Model/DdosProtectionErrorErrors.md create mode 100644 docs/Model/DdosProtectionEvent.md create mode 100644 docs/Model/DdosProtectionEventAllOf.md rename docs/Model/{IncludedWithWafFirewallVersionItem.md => DdosProtectionNotAuthenticated.md} (60%) create mode 100644 docs/Model/DdosProtectionNotFound.md create mode 100644 docs/Model/DdosProtectionResponseBodyGetAllServices.md create mode 100644 docs/Model/DdosProtectionResponseCustomer.md rename docs/Model/{RelationshipWafTags.md => DdosProtectionResponseEnabledServices.md} (59%) rename docs/Model/{WafFirewall.md => DdosProtectionResponseLinksGetAllServices.md} (55%) create mode 100644 docs/Model/DdosProtectionResponseLinksGetAllServicesLinks.md create mode 100644 docs/Model/DdosProtectionRule.md create mode 100644 docs/Model/DdosProtectionRuleAllOf.md rename docs/Model/{TypeWafActiveRule.md => DdosProtectionTrafficAttribute.md} (84%) create mode 100644 docs/Model/DdosProtectionTrafficStats.md create mode 100644 docs/Model/DdosProtectionTrafficStatsAllOf.md create mode 100644 docs/Model/DomainInspectorResponseBodyGetAllServices.md create mode 100644 docs/Model/DomainInspectorResponseCustomer.md rename docs/Model/{RelationshipWafRuleWafRule.md => DomainInspectorResponseEnabledServices.md} (58%) rename docs/Model/{WafExclusion.md => DomainInspectorResponseLinksGetAllServices.md} (55%) create mode 100644 docs/Model/DomainInspectorResponseLinksGetAllServicesLinks.md create mode 100644 docs/Model/FanoutResponseBodyGetAllServices.md create mode 100644 docs/Model/FanoutResponseCustomer.md create mode 100644 docs/Model/FanoutResponseEnabledServices.md create mode 100644 docs/Model/FanoutResponseLinksGetAllServices.md create mode 100644 docs/Model/FanoutResponseLinksGetAllServicesLinks.md create mode 100644 docs/Model/ImageOptimizerResponseBodyGetAllServices.md create mode 100644 docs/Model/ImageOptimizerResponseCustomer.md rename docs/Model/{RelationshipWafRule.md => ImageOptimizerResponseEnabledServices.md} (59%) rename docs/Model/{RelationshipMemberWafFirewall.md => ImageOptimizerResponseLinksGetAllServices.md} (55%) create mode 100644 docs/Model/ImageOptimizerResponseLinksGetAllServicesLinks.md delete mode 100644 docs/Model/IncludedWithWafActiveRuleItem.md delete mode 100644 docs/Model/IncludedWithWafExclusionItem.md delete mode 100644 docs/Model/IncludedWithWafRuleItem.md rename docs/Model/{WafFirewallData.md => InlineResponse2008.md} (52%) create mode 100644 docs/Model/InlineResponse2009.md create mode 100644 docs/Model/LogAggregationsFilterFieldItem.md create mode 100644 docs/Model/LogAggregationsGetResponse.md create mode 100644 docs/Model/LogAggregationsGetResponseMeta.md create mode 100644 docs/Model/LogAggregationsGetResponseMetaFilters.md create mode 100644 docs/Model/LogAggregationsResult.md rename docs/Model/{TypeWafFirewall.md => LogAggregationsValueField.md} (86%) create mode 100644 docs/Model/LogExplorerInsightsResponseBodyGetAllServices.md rename docs/Model/{RelationshipMemberWafActiveRule.md => LogExplorerInsightsResponseCustomer.md} (53%) create mode 100644 docs/Model/LogExplorerInsightsResponseEnabledServices.md create mode 100644 docs/Model/LogExplorerInsightsResponseLinksGetAllServices.md create mode 100644 docs/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.md create mode 100644 docs/Model/LogTimeseriesFilterFieldItem.md create mode 100644 docs/Model/LogTimeseriesGetResponse.md create mode 100644 docs/Model/LogTimeseriesGetResponseMeta.md create mode 100644 docs/Model/LogTimeseriesGetResponseMetaFilters.md create mode 100644 docs/Model/LogTimeseriesResult.md rename docs/Model/{TypeWafExclusion.md => LogTimeseriesResultDimensions.md} (72%) rename docs/Model/{TypeWafFirewallVersion.md => LogTimeseriesValueField.md} (87%) create mode 100644 docs/Model/NgwafResponseBodyGetAllServices.md rename docs/Model/{RelationshipWafFirewall.md => NgwafResponseCustomer.md} (55%) create mode 100644 docs/Model/NgwafResponseEnabledServices.md create mode 100644 docs/Model/NgwafResponseLinksGetAllServices.md create mode 100644 docs/Model/NgwafResponseLinksGetAllServicesLinks.md create mode 100644 docs/Model/OriginInspectorResponseBodyGetAllServices.md create mode 100644 docs/Model/OriginInspectorResponseCustomer.md create mode 100644 docs/Model/OriginInspectorResponseEnabledServices.md create mode 100644 docs/Model/OriginInspectorResponseLinksGetAllServices.md create mode 100644 docs/Model/OriginInspectorResponseLinksGetAllServicesLinks.md delete mode 100644 docs/Model/RelationshipMemberWafFirewallVersion.md delete mode 100644 docs/Model/RelationshipMemberWafRuleRevision.md delete mode 100644 docs/Model/RelationshipMemberWafTag.md delete mode 100644 docs/Model/RelationshipWafFirewallVersion.md delete mode 100644 docs/Model/RelationshipWafFirewallVersionWafFirewallVersion.md delete mode 100644 docs/Model/RelationshipWafFirewallVersions.md delete mode 100644 docs/Model/RelationshipWafRuleRevision.md delete mode 100644 docs/Model/RelationshipWafRuleRevisionWafRuleRevisions.md delete mode 100644 docs/Model/RelationshipWafRuleRevisions.md delete mode 100644 docs/Model/RelationshipWafRules.md delete mode 100644 docs/Model/RelationshipWafTagsWafTags.md delete mode 100644 docs/Model/RelationshipsForWafActiveRule.md delete mode 100644 docs/Model/RelationshipsForWafExclusion.md delete mode 100644 docs/Model/RelationshipsForWafFirewallVersion.md delete mode 100644 docs/Model/RelationshipsForWafRule.md delete mode 100644 docs/Model/SchemasWafFirewallVersion.md delete mode 100644 docs/Model/SchemasWafFirewallVersionData.md delete mode 100644 docs/Model/TypeWafRuleRevision.md delete mode 100644 docs/Model/TypeWafTag.md delete mode 100644 docs/Model/WafActiveRule.md delete mode 100644 docs/Model/WafActiveRuleCreationResponse.md delete mode 100644 docs/Model/WafActiveRuleData.md delete mode 100644 docs/Model/WafActiveRuleDataAttributes.md delete mode 100644 docs/Model/WafActiveRuleResponse.md delete mode 100644 docs/Model/WafActiveRuleResponseData.md delete mode 100644 docs/Model/WafActiveRuleResponseDataAllOf.md delete mode 100644 docs/Model/WafActiveRuleResponseDataAttributes.md delete mode 100644 docs/Model/WafActiveRuleResponseDataAttributesAllOf.md delete mode 100644 docs/Model/WafActiveRuleResponseDataRelationships.md delete mode 100644 docs/Model/WafActiveRulesResponse.md delete mode 100644 docs/Model/WafActiveRulesResponseAllOf.md delete mode 100644 docs/Model/WafExclusionData.md delete mode 100644 docs/Model/WafExclusionDataAttributes.md delete mode 100644 docs/Model/WafExclusionResponse.md delete mode 100644 docs/Model/WafExclusionResponseData.md delete mode 100644 docs/Model/WafExclusionResponseDataAllOf.md delete mode 100644 docs/Model/WafExclusionResponseDataAttributes.md delete mode 100644 docs/Model/WafExclusionResponseDataAttributesAllOf.md delete mode 100644 docs/Model/WafExclusionResponseDataRelationships.md delete mode 100644 docs/Model/WafExclusionsResponse.md delete mode 100644 docs/Model/WafExclusionsResponseAllOf.md delete mode 100644 docs/Model/WafFirewallDataAttributes.md delete mode 100644 docs/Model/WafFirewallResponse.md delete mode 100644 docs/Model/WafFirewallResponseData.md delete mode 100644 docs/Model/WafFirewallResponseDataAllOf.md delete mode 100644 docs/Model/WafFirewallResponseDataAttributes.md delete mode 100644 docs/Model/WafFirewallResponseDataAttributesAllOf.md delete mode 100644 docs/Model/WafFirewallVersion.md delete mode 100644 docs/Model/WafFirewallVersionData.md delete mode 100644 docs/Model/WafFirewallVersionDataAttributes.md delete mode 100644 docs/Model/WafFirewallVersionResponse.md delete mode 100644 docs/Model/WafFirewallVersionResponseData.md delete mode 100644 docs/Model/WafFirewallVersionResponseDataAllOf.md delete mode 100644 docs/Model/WafFirewallVersionResponseDataAttributes.md delete mode 100644 docs/Model/WafFirewallVersionResponseDataAttributesAllOf.md delete mode 100644 docs/Model/WafFirewallVersionsResponse.md delete mode 100644 docs/Model/WafFirewallVersionsResponseAllOf.md delete mode 100644 docs/Model/WafFirewallsResponse.md delete mode 100644 docs/Model/WafFirewallsResponseAllOf.md delete mode 100644 docs/Model/WafRule.md delete mode 100644 docs/Model/WafRuleAttributes.md delete mode 100644 docs/Model/WafRuleResponse.md delete mode 100644 docs/Model/WafRuleResponseData.md delete mode 100644 docs/Model/WafRuleResponseDataAllOf.md delete mode 100644 docs/Model/WafRuleRevision.md delete mode 100644 docs/Model/WafRuleRevisionAttributes.md delete mode 100644 docs/Model/WafRuleRevisionOrLatest.md delete mode 100644 docs/Model/WafRuleRevisionResponse.md delete mode 100644 docs/Model/WafRuleRevisionResponseData.md delete mode 100644 docs/Model/WafRuleRevisionResponseDataAllOf.md delete mode 100644 docs/Model/WafRuleRevisionsResponse.md delete mode 100644 docs/Model/WafRuleRevisionsResponseAllOf.md delete mode 100644 docs/Model/WafRulesResponse.md delete mode 100644 docs/Model/WafRulesResponseAllOf.md delete mode 100644 docs/Model/WafTag.md delete mode 100644 docs/Model/WafTagAttributes.md delete mode 100644 docs/Model/WafTagsResponse.md delete mode 100644 docs/Model/WafTagsResponseAllOf.md delete mode 100644 docs/Model/WafTagsResponseDataItem.md create mode 100644 docs/Model/WebsocketsResponseBodyGetAllServices.md rename docs/Model/{RelationshipWafActiveRulesWafActiveRules.md => WebsocketsResponseCustomer.md} (54%) create mode 100644 docs/Model/WebsocketsResponseEnabledServices.md create mode 100644 docs/Model/WebsocketsResponseLinksGetAllServices.md create mode 100644 docs/Model/WebsocketsResponseLinksGetAllServicesLinks.md rename lib/Api/{WafExclusionsApi.php => DdosProtectionApi.php} (60%) create mode 100644 lib/Api/ObservabilityAggregationsForLogsApi.php rename lib/Api/{WafTagsApi.php => ObservabilityTimeseriesForLogsApi.php} (62%) delete mode 100644 lib/Api/WafActiveRulesApi.php delete mode 100644 lib/Api/WafFirewallVersionsApi.php delete mode 100644 lib/Api/WafFirewallsApi.php delete mode 100644 lib/Api/WafRuleRevisionsApi.php delete mode 100644 lib/Api/WafRulesApi.php rename lib/Model/{WafTagsResponse.php => BotManagementResponseBodyGetAllServices.php} (69%) create mode 100644 lib/Model/BotManagementResponseCustomer.php rename lib/Model/{RelationshipMemberWafRule.php => BotManagementResponseCustomerCustomer.php} (86%) rename lib/Model/{RelationshipWafRule.php => BotManagementResponseEnabledServices.php} (87%) create mode 100644 lib/Model/BotManagementResponseLinksGetAllServices.php create mode 100644 lib/Model/BotManagementResponseLinksGetAllServicesLinks.php rename lib/Model/{WafExclusionsResponse.php => BrotliCompressionResponseBodyGetAllServices.php} (69%) create mode 100644 lib/Model/BrotliCompressionResponseCustomer.php rename lib/Model/{RelationshipWafActiveRulesWafActiveRules.php => BrotliCompressionResponseEnabledServices.php} (87%) rename lib/Model/{RelationshipWafFirewall.php => BrotliCompressionResponseLinksGetAllServices.php} (85%) rename lib/Model/{IncludedWithWafFirewallVersionItem.php => BrotliCompressionResponseLinksGetAllServicesLinks.php} (88%) rename lib/Model/{TypeWafFirewallVersion.php => DdosProtectionAction.php} (65%) rename lib/Model/{WafRuleRevisionsResponseAllOf.php => DdosProtectionAttributeStats.php} (80%) rename lib/Model/{RelationshipMemberWafFirewallVersion.php => DdosProtectionAttributeValue.php} (82%) rename lib/Model/{WafExclusionResponseDataAllOf.php => DdosProtectionError.php} (72%) rename lib/Model/{RelationshipMemberWafFirewall.php => DdosProtectionErrorErrors.php} (84%) create mode 100644 lib/Model/DdosProtectionEvent.php rename lib/Model/{WafRuleResponseData.php => DdosProtectionEventAllOf.php} (66%) rename lib/Model/{WafActiveRuleDataAttributes.php => DdosProtectionNotAuthenticated.php} (79%) rename lib/Model/{IncludedWithWafRuleItem.php => DdosProtectionNotFound.php} (73%) rename lib/Model/{WafActiveRuleCreationResponse.php => DdosProtectionResponseBodyGetAllServices.php} (69%) create mode 100644 lib/Model/DdosProtectionResponseCustomer.php rename lib/Model/{RelationshipWafRules.php => DdosProtectionResponseEnabledServices.php} (87%) create mode 100644 lib/Model/DdosProtectionResponseLinksGetAllServices.php create mode 100644 lib/Model/DdosProtectionResponseLinksGetAllServicesLinks.php rename lib/Model/{WafExclusionResponseDataAttributes.php => DdosProtectionRule.php} (56%) rename lib/Model/{WafExclusionDataAttributes.php => DdosProtectionRuleAllOf.php} (52%) rename lib/Model/{TypeWafFirewall.php => DdosProtectionTrafficAttribute.php} (50%) rename lib/Model/{WafActiveRuleResponseDataAttributes.php => DdosProtectionTrafficStats.php} (77%) rename lib/Model/{WafRule.php => DdosProtectionTrafficStatsAllOf.php} (79%) create mode 100644 lib/Model/DomainInspectorResponseBodyGetAllServices.php create mode 100644 lib/Model/DomainInspectorResponseCustomer.php create mode 100644 lib/Model/DomainInspectorResponseEnabledServices.php create mode 100644 lib/Model/DomainInspectorResponseLinksGetAllServices.php rename lib/Model/{RelationshipWafTagsWafTags.php => DomainInspectorResponseLinksGetAllServicesLinks.php} (88%) rename lib/Model/{WafFirewallsResponse.php => FanoutResponseBodyGetAllServices.php} (70%) create mode 100644 lib/Model/FanoutResponseCustomer.php rename lib/Model/{WafExclusionResponse.php => FanoutResponseEnabledServices.php} (87%) create mode 100644 lib/Model/FanoutResponseLinksGetAllServices.php rename lib/Model/{WafExclusion.php => FanoutResponseLinksGetAllServicesLinks.php} (88%) create mode 100644 lib/Model/ImageOptimizerResponseBodyGetAllServices.php create mode 100644 lib/Model/ImageOptimizerResponseCustomer.php create mode 100644 lib/Model/ImageOptimizerResponseEnabledServices.php create mode 100644 lib/Model/ImageOptimizerResponseLinksGetAllServices.php create mode 100644 lib/Model/ImageOptimizerResponseLinksGetAllServicesLinks.php delete mode 100644 lib/Model/IncludedWithWafExclusionItem.php rename lib/Model/{WafTagsResponseAllOf.php => InlineResponse2008.php} (86%) rename lib/Model/{BulkWafActiveRules.php => InlineResponse2009.php} (93%) rename lib/Model/{WafFirewallVersionResponseData.php => LogAggregationsFilterFieldItem.php} (64%) rename lib/Model/{WafRuleResponse.php => LogAggregationsGetResponse.php} (86%) rename lib/Model/{WafRuleAttributes.php => LogAggregationsGetResponseMeta.php} (58%) rename lib/Model/{WafRuleRevisionResponseDataAllOf.php => LogAggregationsGetResponseMetaFilters.php} (84%) rename lib/Model/{WafRulesResponseAllOf.php => LogAggregationsResult.php} (81%) rename lib/Model/{WafFirewall.php => LogAggregationsValueField.php} (87%) create mode 100644 lib/Model/LogExplorerInsightsResponseBodyGetAllServices.php create mode 100644 lib/Model/LogExplorerInsightsResponseCustomer.php create mode 100644 lib/Model/LogExplorerInsightsResponseEnabledServices.php create mode 100644 lib/Model/LogExplorerInsightsResponseLinksGetAllServices.php create mode 100644 lib/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.php rename lib/Model/{IncludedWithWafActiveRuleItem.php => LogTimeseriesFilterFieldItem.php} (64%) rename lib/Model/{WafRuleRevisionResponse.php => LogTimeseriesGetResponse.php} (86%) rename lib/Model/{WafFirewallDataAttributes.php => LogTimeseriesGetResponseMeta.php} (66%) rename lib/Model/{WafRuleResponseDataAllOf.php => LogTimeseriesGetResponseMetaFilters.php} (84%) rename lib/Model/{WafFirewallResponse.php => LogTimeseriesResult.php} (81%) rename lib/Model/{WafTagAttributes.php => LogTimeseriesResultDimensions.php} (89%) rename lib/Model/{WafRuleRevisionOrLatest.php => LogTimeseriesValueField.php} (96%) rename lib/Model/{WafFirewallVersionsResponse.php => NgwafResponseBodyGetAllServices.php} (70%) create mode 100644 lib/Model/NgwafResponseCustomer.php create mode 100644 lib/Model/NgwafResponseEnabledServices.php rename lib/Model/{RelationshipWafFirewallWafFirewall.php => NgwafResponseLinksGetAllServices.php} (87%) rename lib/Model/{WafActiveRule.php => NgwafResponseLinksGetAllServicesLinks.php} (88%) create mode 100644 lib/Model/OriginInspectorResponseBodyGetAllServices.php create mode 100644 lib/Model/OriginInspectorResponseCustomer.php create mode 100644 lib/Model/OriginInspectorResponseEnabledServices.php create mode 100644 lib/Model/OriginInspectorResponseLinksGetAllServices.php rename lib/Model/{RelationshipWafRuleWafRule.php => OriginInspectorResponseLinksGetAllServicesLinks.php} (88%) delete mode 100644 lib/Model/RelationshipMemberWafActiveRule.php delete mode 100644 lib/Model/RelationshipMemberWafRuleRevision.php delete mode 100644 lib/Model/RelationshipMemberWafTag.php delete mode 100644 lib/Model/RelationshipWafActiveRules.php delete mode 100644 lib/Model/RelationshipWafFirewallVersion.php delete mode 100644 lib/Model/RelationshipWafFirewallVersions.php delete mode 100644 lib/Model/RelationshipWafRuleRevision.php delete mode 100644 lib/Model/RelationshipWafRuleRevisionWafRuleRevisions.php delete mode 100644 lib/Model/RelationshipWafRuleRevisions.php delete mode 100644 lib/Model/RelationshipsForWafActiveRule.php delete mode 100644 lib/Model/RelationshipsForWafExclusion.php delete mode 100644 lib/Model/RelationshipsForWafFirewallVersion.php delete mode 100644 lib/Model/RelationshipsForWafRule.php delete mode 100644 lib/Model/SchemasWafFirewallVersion.php delete mode 100644 lib/Model/SchemasWafFirewallVersionData.php delete mode 100644 lib/Model/TypeWafActiveRule.php delete mode 100644 lib/Model/TypeWafExclusion.php delete mode 100644 lib/Model/TypeWafRule.php delete mode 100644 lib/Model/TypeWafRuleRevision.php delete mode 100644 lib/Model/TypeWafTag.php delete mode 100644 lib/Model/WafActiveRuleData.php delete mode 100644 lib/Model/WafActiveRuleResponseData.php delete mode 100644 lib/Model/WafActiveRuleResponseDataAllOf.php delete mode 100644 lib/Model/WafActiveRuleResponseDataAttributesAllOf.php delete mode 100644 lib/Model/WafActiveRuleResponseDataRelationships.php delete mode 100644 lib/Model/WafActiveRulesResponseAllOf.php delete mode 100644 lib/Model/WafExclusionData.php delete mode 100644 lib/Model/WafExclusionResponseData.php delete mode 100644 lib/Model/WafExclusionResponseDataAttributesAllOf.php delete mode 100644 lib/Model/WafExclusionResponseDataRelationships.php delete mode 100644 lib/Model/WafExclusionsResponseAllOf.php delete mode 100644 lib/Model/WafFirewallData.php delete mode 100644 lib/Model/WafFirewallResponseData.php delete mode 100644 lib/Model/WafFirewallResponseDataAllOf.php delete mode 100644 lib/Model/WafFirewallResponseDataAttributes.php delete mode 100644 lib/Model/WafFirewallResponseDataAttributesAllOf.php delete mode 100644 lib/Model/WafFirewallVersion.php delete mode 100644 lib/Model/WafFirewallVersionData.php delete mode 100644 lib/Model/WafFirewallVersionDataAttributes.php delete mode 100644 lib/Model/WafFirewallVersionResponse.php delete mode 100644 lib/Model/WafFirewallVersionResponseDataAllOf.php delete mode 100644 lib/Model/WafFirewallVersionResponseDataAttributes.php delete mode 100644 lib/Model/WafFirewallVersionResponseDataAttributesAllOf.php delete mode 100644 lib/Model/WafFirewallVersionsResponseAllOf.php delete mode 100644 lib/Model/WafFirewallsResponseAllOf.php delete mode 100644 lib/Model/WafRuleRevision.php delete mode 100644 lib/Model/WafRuleRevisionAttributes.php delete mode 100644 lib/Model/WafRuleRevisionResponseData.php delete mode 100644 lib/Model/WafRuleRevisionsResponse.php delete mode 100644 lib/Model/WafRulesResponse.php delete mode 100644 lib/Model/WafTag.php delete mode 100644 lib/Model/WafTagsResponseDataItem.php rename lib/Model/{WafActiveRulesResponse.php => WebsocketsResponseBodyGetAllServices.php} (69%) create mode 100644 lib/Model/WebsocketsResponseCustomer.php rename lib/Model/{RelationshipWafTags.php => WebsocketsResponseEnabledServices.php} (87%) rename lib/Model/{RelationshipWafFirewallVersionWafFirewallVersion.php => WebsocketsResponseLinksGetAllServices.php} (86%) rename lib/Model/{WafActiveRuleResponse.php => WebsocketsResponseLinksGetAllServicesLinks.php} (88%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2e4720b..e0384816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [v9.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v9.0.0) (2025-05-12) + +**Breaking Changes:** + +- deprecated(user): The POST /user endpoint has been deprecated. + +- fix(acls_in_compute): Corrected the successful `PATCH` response code from the `/resources/acls/${acl_id}/entries` endpoint. + + +**Enhancements:** + +- feat(products): Add endpoint to each service-level product to list services that enable that product. +- feat(observability-aggregations-for-logs): Add new Observability Aggregations API for Logs. +- feat(observability-timeseries-for-logs): Add new Observability Timeseries API for Logs. +- feat(pops): Add new Mexico regions. +- feat(historical): Add new Mexico regions. +- feat(ddos-protection): Add `ddos-protection` product. +- feat(backend): Add the `prefer_ipv6` option to prefer IPv6 during a backend DNS hostname lookup. +- feat(products): Added new GET endpoint for all services with product enabled on a customer. + +**Documentation:** + +- doc(kv-store): Add clarification on valid KV Store names. +- doc(kv-store-item): Add clarification on valid KV Store keys. +- doc(dictionary): Usages of `edge dictionary` standardized to `dictionary`. +- doc(acls-in-compute): Add documentation on how to remove a single ACL entry using the existing + `compute-acl-update-acls` operation. +- doc(acls-in-compute): Correct documentation on `action` field of `compute-acl-update-acls` endpoint. + ## [v8.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v8.0.0) (2025-03-13) **Breaking Changes:** diff --git a/README.md b/README.md index d5e2032c..1783e07d 100644 --- a/README.md +++ b/README.md @@ -162,19 +162,24 @@ Class | Method | Description [*CustomerAddressesApi*](docs/Api/CustomerAddressesApi.md) | [**createCustomerAddress**](docs/Api/CustomerAddressesApi.md#createcustomeraddress) | Creates an address associated with a customer account. [*CustomerAddressesApi*](docs/Api/CustomerAddressesApi.md) | [**listCustomerAddresses**](docs/Api/CustomerAddressesApi.md#listcustomeraddresses) | Return the list of addresses associated with a customer account. [*CustomerAddressesApi*](docs/Api/CustomerAddressesApi.md) | [**updateCustomerAddress**](docs/Api/CustomerAddressesApi.md#updatecustomeraddress) | Updates an address associated with a customer account. -[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**createDictionary**](docs/Api/DictionaryApi.md#createdictionary) | Create an edge dictionary -[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**deleteDictionary**](docs/Api/DictionaryApi.md#deletedictionary) | Delete an edge dictionary -[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**getDictionary**](docs/Api/DictionaryApi.md#getdictionary) | Get an edge dictionary -[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**listDictionaries**](docs/Api/DictionaryApi.md#listdictionaries) | List edge dictionaries -[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**updateDictionary**](docs/Api/DictionaryApi.md#updatedictionary) | Update an edge dictionary -[*DictionaryInfoApi*](docs/Api/DictionaryInfoApi.md) | [**getDictionaryInfo**](docs/Api/DictionaryInfoApi.md#getdictionaryinfo) | Get edge dictionary metadata -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**bulkUpdateDictionaryItem**](docs/Api/DictionaryItemApi.md#bulkupdatedictionaryitem) | Update multiple entries in an edge dictionary -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**createDictionaryItem**](docs/Api/DictionaryItemApi.md#createdictionaryitem) | Create an entry in an edge dictionary -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**deleteDictionaryItem**](docs/Api/DictionaryItemApi.md#deletedictionaryitem) | Delete an item from an edge dictionary -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**getDictionaryItem**](docs/Api/DictionaryItemApi.md#getdictionaryitem) | Get an item from an edge dictionary -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**listDictionaryItems**](docs/Api/DictionaryItemApi.md#listdictionaryitems) | List items in an edge dictionary -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**updateDictionaryItem**](docs/Api/DictionaryItemApi.md#updatedictionaryitem) | Update an entry in an edge dictionary -[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**upsertDictionaryItem**](docs/Api/DictionaryItemApi.md#upsertdictionaryitem) | Insert or update an entry in an edge dictionary +[*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionEventGet**](docs/Api/DdosProtectionApi.md#ddosprotectioneventget) | Get event by ID +[*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionEventList**](docs/Api/DdosProtectionApi.md#ddosprotectioneventlist) | Get events +[*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionEventRuleList**](docs/Api/DdosProtectionApi.md#ddosprotectioneventrulelist) | Get all rules for an event +[*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionRuleGet**](docs/Api/DdosProtectionApi.md#ddosprotectionruleget) | Get a rule by ID +[*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionTrafficStatsRuleGet**](docs/Api/DdosProtectionApi.md#ddosprotectiontrafficstatsruleget) | Get traffic stats for a rule +[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**createDictionary**](docs/Api/DictionaryApi.md#createdictionary) | Create a dictionary +[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**deleteDictionary**](docs/Api/DictionaryApi.md#deletedictionary) | Delete a dictionary +[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**getDictionary**](docs/Api/DictionaryApi.md#getdictionary) | Get a dictionary +[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**listDictionaries**](docs/Api/DictionaryApi.md#listdictionaries) | List dictionaries +[*DictionaryApi*](docs/Api/DictionaryApi.md) | [**updateDictionary**](docs/Api/DictionaryApi.md#updatedictionary) | Update a dictionary +[*DictionaryInfoApi*](docs/Api/DictionaryInfoApi.md) | [**getDictionaryInfo**](docs/Api/DictionaryInfoApi.md#getdictionaryinfo) | Get dictionary metadata +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**bulkUpdateDictionaryItem**](docs/Api/DictionaryItemApi.md#bulkupdatedictionaryitem) | Update multiple entries in a dictionary +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**createDictionaryItem**](docs/Api/DictionaryItemApi.md#createdictionaryitem) | Create an entry in a dictionary +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**deleteDictionaryItem**](docs/Api/DictionaryItemApi.md#deletedictionaryitem) | Delete an item from a dictionary +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**getDictionaryItem**](docs/Api/DictionaryItemApi.md#getdictionaryitem) | Get an item from a dictionary +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**listDictionaryItems**](docs/Api/DictionaryItemApi.md#listdictionaryitems) | List items in a dictionary +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**updateDictionaryItem**](docs/Api/DictionaryItemApi.md#updatedictionaryitem) | Update an entry in a dictionary +[*DictionaryItemApi*](docs/Api/DictionaryItemApi.md) | [**upsertDictionaryItem**](docs/Api/DictionaryItemApi.md#upsertdictionaryitem) | Insert or update an entry in a dictionary [*DiffApi*](docs/Api/DiffApi.md) | [**diffServiceVersions**](docs/Api/DiffApi.md#diffserviceversions) | Diff two service versions [*DirectorApi*](docs/Api/DirectorApi.md) | [**createDirector**](docs/Api/DirectorApi.md#createdirector) | Create a director [*DirectorApi*](docs/Api/DirectorApi.md) | [**deleteDirector**](docs/Api/DirectorApi.md#deletedirector) | Delete a director @@ -420,11 +425,13 @@ Class | Method | Description [*ObjectStorageAccessKeysApi*](docs/Api/ObjectStorageAccessKeysApi.md) | [**deleteAccessKey**](docs/Api/ObjectStorageAccessKeysApi.md#deleteaccesskey) | Delete an access key [*ObjectStorageAccessKeysApi*](docs/Api/ObjectStorageAccessKeysApi.md) | [**getAccessKey**](docs/Api/ObjectStorageAccessKeysApi.md#getaccesskey) | Get an access key [*ObjectStorageAccessKeysApi*](docs/Api/ObjectStorageAccessKeysApi.md) | [**listAccessKeys**](docs/Api/ObjectStorageAccessKeysApi.md#listaccesskeys) | List access keys +[*ObservabilityAggregationsForLogsApi*](docs/Api/ObservabilityAggregationsForLogsApi.md) | [**logAggregationsGet**](docs/Api/ObservabilityAggregationsForLogsApi.md#logaggregationsget) | Retrieve aggregated log results [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**createDashboard**](docs/Api/ObservabilityCustomDashboardsApi.md#createdashboard) | Create a new dashboard [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**deleteDashboard**](docs/Api/ObservabilityCustomDashboardsApi.md#deletedashboard) | Delete an existing dashboard [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**getDashboard**](docs/Api/ObservabilityCustomDashboardsApi.md#getdashboard) | Retrieve a dashboard by ID [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**listDashboards**](docs/Api/ObservabilityCustomDashboardsApi.md#listdashboards) | List all custom dashboards [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**updateDashboard**](docs/Api/ObservabilityCustomDashboardsApi.md#updatedashboard) | Update an existing dashboard +[*ObservabilityTimeseriesForLogsApi*](docs/Api/ObservabilityTimeseriesForLogsApi.md) | [**logTimeseriesGet**](docs/Api/ObservabilityTimeseriesForLogsApi.md#logtimeseriesget) | Retrieve log data as time series [*OriginInspectorHistoricalApi*](docs/Api/OriginInspectorHistoricalApi.md) | [**getOriginInspectorHistorical**](docs/Api/OriginInspectorHistoricalApi.md#getorigininspectorhistorical) | Get historical origin data for a service [*OriginInspectorRealtimeApi*](docs/Api/OriginInspectorRealtimeApi.md) | [**getOriginInspectorLast120Seconds**](docs/Api/OriginInspectorRealtimeApi.md#getorigininspectorlast120seconds) | Get real-time origin data for the last 120 seconds [*OriginInspectorRealtimeApi*](docs/Api/OriginInspectorRealtimeApi.md) | [**getOriginInspectorLastMaxEntries**](docs/Api/OriginInspectorRealtimeApi.md#getorigininspectorlastmaxentries) | Get a limited number of real-time origin data entries @@ -443,30 +450,38 @@ Class | Method | Description [*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**disableProductBotManagement**](docs/Api/ProductBotManagementApi.md#disableproductbotmanagement) | Disable product [*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**enableProductBotManagement**](docs/Api/ProductBotManagementApi.md#enableproductbotmanagement) | Enable product [*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**getProductBotManagement**](docs/Api/ProductBotManagementApi.md#getproductbotmanagement) | Get product enablement status +[*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**getServicesProductBotManagement**](docs/Api/ProductBotManagementApi.md#getservicesproductbotmanagement) | Get services with product enabled [*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**disableProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#disableproductbrotlicompression) | Disable product [*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**enableProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#enableproductbrotlicompression) | Enable product [*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**getProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#getproductbrotlicompression) | Get product enablement status +[*ProductBrotliCompressionApi*](docs/Api/ProductBrotliCompressionApi.md) | [**getServicesProductBrotliCompression**](docs/Api/ProductBrotliCompressionApi.md#getservicesproductbrotlicompression) | Get services with product enabled [*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**disableProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#disableproductddosprotection) | Disable product [*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**enableProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#enableproductddosprotection) | Enable product [*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**getProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#getproductddosprotection) | Get product enablement status [*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**getProductDdosProtectionConfiguration**](docs/Api/ProductDdosProtectionApi.md#getproductddosprotectionconfiguration) | Get configuration +[*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**getServicesProductDdosProtection**](docs/Api/ProductDdosProtectionApi.md#getservicesproductddosprotection) | Get services with product enabled [*ProductDdosProtectionApi*](docs/Api/ProductDdosProtectionApi.md) | [**setProductDdosProtectionConfiguration**](docs/Api/ProductDdosProtectionApi.md#setproductddosprotectionconfiguration) | Update configuration [*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**disableProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#disableproductdomaininspector) | Disable product [*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**enableProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#enableproductdomaininspector) | Enable product [*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**getProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#getproductdomaininspector) | Get product enablement status +[*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**getServicesProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#getservicesproductdomaininspector) | Get services with product enabled [*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**disableProductFanout**](docs/Api/ProductFanoutApi.md#disableproductfanout) | Disable product [*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**enableProductFanout**](docs/Api/ProductFanoutApi.md#enableproductfanout) | Enable product [*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**getProductFanout**](docs/Api/ProductFanoutApi.md#getproductfanout) | Get product enablement status +[*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**getServicesProductFanout**](docs/Api/ProductFanoutApi.md#getservicesproductfanout) | Get services with product enabled [*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**disableProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#disableproductimageoptimizer) | Disable product [*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**enableProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#enableproductimageoptimizer) | Enable product [*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**getProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#getproductimageoptimizer) | Get product enablement status +[*ProductImageOptimizerApi*](docs/Api/ProductImageOptimizerApi.md) | [**getServicesProductImageOptimizer**](docs/Api/ProductImageOptimizerApi.md#getservicesproductimageoptimizer) | Get services with product enabled [*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**disableProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#disableproductlogexplorerinsights) | Disable product [*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**enableProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#enableproductlogexplorerinsights) | Enable product [*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**getProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#getproductlogexplorerinsights) | Get product enablement status +[*ProductLogExplorerInsightsApi*](docs/Api/ProductLogExplorerInsightsApi.md) | [**getServicesProductLogExplorerInsights**](docs/Api/ProductLogExplorerInsightsApi.md#getservicesproductlogexplorerinsights) | Get services with product enabled [*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**disableProductNgwaf**](docs/Api/ProductNgwafApi.md#disableproductngwaf) | Disable product [*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**enableProductNgwaf**](docs/Api/ProductNgwafApi.md#enableproductngwaf) | Enable product [*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**getProductNgwaf**](docs/Api/ProductNgwafApi.md#getproductngwaf) | Get product enablement status [*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**getProductNgwafConfiguration**](docs/Api/ProductNgwafApi.md#getproductngwafconfiguration) | Get configuration +[*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**getServicesProductNgwaf**](docs/Api/ProductNgwafApi.md#getservicesproductngwaf) | Get services with product enabled [*ProductNgwafApi*](docs/Api/ProductNgwafApi.md) | [**setProductNgwafConfiguration**](docs/Api/ProductNgwafApi.md#setproductngwafconfiguration) | Update configuration [*ProductObjectStorageApi*](docs/Api/ProductObjectStorageApi.md) | [**disableProductObjectStorage**](docs/Api/ProductObjectStorageApi.md#disableproductobjectstorage) | Disable product [*ProductObjectStorageApi*](docs/Api/ProductObjectStorageApi.md) | [**enableObjectStorage**](docs/Api/ProductObjectStorageApi.md#enableobjectstorage) | Enable product @@ -474,9 +489,11 @@ Class | Method | Description [*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**disableProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#disableproductorigininspector) | Disable product [*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**enableProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#enableproductorigininspector) | Enable product [*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**getProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#getproductorigininspector) | Get product enablement status +[*ProductOriginInspectorApi*](docs/Api/ProductOriginInspectorApi.md) | [**getServicesProductOriginInspector**](docs/Api/ProductOriginInspectorApi.md#getservicesproductorigininspector) | Get services with product enabled [*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**disableProductWebsockets**](docs/Api/ProductWebsocketsApi.md#disableproductwebsockets) | Disable product [*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**enableProductWebsockets**](docs/Api/ProductWebsocketsApi.md#enableproductwebsockets) | Enable product [*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**getProductWebsockets**](docs/Api/ProductWebsocketsApi.md#getproductwebsockets) | Get product enablement status +[*ProductWebsocketsApi*](docs/Api/ProductWebsocketsApi.md) | [**getServicesProductWebsockets**](docs/Api/ProductWebsocketsApi.md#getservicesproductwebsockets) | Get services with product enabled [*PublicIpListApi*](docs/Api/PublicIpListApi.md) | [**listFastlyIps**](docs/Api/PublicIpListApi.md#listfastlyips) | List Fastly's public IPs [*PublishApi*](docs/Api/PublishApi.md) | [**publish**](docs/Api/PublishApi.md#publish) | Send messages to Fanout subscribers [*PurgeApi*](docs/Api/PurgeApi.md) | [**bulkPurgeTag**](docs/Api/PurgeApi.md#bulkpurgetag) | Purge multiple surrogate key tags @@ -625,35 +642,6 @@ Class | Method | Description [*VersionApi*](docs/Api/VersionApi.md) | [**lockServiceVersion**](docs/Api/VersionApi.md#lockserviceversion) | Lock a service version [*VersionApi*](docs/Api/VersionApi.md) | [**updateServiceVersion**](docs/Api/VersionApi.md#updateserviceversion) | Update a service version [*VersionApi*](docs/Api/VersionApi.md) | [**validateServiceVersion**](docs/Api/VersionApi.md#validateserviceversion) | Validate a service version -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**bulkDeleteWafActiveRules**](docs/Api/WafActiveRulesApi.md#bulkdeletewafactiverules) | Delete multiple active rules from a WAF -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**bulkUpdateWafActiveRules**](docs/Api/WafActiveRulesApi.md#bulkupdatewafactiverules) | Update multiple active rules -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**createWafActiveRule**](docs/Api/WafActiveRulesApi.md#createwafactiverule) | Add a rule to a WAF as an active rule -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**createWafActiveRulesTag**](docs/Api/WafActiveRulesApi.md#createwafactiverulestag) | Create active rules by tag -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**deleteWafActiveRule**](docs/Api/WafActiveRulesApi.md#deletewafactiverule) | Delete an active rule -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**getWafActiveRule**](docs/Api/WafActiveRulesApi.md#getwafactiverule) | Get an active WAF rule object -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**listWafActiveRules**](docs/Api/WafActiveRulesApi.md#listwafactiverules) | List active rules on a WAF -[*WafActiveRulesApi*](docs/Api/WafActiveRulesApi.md) | [**updateWafActiveRule**](docs/Api/WafActiveRulesApi.md#updatewafactiverule) | Update an active rule -[*WafExclusionsApi*](docs/Api/WafExclusionsApi.md) | [**createWafRuleExclusion**](docs/Api/WafExclusionsApi.md#createwafruleexclusion) | Create a WAF rule exclusion -[*WafExclusionsApi*](docs/Api/WafExclusionsApi.md) | [**deleteWafRuleExclusion**](docs/Api/WafExclusionsApi.md#deletewafruleexclusion) | Delete a WAF rule exclusion -[*WafExclusionsApi*](docs/Api/WafExclusionsApi.md) | [**getWafRuleExclusion**](docs/Api/WafExclusionsApi.md#getwafruleexclusion) | Get a WAF rule exclusion -[*WafExclusionsApi*](docs/Api/WafExclusionsApi.md) | [**listWafRuleExclusions**](docs/Api/WafExclusionsApi.md#listwafruleexclusions) | List WAF rule exclusions -[*WafExclusionsApi*](docs/Api/WafExclusionsApi.md) | [**updateWafRuleExclusion**](docs/Api/WafExclusionsApi.md#updatewafruleexclusion) | Update a WAF rule exclusion -[*WafFirewallVersionsApi*](docs/Api/WafFirewallVersionsApi.md) | [**cloneWafFirewallVersion**](docs/Api/WafFirewallVersionsApi.md#clonewaffirewallversion) | Clone a firewall version -[*WafFirewallVersionsApi*](docs/Api/WafFirewallVersionsApi.md) | [**createWafFirewallVersion**](docs/Api/WafFirewallVersionsApi.md#createwaffirewallversion) | Create a firewall version -[*WafFirewallVersionsApi*](docs/Api/WafFirewallVersionsApi.md) | [**deployActivateWafFirewallVersion**](docs/Api/WafFirewallVersionsApi.md#deployactivatewaffirewallversion) | Deploy or activate a firewall version -[*WafFirewallVersionsApi*](docs/Api/WafFirewallVersionsApi.md) | [**getWafFirewallVersion**](docs/Api/WafFirewallVersionsApi.md#getwaffirewallversion) | Get a firewall version -[*WafFirewallVersionsApi*](docs/Api/WafFirewallVersionsApi.md) | [**listWafFirewallVersions**](docs/Api/WafFirewallVersionsApi.md#listwaffirewallversions) | List firewall versions -[*WafFirewallVersionsApi*](docs/Api/WafFirewallVersionsApi.md) | [**updateWafFirewallVersion**](docs/Api/WafFirewallVersionsApi.md#updatewaffirewallversion) | Update a firewall version -[*WafFirewallsApi*](docs/Api/WafFirewallsApi.md) | [**createWafFirewall**](docs/Api/WafFirewallsApi.md#createwaffirewall) | Create a firewall -[*WafFirewallsApi*](docs/Api/WafFirewallsApi.md) | [**deleteWafFirewall**](docs/Api/WafFirewallsApi.md#deletewaffirewall) | Delete a firewall -[*WafFirewallsApi*](docs/Api/WafFirewallsApi.md) | [**getWafFirewall**](docs/Api/WafFirewallsApi.md#getwaffirewall) | Get a firewall -[*WafFirewallsApi*](docs/Api/WafFirewallsApi.md) | [**listWafFirewalls**](docs/Api/WafFirewallsApi.md#listwaffirewalls) | List firewalls -[*WafFirewallsApi*](docs/Api/WafFirewallsApi.md) | [**updateWafFirewall**](docs/Api/WafFirewallsApi.md#updatewaffirewall) | Update a firewall -[*WafRuleRevisionsApi*](docs/Api/WafRuleRevisionsApi.md) | [**getWafRuleRevision**](docs/Api/WafRuleRevisionsApi.md#getwafrulerevision) | Get a revision of a rule -[*WafRuleRevisionsApi*](docs/Api/WafRuleRevisionsApi.md) | [**listWafRuleRevisions**](docs/Api/WafRuleRevisionsApi.md#listwafrulerevisions) | List revisions for a rule -[*WafRulesApi*](docs/Api/WafRulesApi.md) | [**getWafRule**](docs/Api/WafRulesApi.md#getwafrule) | Get a rule -[*WafRulesApi*](docs/Api/WafRulesApi.md) | [**listWafRules**](docs/Api/WafRulesApi.md#listwafrules) | List available WAF rules -[*WafTagsApi*](docs/Api/WafTagsApi.md) | [**listWafTags**](docs/Api/WafTagsApi.md#listwaftags) | List tags [*WholePlatformDdosHistoricalApi*](docs/Api/WholePlatformDdosHistoricalApi.md) | [**getPlatformDdosHistorical**](docs/Api/WholePlatformDdosHistoricalApi.md#getplatformddoshistorical) | Get historical DDoS metrics for the entire Fastly platform @@ -668,6 +656,8 @@ The fastly-php API client currently does not support the following endpoints: - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) - [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/domains/v1/tools/status`](https://www.fastly.com/documentation/reference/api/) (GET) +- [`/domains/v1/tools/suggest`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/domains/v1/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/domains/v1`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/notifications/integration-types`](https://developer.fastly.com/reference/api/observability/notification) (GET) diff --git a/docs/Api/AclsInComputeApi.md b/docs/Api/AclsInComputeApi.md index f80909d1..165b2325 100644 --- a/docs/Api/AclsInComputeApi.md +++ b/docs/Api/AclsInComputeApi.md @@ -239,7 +239,7 @@ Name | Type | Description | Notes computeAclUpdateAcls($options) // Update an ACL ``` -Update an ACL. +Update an ACL entry with a new operation or action, this allows you to modify an existing entry or delete it. ### Example ```php diff --git a/docs/Api/BackendApi.md b/docs/Api/BackendApi.md index fe2d9496..7ae04cac 100644 --- a/docs/Api/BackendApi.md +++ b/docs/Api/BackendApi.md @@ -54,6 +54,7 @@ $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum all $options['name'] = 'name_example'; // string | The name of the backend. $options['override_host'] = 'override_host_example'; // string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. $options['port'] = 56; // int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. +$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections for DNS hostname lookups. $options['request_condition'] = 'request_condition_example'; // string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. $options['share_key'] = 'share_key_example'; // string | Value that when shared across backends will enable those backends to share the same health check. $options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). @@ -105,6 +106,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] @@ -273,6 +275,7 @@ $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum all $options['name'] = 'name_example'; // string | The name of the backend. $options['override_host'] = 'override_host_example'; // string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. $options['port'] = 56; // int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. +$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections for DNS hostname lookups. $options['request_condition'] = 'request_condition_example'; // string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. $options['share_key'] = 'share_key_example'; // string | Value that when shared across backends will enable those backends to share the same health check. $options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). @@ -325,6 +328,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] diff --git a/docs/Api/DdosProtectionApi.md b/docs/Api/DdosProtectionApi.md new file mode 100644 index 00000000..76c8ed68 --- /dev/null +++ b/docs/Api/DdosProtectionApi.md @@ -0,0 +1,211 @@ +# Fastly\Api\DdosProtectionApi + + +```php +$apiInstance = new Fastly\Api\DdosProtectionApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**ddosProtectionEventGet()**](DdosProtectionApi.md#ddosProtectionEventGet) | **GET** /ddos-protection/v1/events/{event_id} | Get event by ID +[**ddosProtectionEventList()**](DdosProtectionApi.md#ddosProtectionEventList) | **GET** /ddos-protection/v1/events | Get events +[**ddosProtectionEventRuleList()**](DdosProtectionApi.md#ddosProtectionEventRuleList) | **GET** /ddos-protection/v1/events/{event_id}/rules | Get all rules for an event +[**ddosProtectionRuleGet()**](DdosProtectionApi.md#ddosProtectionRuleGet) | **GET** /ddos-protection/v1/rules/{rule_id} | Get a rule by ID +[**ddosProtectionTrafficStatsRuleGet()**](DdosProtectionApi.md#ddosProtectionTrafficStatsRuleGet) | **GET** /ddos-protection/v1/events/{event_id}/rules/{rule_id}/traffic-stats | Get traffic stats for a rule + + +## `ddosProtectionEventGet()` + +```php +ddosProtectionEventGet($options): \Fastly\Model\DdosProtectionEvent // Get event by ID +``` + +Get event by ID. + +### Example +```php + $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. + +try { + $result = $apiInstance->ddosProtectionEventGet($options); +} catch (Exception $e) { + echo 'Exception when calling DdosProtectionApi->ddosProtectionEventGet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**event_id** | **string** | Unique ID of the event. | + +### Return type + +[**\Fastly\Model\DdosProtectionEvent**](../Model/DdosProtectionEvent.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `ddosProtectionEventList()` + +```php +ddosProtectionEventList($options): \Fastly\Model\InlineResponse2002 // Get events +``` + +Get events. + +### Example +```php + $options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. +$options['limit'] = 20; // int | Limit how many results are returned. +$options['service_id'] = 'service_id_example'; // string | Filter results based on a service_id. +$options['from'] = 2023-01-01T02:30Z; // \DateTime | Represents the start of a date-time range expressed in RFC 3339 format. +$options['to'] = 2023-01-01T02:30Z; // \DateTime | Represents the end of a date-time range expressed in RFC 3339 format. +$options['name'] = 'name_example'; // string + +try { + $result = $apiInstance->ddosProtectionEventList($options); +} catch (Exception $e) { + echo 'Exception when calling DdosProtectionApi->ddosProtectionEventList: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] +**limit** | **int** | Limit how many results are returned. | [optional] [defaults to 20] +**service_id** | **string** | Filter results based on a service_id. | [optional] +**from** | **\DateTime** | Represents the start of a date-time range expressed in RFC 3339 format. | [optional] +**to** | **\DateTime** | Represents the end of a date-time range expressed in RFC 3339 format. | [optional] +**name** | **string** | | [optional] + +### Return type + +[**\Fastly\Model\InlineResponse2002**](../Model/InlineResponse2002.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `ddosProtectionEventRuleList()` + +```php +ddosProtectionEventRuleList($options): \Fastly\Model\InlineResponse2003 // Get all rules for an event +``` + +Get all rules for an event. + +### Example +```php + $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. +$options['limit'] = 20; // int | Limit how many results are returned. + +try { + $result = $apiInstance->ddosProtectionEventRuleList($options); +} catch (Exception $e) { + echo 'Exception when calling DdosProtectionApi->ddosProtectionEventRuleList: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**event_id** | **string** | Unique ID of the event. | +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] +**limit** | **int** | Limit how many results are returned. | [optional] [defaults to 20] + +### Return type + +[**\Fastly\Model\InlineResponse2003**](../Model/InlineResponse2003.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `ddosProtectionRuleGet()` + +```php +ddosProtectionRuleGet($options): \Fastly\Model\DdosProtectionRule // Get a rule by ID +``` + +Get a rule by ID. + +### Example +```php + $options['rule_id'] = 'rule_id_example'; // string | Unique ID of the rule. + +try { + $result = $apiInstance->ddosProtectionRuleGet($options); +} catch (Exception $e) { + echo 'Exception when calling DdosProtectionApi->ddosProtectionRuleGet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**rule_id** | **string** | Unique ID of the rule. | + +### Return type + +[**\Fastly\Model\DdosProtectionRule**](../Model/DdosProtectionRule.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `ddosProtectionTrafficStatsRuleGet()` + +```php +ddosProtectionTrafficStatsRuleGet($options): \Fastly\Model\DdosProtectionTrafficStats // Get traffic stats for a rule +``` + +Get traffic stats for a rule. + +### Example +```php + $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. +$options['rule_id'] = 'rule_id_example'; // string | Unique ID of the rule. + +try { + $result = $apiInstance->ddosProtectionTrafficStatsRuleGet($options); +} catch (Exception $e) { + echo 'Exception when calling DdosProtectionApi->ddosProtectionTrafficStatsRuleGet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**event_id** | **string** | Unique ID of the event. | +**rule_id** | **string** | Unique ID of the rule. | + +### Return type + +[**\Fastly\Model\DdosProtectionTrafficStats**](../Model/DdosProtectionTrafficStats.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/DictionaryApi.md b/docs/Api/DictionaryApi.md index be2304b5..cdc0dff9 100644 --- a/docs/Api/DictionaryApi.md +++ b/docs/Api/DictionaryApi.md @@ -17,17 +17,17 @@ $apiInstance = new Fastly\Api\DictionaryApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**createDictionary()**](DictionaryApi.md#createDictionary) | **POST** /service/{service_id}/version/{version_id}/dictionary | Create an edge dictionary -[**deleteDictionary()**](DictionaryApi.md#deleteDictionary) | **DELETE** /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Delete an edge dictionary -[**getDictionary()**](DictionaryApi.md#getDictionary) | **GET** /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Get an edge dictionary -[**listDictionaries()**](DictionaryApi.md#listDictionaries) | **GET** /service/{service_id}/version/{version_id}/dictionary | List edge dictionaries -[**updateDictionary()**](DictionaryApi.md#updateDictionary) | **PUT** /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Update an edge dictionary +[**createDictionary()**](DictionaryApi.md#createDictionary) | **POST** /service/{service_id}/version/{version_id}/dictionary | Create a dictionary +[**deleteDictionary()**](DictionaryApi.md#deleteDictionary) | **DELETE** /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Delete a dictionary +[**getDictionary()**](DictionaryApi.md#getDictionary) | **GET** /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Get a dictionary +[**listDictionaries()**](DictionaryApi.md#listDictionaries) | **GET** /service/{service_id}/version/{version_id}/dictionary | List dictionaries +[**updateDictionary()**](DictionaryApi.md#updateDictionary) | **PUT** /service/{service_id}/version/{version_id}/dictionary/{dictionary_name} | Update a dictionary ## `createDictionary()` ```php -createDictionary($options): \Fastly\Model\DictionaryResponse // Create an edge dictionary +createDictionary($options): \Fastly\Model\DictionaryResponse // Create a dictionary ``` Create named dictionary for a particular service and version. @@ -67,7 +67,7 @@ Name | Type | Description | Notes ## `deleteDictionary()` ```php -deleteDictionary($options): \Fastly\Model\InlineResponse200 // Delete an edge dictionary +deleteDictionary($options): \Fastly\Model\InlineResponse200 // Delete a dictionary ``` Delete named dictionary for a particular service and version. @@ -105,7 +105,7 @@ Name | Type | Description | Notes ## `getDictionary()` ```php -getDictionary($options): \Fastly\Model\DictionaryResponse // Get an edge dictionary +getDictionary($options): \Fastly\Model\DictionaryResponse // Get a dictionary ``` Retrieve a single dictionary by name for the version and service. @@ -143,7 +143,7 @@ Name | Type | Description | Notes ## `listDictionaries()` ```php -listDictionaries($options): \Fastly\Model\DictionaryResponse[] // List edge dictionaries +listDictionaries($options): \Fastly\Model\DictionaryResponse[] // List dictionaries ``` List all dictionaries for the version of the service. @@ -179,7 +179,7 @@ Name | Type | Description | Notes ## `updateDictionary()` ```php -updateDictionary($options): \Fastly\Model\DictionaryResponse // Update an edge dictionary +updateDictionary($options): \Fastly\Model\DictionaryResponse // Update a dictionary ``` Update named dictionary for a particular service and version. diff --git a/docs/Api/DictionaryInfoApi.md b/docs/Api/DictionaryInfoApi.md index 0e11c8fd..6ec5e451 100644 --- a/docs/Api/DictionaryInfoApi.md +++ b/docs/Api/DictionaryInfoApi.md @@ -17,13 +17,13 @@ $apiInstance = new Fastly\Api\DictionaryInfoApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**getDictionaryInfo()**](DictionaryInfoApi.md#getDictionaryInfo) | **GET** /service/{service_id}/version/{version_id}/dictionary/{dictionary_id}/info | Get edge dictionary metadata +[**getDictionaryInfo()**](DictionaryInfoApi.md#getDictionaryInfo) | **GET** /service/{service_id}/version/{version_id}/dictionary/{dictionary_id}/info | Get dictionary metadata ## `getDictionaryInfo()` ```php -getDictionaryInfo($options): \Fastly\Model\DictionaryInfoResponse // Get edge dictionary metadata +getDictionaryInfo($options): \Fastly\Model\DictionaryInfoResponse // Get dictionary metadata ``` Retrieve metadata for a single dictionary by ID for a version and service. diff --git a/docs/Api/DictionaryItemApi.md b/docs/Api/DictionaryItemApi.md index 581cfdd2..f5d7bd95 100644 --- a/docs/Api/DictionaryItemApi.md +++ b/docs/Api/DictionaryItemApi.md @@ -17,19 +17,19 @@ $apiInstance = new Fastly\Api\DictionaryItemApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**bulkUpdateDictionaryItem()**](DictionaryItemApi.md#bulkUpdateDictionaryItem) | **PATCH** /service/{service_id}/dictionary/{dictionary_id}/items | Update multiple entries in an edge dictionary -[**createDictionaryItem()**](DictionaryItemApi.md#createDictionaryItem) | **POST** /service/{service_id}/dictionary/{dictionary_id}/item | Create an entry in an edge dictionary -[**deleteDictionaryItem()**](DictionaryItemApi.md#deleteDictionaryItem) | **DELETE** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Delete an item from an edge dictionary -[**getDictionaryItem()**](DictionaryItemApi.md#getDictionaryItem) | **GET** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Get an item from an edge dictionary -[**listDictionaryItems()**](DictionaryItemApi.md#listDictionaryItems) | **GET** /service/{service_id}/dictionary/{dictionary_id}/items | List items in an edge dictionary -[**updateDictionaryItem()**](DictionaryItemApi.md#updateDictionaryItem) | **PATCH** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Update an entry in an edge dictionary -[**upsertDictionaryItem()**](DictionaryItemApi.md#upsertDictionaryItem) | **PUT** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Insert or update an entry in an edge dictionary +[**bulkUpdateDictionaryItem()**](DictionaryItemApi.md#bulkUpdateDictionaryItem) | **PATCH** /service/{service_id}/dictionary/{dictionary_id}/items | Update multiple entries in a dictionary +[**createDictionaryItem()**](DictionaryItemApi.md#createDictionaryItem) | **POST** /service/{service_id}/dictionary/{dictionary_id}/item | Create an entry in a dictionary +[**deleteDictionaryItem()**](DictionaryItemApi.md#deleteDictionaryItem) | **DELETE** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Delete an item from a dictionary +[**getDictionaryItem()**](DictionaryItemApi.md#getDictionaryItem) | **GET** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Get an item from a dictionary +[**listDictionaryItems()**](DictionaryItemApi.md#listDictionaryItems) | **GET** /service/{service_id}/dictionary/{dictionary_id}/items | List items in a dictionary +[**updateDictionaryItem()**](DictionaryItemApi.md#updateDictionaryItem) | **PATCH** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Update an entry in a dictionary +[**upsertDictionaryItem()**](DictionaryItemApi.md#upsertDictionaryItem) | **PUT** /service/{service_id}/dictionary/{dictionary_id}/item/{dictionary_item_key} | Insert or update an entry in a dictionary ## `bulkUpdateDictionaryItem()` ```php -bulkUpdateDictionaryItem($options): \Fastly\Model\InlineResponse200 // Update multiple entries in an edge dictionary +bulkUpdateDictionaryItem($options): \Fastly\Model\InlineResponse200 // Update multiple entries in a dictionary ``` Update multiple items in the same dictionary. For faster updates to your service, group your changes into large batches. The maximum batch size is 1000 items. [Contact support](https://support.fastly.com/) to discuss raising this limit. @@ -67,7 +67,7 @@ Name | Type | Description | Notes ## `createDictionaryItem()` ```php -createDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Create an entry in an edge dictionary +createDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Create an entry in a dictionary ``` Create DictionaryItem given service, dictionary ID, item key, and item value. @@ -107,7 +107,7 @@ Name | Type | Description | Notes ## `deleteDictionaryItem()` ```php -deleteDictionaryItem($options): \Fastly\Model\InlineResponse200 // Delete an item from an edge dictionary +deleteDictionaryItem($options): \Fastly\Model\InlineResponse200 // Delete an item from a dictionary ``` Delete DictionaryItem given service, dictionary ID, and item key. @@ -145,7 +145,7 @@ Name | Type | Description | Notes ## `getDictionaryItem()` ```php -getDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Get an item from an edge dictionary +getDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Get an item from a dictionary ``` Retrieve a single DictionaryItem given service, dictionary ID and item key. @@ -183,7 +183,7 @@ Name | Type | Description | Notes ## `listDictionaryItems()` ```php -listDictionaryItems($options): \Fastly\Model\DictionaryItemResponse[] // List items in an edge dictionary +listDictionaryItems($options): \Fastly\Model\DictionaryItemResponse[] // List items in a dictionary ``` List of DictionaryItems given service and dictionary ID. @@ -213,7 +213,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **dictionary_id** | **string** | Alphanumeric string identifying a Dictionary. | **page** | **int** | Current page. | [optional] -**per_page** | **int** | Number of records per page. | [optional] [defaults to 20] +**per_page** | **int** | Number of records per page. | [optional] [defaults to 100] **sort** | **string** | Field on which to sort. | [optional] [defaults to 'created'] **direction** | **string** | Direction in which to sort results. | [optional] [one of: 'ascend', 'descend'] [defaults to 'ascend'] @@ -227,7 +227,7 @@ Name | Type | Description | Notes ## `updateDictionaryItem()` ```php -updateDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Update an entry in an edge dictionary +updateDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Update an entry in a dictionary ``` Update DictionaryItem given service, dictionary ID, item key, and item value. @@ -269,7 +269,7 @@ Name | Type | Description | Notes ## `upsertDictionaryItem()` ```php -upsertDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Insert or update an entry in an edge dictionary +upsertDictionaryItem($options): \Fastly\Model\DictionaryItemResponse // Insert or update an entry in a dictionary ``` Upsert DictionaryItem given service, dictionary ID, item key, and item value. diff --git a/docs/Api/DomainOwnershipsApi.md b/docs/Api/DomainOwnershipsApi.md index 1d5e2223..3d3d75ab 100644 --- a/docs/Api/DomainOwnershipsApi.md +++ b/docs/Api/DomainOwnershipsApi.md @@ -23,7 +23,7 @@ Method | HTTP request | Description ## `listDomainOwnerships()` ```php -listDomainOwnerships($options): \Fastly\Model\InlineResponse2002 // List domain-ownerships +listDomainOwnerships($options): \Fastly\Model\InlineResponse2004 // List domain-ownerships ``` List all domain-ownerships. @@ -46,7 +46,7 @@ This endpoint does not need any parameters. ### Return type -[**\Fastly\Model\InlineResponse2002**](../Model/InlineResponse2002.md) +[**\Fastly\Model\InlineResponse2004**](../Model/InlineResponse2004.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/HistoricalApi.md b/docs/Api/HistoricalApi.md index f065eac7..a9f8aa87 100644 --- a/docs/Api/HistoricalApi.md +++ b/docs/Api/HistoricalApi.md @@ -41,7 +41,7 @@ Fetches historical stats for each of your Fastly services and groups the results $options['from'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. $options['to'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. $options['by'] = day; // string | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. -$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. +$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. try { $result = $apiInstance->getHistStats($options); @@ -59,7 +59,7 @@ Name | Type | Description | Notes **from** | **string** | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. | [optional] **to** | **string** | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. | [optional] [defaults to 'now'] **by** | **string** | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'day'] -**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'mexico', 'southamerica_std'] ### Return type @@ -81,7 +81,7 @@ Fetches historical stats information aggregated across all of your Fastly servic $options['from'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. $options['to'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. $options['by'] = day; // string | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. -$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. +$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. try { $result = $apiInstance->getHistStatsAggregated($options); @@ -99,7 +99,7 @@ Name | Type | Description | Notes **from** | **string** | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. | [optional] **to** | **string** | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. | [optional] [defaults to 'now'] **by** | **string** | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'day'] -**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'mexico', 'southamerica_std'] ### Return type @@ -122,7 +122,7 @@ Fetches the specified field from the historical stats for each of your services $options['from'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. $options['to'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. $options['by'] = day; // string | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. -$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. +$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. try { $result = $apiInstance->getHistStatsField($options); @@ -141,7 +141,7 @@ Name | Type | Description | Notes **from** | **string** | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. | [optional] **to** | **string** | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. | [optional] [defaults to 'now'] **by** | **string** | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'day'] -**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'mexico', 'southamerica_std'] ### Return type @@ -164,7 +164,7 @@ Fetches historical stats for a given service. $options['from'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. $options['to'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. $options['by'] = day; // string | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. -$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. +$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. try { $result = $apiInstance->getHistStatsService($options); @@ -183,7 +183,7 @@ Name | Type | Description | Notes **from** | **string** | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. | [optional] **to** | **string** | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. | [optional] [defaults to 'now'] **by** | **string** | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'day'] -**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'mexico', 'southamerica_std'] ### Return type @@ -207,7 +207,7 @@ $options['field'] = hit_ratio; // string | Name of the stats field. $options['from'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. $options['to'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. $options['by'] = day; // string | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. -$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. +$options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. try { $result = $apiInstance->getHistStatsServiceField($options); @@ -227,7 +227,7 @@ Name | Type | Description | Notes **from** | **string** | Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. | [optional] **to** | **string** | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. | [optional] [defaults to 'now'] **by** | **string** | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'day'] -**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'mexico', 'southamerica_std'] ### Return type diff --git a/docs/Api/KvStoreApi.md b/docs/Api/KvStoreApi.md index fd87c987..960574c3 100644 --- a/docs/Api/KvStoreApi.md +++ b/docs/Api/KvStoreApi.md @@ -130,7 +130,7 @@ Name | Type | Description | Notes ## `kvStoreList()` ```php -kvStoreList($options): \Fastly\Model\InlineResponse2003 // List all KV stores. +kvStoreList($options): \Fastly\Model\InlineResponse2005 // List all KV stores. ``` List all KV stores. @@ -158,7 +158,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2003**](../Model/InlineResponse2003.md) +[**\Fastly\Model\InlineResponse2005**](../Model/InlineResponse2005.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/KvStoreItemApi.md b/docs/Api/KvStoreItemApi.md index 1ff8705a..6ddcbc6a 100644 --- a/docs/Api/KvStoreItemApi.md +++ b/docs/Api/KvStoreItemApi.md @@ -102,7 +102,7 @@ Name | Type | Description | Notes ## `kvStoreListItemKeys()` ```php -kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2004 // List item keys. +kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2006 // List item keys. ``` Lists the matching item keys (or all item keys, if no prefix is supplied). @@ -136,7 +136,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +[**\Fastly\Model\InlineResponse2006**](../Model/InlineResponse2006.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/ObservabilityAggregationsForLogsApi.md b/docs/Api/ObservabilityAggregationsForLogsApi.md new file mode 100644 index 00000000..4a32057b --- /dev/null +++ b/docs/Api/ObservabilityAggregationsForLogsApi.md @@ -0,0 +1,71 @@ +# Fastly\Api\ObservabilityAggregationsForLogsApi + + +```php +$apiInstance = new Fastly\Api\ObservabilityAggregationsForLogsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**logAggregationsGet()**](ObservabilityAggregationsForLogsApi.md#logAggregationsGet) | **GET** /observability/aggregations | Retrieve aggregated log results + + +## `logAggregationsGet()` + +```php +logAggregationsGet($options): \Fastly\Model\LogAggregationsGetResponse // Retrieve aggregated log results +``` + +Retrieves aggregated log results. + +### Example +```php + $options['source'] = 'source_example'; // string +$options['service_id'] = 'service_id_example'; // string +$options['start'] = 'start_example'; // string +$options['end'] = 'end_example'; // string +$options['limit'] = 3.4; // float +$options['filter'] = 'filter_example'; // string +$options['series'] = 'series_example'; // string +$options['dimensions'] = 'dimensions_example'; // string +$options['sort'] = 'sort_example'; // string + +try { + $result = $apiInstance->logAggregationsGet($options); +} catch (Exception $e) { + echo 'Exception when calling ObservabilityAggregationsForLogsApi->logAggregationsGet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**source** | **string** | | +**service_id** | **string** | | +**start** | **string** | | +**end** | **string** | | +**limit** | **float** | | [optional] +**filter** | **string** | | [optional] +**series** | **string** | | +**dimensions** | **string** | | [optional] +**sort** | **string** | | [optional] + +### Return type + +[**\Fastly\Model\LogAggregationsGetResponse**](../Model/LogAggregationsGetResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ObservabilityTimeseriesForLogsApi.md b/docs/Api/ObservabilityTimeseriesForLogsApi.md new file mode 100644 index 00000000..56406435 --- /dev/null +++ b/docs/Api/ObservabilityTimeseriesForLogsApi.md @@ -0,0 +1,67 @@ +# Fastly\Api\ObservabilityTimeseriesForLogsApi + + +```php +$apiInstance = new Fastly\Api\ObservabilityTimeseriesForLogsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**logTimeseriesGet()**](ObservabilityTimeseriesForLogsApi.md#logTimeseriesGet) | **GET** /observability/timeseries | Retrieve log data as time series + + +## `logTimeseriesGet()` + +```php +logTimeseriesGet($options): \Fastly\Model\LogTimeseriesGetResponse // Retrieve log data as time series +``` + +Retrieves log data as time series. + +### Example +```php + $options['source'] = 'source_example'; // string +$options['service_id'] = 'service_id_example'; // string +$options['start'] = 'start_example'; // string +$options['end'] = 'end_example'; // string +$options['granularity'] = 'granularity_example'; // string +$options['filter'] = 'filter_example'; // string +$options['series'] = 'series_example'; // string + +try { + $result = $apiInstance->logTimeseriesGet($options); +} catch (Exception $e) { + echo 'Exception when calling ObservabilityTimeseriesForLogsApi->logTimeseriesGet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**source** | **string** | | +**service_id** | **string** | | +**start** | **string** | | +**end** | **string** | | +**granularity** | **string** | | [one of: 'second', 'minute', 'hour', 'day'] +**filter** | **string** | | [optional] +**series** | **string** | | + +### Return type + +[**\Fastly\Model\LogTimeseriesGetResponse**](../Model/LogTimeseriesGetResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductBotManagementApi.md b/docs/Api/ProductBotManagementApi.md index 33eea4fe..51a864d4 100644 --- a/docs/Api/ProductBotManagementApi.md +++ b/docs/Api/ProductBotManagementApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductBotManagement()**](ProductBotManagementApi.md#disableProductBotManagement) | **DELETE** /enabled-products/v1/bot_management/services/{service_id} | Disable product [**enableProductBotManagement()**](ProductBotManagementApi.md#enableProductBotManagement) | **PUT** /enabled-products/v1/bot_management/services/{service_id} | Enable product [**getProductBotManagement()**](ProductBotManagementApi.md#getProductBotManagement) | **GET** /enabled-products/v1/bot_management/services/{service_id} | Get product enablement status +[**getServicesProductBotManagement()**](ProductBotManagementApi.md#getServicesProductBotManagement) | **GET** /enabled-products/v1/bot_management/services | Get services with product enabled ## `disableProductBotManagement()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductBotManagement()` + +```php +getServicesProductBotManagement($options): \Fastly\Model\BotManagementResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Bot Management product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductBotManagement($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBotManagementApi->getServicesProductBotManagement: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\BotManagementResponseBodyGetAllServices**](../Model/BotManagementResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductBrotliCompressionApi.md b/docs/Api/ProductBrotliCompressionApi.md index da5857fc..b13c7f78 100644 --- a/docs/Api/ProductBrotliCompressionApi.md +++ b/docs/Api/ProductBrotliCompressionApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductBrotliCompression()**](ProductBrotliCompressionApi.md#disableProductBrotliCompression) | **DELETE** /enabled-products/v1/brotli_compression/services/{service_id} | Disable product [**enableProductBrotliCompression()**](ProductBrotliCompressionApi.md#enableProductBrotliCompression) | **PUT** /enabled-products/v1/brotli_compression/services/{service_id} | Enable product [**getProductBrotliCompression()**](ProductBrotliCompressionApi.md#getProductBrotliCompression) | **GET** /enabled-products/v1/brotli_compression/services/{service_id} | Get product enablement status +[**getServicesProductBrotliCompression()**](ProductBrotliCompressionApi.md#getServicesProductBrotliCompression) | **GET** /enabled-products/v1/brotli_compression/services | Get services with product enabled ## `disableProductBrotliCompression()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductBrotliCompression()` + +```php +getServicesProductBrotliCompression($options): \Fastly\Model\BrotliCompressionResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Brotli Compression product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductBrotliCompression($options); +} catch (Exception $e) { + echo 'Exception when calling ProductBrotliCompressionApi->getServicesProductBrotliCompression: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\BrotliCompressionResponseBodyGetAllServices**](../Model/BrotliCompressionResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductDdosProtectionApi.md b/docs/Api/ProductDdosProtectionApi.md index 7f350928..c292b1fd 100644 --- a/docs/Api/ProductDdosProtectionApi.md +++ b/docs/Api/ProductDdosProtectionApi.md @@ -21,6 +21,7 @@ Method | HTTP request | Description [**enableProductDdosProtection()**](ProductDdosProtectionApi.md#enableProductDdosProtection) | **PUT** /enabled-products/v1/ddos_protection/services/{service_id} | Enable product [**getProductDdosProtection()**](ProductDdosProtectionApi.md#getProductDdosProtection) | **GET** /enabled-products/v1/ddos_protection/services/{service_id} | Get product enablement status [**getProductDdosProtectionConfiguration()**](ProductDdosProtectionApi.md#getProductDdosProtectionConfiguration) | **GET** /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Get configuration +[**getServicesProductDdosProtection()**](ProductDdosProtectionApi.md#getServicesProductDdosProtection) | **GET** /enabled-products/v1/ddos_protection/services | Get services with product enabled [**setProductDdosProtectionConfiguration()**](ProductDdosProtectionApi.md#setProductDdosProtectionConfiguration) | **PATCH** /enabled-products/v1/ddos_protection/services/{service_id}/configuration | Update configuration @@ -64,7 +65,7 @@ void (empty response body) enableProductDdosProtection($options): \Fastly\Model\DdosProtectionResponseEnable // Enable product ``` -Enable the DDoS Protection product on a service. +Enable the DDoS Protection product on a service in 'log' mode. ### Example ```php @@ -160,6 +161,37 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) +## `getServicesProductDdosProtection()` + +```php +getServicesProductDdosProtection($options): \Fastly\Model\DdosProtectionResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the DDoS Protection product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductDdosProtection($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDdosProtectionApi->getServicesProductDdosProtection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\DdosProtectionResponseBodyGetAllServices**](../Model/DdosProtectionResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + ## `setProductDdosProtectionConfiguration()` ```php diff --git a/docs/Api/ProductDomainInspectorApi.md b/docs/Api/ProductDomainInspectorApi.md index 03cd72b8..79263f4d 100644 --- a/docs/Api/ProductDomainInspectorApi.md +++ b/docs/Api/ProductDomainInspectorApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductDomainInspector()**](ProductDomainInspectorApi.md#disableProductDomainInspector) | **DELETE** /enabled-products/v1/domain_inspector/services/{service_id} | Disable product [**enableProductDomainInspector()**](ProductDomainInspectorApi.md#enableProductDomainInspector) | **PUT** /enabled-products/v1/domain_inspector/services/{service_id} | Enable product [**getProductDomainInspector()**](ProductDomainInspectorApi.md#getProductDomainInspector) | **GET** /enabled-products/v1/domain_inspector/services/{service_id} | Get product enablement status +[**getServicesProductDomainInspector()**](ProductDomainInspectorApi.md#getServicesProductDomainInspector) | **GET** /enabled-products/v1/domain_inspector/services | Get services with product enabled ## `disableProductDomainInspector()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductDomainInspector()` + +```php +getServicesProductDomainInspector($options): \Fastly\Model\DomainInspectorResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Domain Inspector product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductDomainInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainInspectorApi->getServicesProductDomainInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\DomainInspectorResponseBodyGetAllServices**](../Model/DomainInspectorResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductFanoutApi.md b/docs/Api/ProductFanoutApi.md index 1a082b6b..8f39c1d2 100644 --- a/docs/Api/ProductFanoutApi.md +++ b/docs/Api/ProductFanoutApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductFanout()**](ProductFanoutApi.md#disableProductFanout) | **DELETE** /enabled-products/v1/fanout/services/{service_id} | Disable product [**enableProductFanout()**](ProductFanoutApi.md#enableProductFanout) | **PUT** /enabled-products/v1/fanout/services/{service_id} | Enable product [**getProductFanout()**](ProductFanoutApi.md#getProductFanout) | **GET** /enabled-products/v1/fanout/services/{service_id} | Get product enablement status +[**getServicesProductFanout()**](ProductFanoutApi.md#getServicesProductFanout) | **GET** /enabled-products/v1/fanout/services | Get services with product enabled ## `disableProductFanout()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductFanout()` + +```php +getServicesProductFanout($options): \Fastly\Model\FanoutResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Fanout product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductFanout($options); +} catch (Exception $e) { + echo 'Exception when calling ProductFanoutApi->getServicesProductFanout: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\FanoutResponseBodyGetAllServices**](../Model/FanoutResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductImageOptimizerApi.md b/docs/Api/ProductImageOptimizerApi.md index a08e71ab..65c053ab 100644 --- a/docs/Api/ProductImageOptimizerApi.md +++ b/docs/Api/ProductImageOptimizerApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductImageOptimizer()**](ProductImageOptimizerApi.md#disableProductImageOptimizer) | **DELETE** /enabled-products/v1/image_optimizer/services/{service_id} | Disable product [**enableProductImageOptimizer()**](ProductImageOptimizerApi.md#enableProductImageOptimizer) | **PUT** /enabled-products/v1/image_optimizer/services/{service_id} | Enable product [**getProductImageOptimizer()**](ProductImageOptimizerApi.md#getProductImageOptimizer) | **GET** /enabled-products/v1/image_optimizer/services/{service_id} | Get product enablement status +[**getServicesProductImageOptimizer()**](ProductImageOptimizerApi.md#getServicesProductImageOptimizer) | **GET** /enabled-products/v1/image_optimizer/services | Get services with product enabled ## `disableProductImageOptimizer()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductImageOptimizer()` + +```php +getServicesProductImageOptimizer($options): \Fastly\Model\ImageOptimizerResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Image Optimizer product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductImageOptimizer($options); +} catch (Exception $e) { + echo 'Exception when calling ProductImageOptimizerApi->getServicesProductImageOptimizer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\ImageOptimizerResponseBodyGetAllServices**](../Model/ImageOptimizerResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductLogExplorerInsightsApi.md b/docs/Api/ProductLogExplorerInsightsApi.md index 524a9918..1518d778 100644 --- a/docs/Api/ProductLogExplorerInsightsApi.md +++ b/docs/Api/ProductLogExplorerInsightsApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#disableProductLogExplorerInsights) | **DELETE** /enabled-products/v1/log_explorer_insights/services/{service_id} | Disable product [**enableProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#enableProductLogExplorerInsights) | **PUT** /enabled-products/v1/log_explorer_insights/services/{service_id} | Enable product [**getProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#getProductLogExplorerInsights) | **GET** /enabled-products/v1/log_explorer_insights/services/{service_id} | Get product enablement status +[**getServicesProductLogExplorerInsights()**](ProductLogExplorerInsightsApi.md#getServicesProductLogExplorerInsights) | **GET** /enabled-products/v1/log_explorer_insights/services | Get services with product enabled ## `disableProductLogExplorerInsights()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductLogExplorerInsights()` + +```php +getServicesProductLogExplorerInsights($options): \Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Log Explorer & Insights product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductLogExplorerInsights($options); +} catch (Exception $e) { + echo 'Exception when calling ProductLogExplorerInsightsApi->getServicesProductLogExplorerInsights: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices**](../Model/LogExplorerInsightsResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductNgwafApi.md b/docs/Api/ProductNgwafApi.md index 9687eff1..3a04c411 100644 --- a/docs/Api/ProductNgwafApi.md +++ b/docs/Api/ProductNgwafApi.md @@ -21,6 +21,7 @@ Method | HTTP request | Description [**enableProductNgwaf()**](ProductNgwafApi.md#enableProductNgwaf) | **PUT** /enabled-products/v1/ngwaf/services/{service_id} | Enable product [**getProductNgwaf()**](ProductNgwafApi.md#getProductNgwaf) | **GET** /enabled-products/v1/ngwaf/services/{service_id} | Get product enablement status [**getProductNgwafConfiguration()**](ProductNgwafApi.md#getProductNgwafConfiguration) | **GET** /enabled-products/v1/ngwaf/services/{service_id}/configuration | Get configuration +[**getServicesProductNgwaf()**](ProductNgwafApi.md#getServicesProductNgwaf) | **GET** /enabled-products/v1/ngwaf/services | Get services with product enabled [**setProductNgwafConfiguration()**](ProductNgwafApi.md#setProductNgwafConfiguration) | **PATCH** /enabled-products/v1/ngwaf/services/{service_id}/configuration | Update configuration @@ -162,6 +163,37 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) +## `getServicesProductNgwaf()` + +```php +getServicesProductNgwaf($options): \Fastly\Model\NgwafResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Next-Gen WAF product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductNgwaf($options); +} catch (Exception $e) { + echo 'Exception when calling ProductNgwafApi->getServicesProductNgwaf: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\NgwafResponseBodyGetAllServices**](../Model/NgwafResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + ## `setProductNgwafConfiguration()` ```php diff --git a/docs/Api/ProductOriginInspectorApi.md b/docs/Api/ProductOriginInspectorApi.md index 5e71a0ea..5b73cadb 100644 --- a/docs/Api/ProductOriginInspectorApi.md +++ b/docs/Api/ProductOriginInspectorApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductOriginInspector()**](ProductOriginInspectorApi.md#disableProductOriginInspector) | **DELETE** /enabled-products/v1/origin_inspector/services/{service_id} | Disable product [**enableProductOriginInspector()**](ProductOriginInspectorApi.md#enableProductOriginInspector) | **PUT** /enabled-products/v1/origin_inspector/services/{service_id} | Enable product [**getProductOriginInspector()**](ProductOriginInspectorApi.md#getProductOriginInspector) | **GET** /enabled-products/v1/origin_inspector/services/{service_id} | Get product enablement status +[**getServicesProductOriginInspector()**](ProductOriginInspectorApi.md#getServicesProductOriginInspector) | **GET** /enabled-products/v1/origin_inspector/services | Get services with product enabled ## `disableProductOriginInspector()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductOriginInspector()` + +```php +getServicesProductOriginInspector($options): \Fastly\Model\OriginInspectorResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Origin Inspector product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductOriginInspector($options); +} catch (Exception $e) { + echo 'Exception when calling ProductOriginInspectorApi->getServicesProductOriginInspector: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\OriginInspectorResponseBodyGetAllServices**](../Model/OriginInspectorResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ProductWebsocketsApi.md b/docs/Api/ProductWebsocketsApi.md index 13712aca..efda56fb 100644 --- a/docs/Api/ProductWebsocketsApi.md +++ b/docs/Api/ProductWebsocketsApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description [**disableProductWebsockets()**](ProductWebsocketsApi.md#disableProductWebsockets) | **DELETE** /enabled-products/v1/websockets/services/{service_id} | Disable product [**enableProductWebsockets()**](ProductWebsocketsApi.md#enableProductWebsockets) | **PUT** /enabled-products/v1/websockets/services/{service_id} | Enable product [**getProductWebsockets()**](ProductWebsocketsApi.md#getProductWebsockets) | **GET** /enabled-products/v1/websockets/services/{service_id} | Get product enablement status +[**getServicesProductWebsockets()**](ProductWebsocketsApi.md#getServicesProductWebsockets) | **GET** /enabled-products/v1/websockets/services | Get services with product enabled ## `disableProductWebsockets()` @@ -123,3 +124,34 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + +## `getServicesProductWebsockets()` + +```php +getServicesProductWebsockets($options): \Fastly\Model\WebsocketsResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services which have the Websockets product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductWebsockets($options); +} catch (Exception $e) { + echo 'Exception when calling ProductWebsocketsApi->getServicesProductWebsockets: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\WebsocketsResponseBodyGetAllServices**](../Model/WebsocketsResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/RateLimiterApi.md b/docs/Api/RateLimiterApi.md index 1da3999d..190f90a7 100644 --- a/docs/Api/RateLimiterApi.md +++ b/docs/Api/RateLimiterApi.md @@ -37,7 +37,7 @@ Create a rate limiter for a particular service and version. $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | A human readable name for the rate limiting rule. -$options['uri_dictionary_name'] = 'uri_dictionary_name_example'; // string | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. +$options['uri_dictionary_name'] = 'uri_dictionary_name_example'; // string | The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. $options['http_methods'] = array('http_methods_example'); // string[] | Array of HTTP methods to apply rate limiting to. $options['rps_limit'] = 56; // int | Upper limit of requests per second allowed by the rate limiter. $options['window_size'] = 56; // int | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. @@ -64,7 +64,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | A human readable name for the rate limiting rule. | [optional] -**uri_dictionary_name** | **string** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] +**uri_dictionary_name** | **string** | The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] **http_methods** | [**string[]**](../Model/string.md) | Array of HTTP methods to apply rate limiting to. | [optional] [one of: 'HEAD', 'OPTIONS', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'TRACE'] **rps_limit** | **int** | Upper limit of requests per second allowed by the rate limiter. | [optional] **window_size** | **int** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] [one of: 1, 10, 60] @@ -198,7 +198,7 @@ Update a rate limiter by its ID. ```php $options['rate_limiter_id'] = 'rate_limiter_id_example'; // string | Alphanumeric string identifying the rate limiter. $options['name'] = 'name_example'; // string | A human readable name for the rate limiting rule. -$options['uri_dictionary_name'] = 'uri_dictionary_name_example'; // string | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. +$options['uri_dictionary_name'] = 'uri_dictionary_name_example'; // string | The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. $options['http_methods'] = array('http_methods_example'); // string[] | Array of HTTP methods to apply rate limiting to. $options['rps_limit'] = 56; // int | Upper limit of requests per second allowed by the rate limiter. $options['window_size'] = 56; // int | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. @@ -224,7 +224,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rate_limiter_id** | **string** | Alphanumeric string identifying the rate limiter. | **name** | **string** | A human readable name for the rate limiting rule. | [optional] -**uri_dictionary_name** | **string** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] +**uri_dictionary_name** | **string** | The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] **http_methods** | [**string[]**](../Model/string.md) | Array of HTTP methods to apply rate limiting to. | [optional] [one of: 'HEAD', 'OPTIONS', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'TRACE'] **rps_limit** | **int** | Upper limit of requests per second allowed by the rate limiter. | [optional] **window_size** | **int** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] [one of: 1, 10, 60] diff --git a/docs/Api/ResourceApi.md b/docs/Api/ResourceApi.md index b37a6f75..532f0923 100644 --- a/docs/Api/ResourceApi.md +++ b/docs/Api/ResourceApi.md @@ -37,7 +37,7 @@ Create a link between a resource and a service version. $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. $options['resource_id'] = 'resource_id_example'; // string | The ID of the underlying linked resource. -$options['name'] = 'name_example'; // string | The name of the resource link. +$options['name'] = 'name_example'; // string | The name of the resource link. Note this is separate from the resource store name and might not match the store name. try { $result = $apiInstance->createResource($options); @@ -55,7 +55,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **resource_id** | **string** | The ID of the underlying linked resource. | [optional] -**name** | **string** | The name of the resource link. | [optional] +**name** | **string** | The name of the resource link. Note this is separate from the resource store name and might not match the store name. | [optional] ### Return type @@ -190,7 +190,7 @@ Update a link between a resource and a service version. $options['version_id'] = 56; // int | Integer identifying a service version. $options['id'] = 'id_example'; // string | An alphanumeric string identifying the resource link. $options['resource_id'] = 'resource_id_example'; // string | The ID of the underlying linked resource. -$options['name'] = 'name_example'; // string | The name of the resource link. +$options['name'] = 'name_example'; // string | The name of the resource link. Note this is separate from the resource store name and might not match the store name. try { $result = $apiInstance->updateResource($options); @@ -209,7 +209,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **id** | **string** | An alphanumeric string identifying the resource link. | **resource_id** | **string** | The ID of the underlying linked resource. | [optional] -**name** | **string** | The name of the resource link. | [optional] +**name** | **string** | The name of the resource link. Note this is separate from the resource store name and might not match the store name. | [optional] ### Return type diff --git a/docs/Api/SecretStoreApi.md b/docs/Api/SecretStoreApi.md index 9ba67ff7..0d97ce62 100644 --- a/docs/Api/SecretStoreApi.md +++ b/docs/Api/SecretStoreApi.md @@ -161,7 +161,7 @@ Name | Type | Description | Notes ## `getSecretStores()` ```php -getSecretStores($options): \Fastly\Model\InlineResponse2005 // Get all secret stores +getSecretStores($options): \Fastly\Model\InlineResponse2007 // Get all secret stores ``` Get all secret stores. @@ -191,7 +191,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2005**](../Model/InlineResponse2005.md) +[**\Fastly\Model\InlineResponse2007**](../Model/InlineResponse2007.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/SecretStoreItemApi.md b/docs/Api/SecretStoreItemApi.md index 741c8488..74f77c18 100644 --- a/docs/Api/SecretStoreItemApi.md +++ b/docs/Api/SecretStoreItemApi.md @@ -136,7 +136,7 @@ Name | Type | Description | Notes ## `getSecrets()` ```php -getSecrets($options): \Fastly\Model\InlineResponse2006 // List secrets within a store. +getSecrets($options): \Fastly\Model\InlineResponse2008 // List secrets within a store. ``` List all secrets within a store. @@ -166,7 +166,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2006**](../Model/InlineResponse2006.md) +[**\Fastly\Model\InlineResponse2008**](../Model/InlineResponse2008.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/ServiceAuthorizationsApi.md b/docs/Api/ServiceAuthorizationsApi.md index 139b1b6c..d28e067d 100644 --- a/docs/Api/ServiceAuthorizationsApi.md +++ b/docs/Api/ServiceAuthorizationsApi.md @@ -97,7 +97,7 @@ void (empty response body) ## `deleteServiceAuthorization2()` ```php -deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse2007 // Delete service authorizations +deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse2009 // Delete service authorizations ``` Delete service authorizations. @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\Fastly\Model\InlineResponse2009**](../Model/InlineResponse2009.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/WafActiveRulesApi.md b/docs/Api/WafActiveRulesApi.md deleted file mode 100644 index c3b2da37..00000000 --- a/docs/Api/WafActiveRulesApi.md +++ /dev/null @@ -1,350 +0,0 @@ -# Fastly\Api\WafActiveRulesApi - - -```php -$apiInstance = new Fastly\Api\WafActiveRulesApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**bulkDeleteWafActiveRules()**](WafActiveRulesApi.md#bulkDeleteWafActiveRules) | **DELETE** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules | Delete multiple active rules from a WAF -[**bulkUpdateWafActiveRules()**](WafActiveRulesApi.md#bulkUpdateWafActiveRules) | **PATCH** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/bulk | Update multiple active rules -[**createWafActiveRule()**](WafActiveRulesApi.md#createWafActiveRule) | **POST** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules | Add a rule to a WAF as an active rule -[**createWafActiveRulesTag()**](WafActiveRulesApi.md#createWafActiveRulesTag) | **POST** /waf/firewalls/{firewall_id}/versions/{version_id}/tags/{waf_tag_name}/active-rules | Create active rules by tag -[**deleteWafActiveRule()**](WafActiveRulesApi.md#deleteWafActiveRule) | **DELETE** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/{waf_rule_id} | Delete an active rule -[**getWafActiveRule()**](WafActiveRulesApi.md#getWafActiveRule) | **GET** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/{waf_rule_id} | Get an active WAF rule object -[**listWafActiveRules()**](WafActiveRulesApi.md#listWafActiveRules) | **GET** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules | List active rules on a WAF -[**updateWafActiveRule()**](WafActiveRulesApi.md#updateWafActiveRule) | **PATCH** /waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/{waf_rule_id} | Update an active rule - - -## `bulkDeleteWafActiveRules()` - -```php -bulkDeleteWafActiveRules($options) // Delete multiple active rules from a WAF -``` - -Delete many active rules on a particular firewall version using the active rule ID. Limited to 500 rules per request. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['request_body'] = {"data":[{"type":"waf_active_rule","id":"3krg2uUGZzb2W9Euo4moOR"}]}; // array - -try { - $apiInstance->bulkDeleteWafActiveRules($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->bulkDeleteWafActiveRules: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `bulkUpdateWafActiveRules()` - -```php -bulkUpdateWafActiveRules($options) // Update multiple active rules -``` - -Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['body'] = {"type":"waf_active_rule","attributes":{"revision":"latest"}}; // \Fastly\Model\WafActiveRuleData - -try { - $apiInstance->bulkUpdateWafActiveRules($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->bulkUpdateWafActiveRules: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**body** | **\Fastly\Model\WafActiveRuleData** | | [optional] - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `createWafActiveRule()` - -```php -createWafActiveRule($options): \Fastly\Model\WafActiveRuleCreationResponse // Add a rule to a WAF as an active rule -``` - -Create an active rule for a particular firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['waf_active_rule'] = {"data":{"type":"waf_active_rule","attributes":{"status":"log"},"relationships":{"waf_rule_revision":{"data":[{"type":"waf_rule_revision","id":"r3Vg2uUGZzb2W9Euo4mo0R"}]}}}}; // \Fastly\Model\WafActiveRule - -try { - $result = $apiInstance->createWafActiveRule($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->createWafActiveRule: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**waf_active_rule** | [**\Fastly\Model\WafActiveRule**](../Model/WafActiveRule.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafActiveRuleCreationResponse**](../Model/WafActiveRuleCreationResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `createWafActiveRulesTag()` - -```php -createWafActiveRulesTag($options) // Create active rules by tag -``` - -Create active rules by tag. This endpoint will create active rules using the latest revision available for each rule. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['waf_tag_name'] = 'waf_tag_name_example'; // string | Name of the tag. -$options['waf_active_rule'] = {"data":{"type":"waf_active_rule","attributes":{"status":"log"}}}; // \Fastly\Model\WafActiveRule - -try { - $apiInstance->createWafActiveRulesTag($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->createWafActiveRulesTag: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**waf_tag_name** | **string** | Name of the tag. | -**waf_active_rule** | [**\Fastly\Model\WafActiveRule**](../Model/WafActiveRule.md) | | [optional] - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `deleteWafActiveRule()` - -```php -deleteWafActiveRule($options) // Delete an active rule -``` - -Delete an active rule for a particular firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. - -try { - $apiInstance->deleteWafActiveRule($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->deleteWafActiveRule: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getWafActiveRule()` - -```php -getWafActiveRule($options): \Fastly\Model\WafActiveRuleResponse // Get an active WAF rule object -``` - -Get a specific active rule object. Includes details of the rule revision associated with the active rule object by default. - -### Example -```php - $options['include'] = waf_rule_revision,waf_firewall_version; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. - -try { - $result = $apiInstance->getWafActiveRule($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->getWafActiveRule: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. | [optional] -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | - -### Return type - -[**\Fastly\Model\WafActiveRuleResponse**](../Model/WafActiveRuleResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafActiveRules()` - -```php -listWafActiveRules($options): \Fastly\Model\WafActiveRulesResponse // List active rules on a WAF -``` - -List all active rules for a particular firewall version. - -### Example -```php - $options['filter_status'] = 'filter_status_example'; // string | Limit results to active rules with the specified status. -$options['filter_waf_rule_revision_message'] = 'filter_waf_rule_revision_message_example'; // string | Limit results to active rules with the specified message. -$options['filter_waf_rule_revision_modsec_rule_id'] = 'filter_waf_rule_revision_modsec_rule_id_example'; // string | Limit results to active rules that represent the specified ModSecurity modsec_rule_id. -$options['filter_outdated'] = 'filter_outdated_example'; // string | Limit results to active rules referencing an outdated rule revision. -$options['include'] = waf_rule_revision,waf_firewall_version; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. - -try { - $result = $apiInstance->listWafActiveRules($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->listWafActiveRules: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_status** | **string** | Limit results to active rules with the specified status. | [optional] -**filter_waf_rule_revision_message** | **string** | Limit results to active rules with the specified message. | [optional] -**filter_waf_rule_revision_modsec_rule_id** | **string** | Limit results to active rules that represent the specified ModSecurity modsec_rule_id. | [optional] -**filter_outdated** | **string** | Limit results to active rules referencing an outdated rule revision. | [optional] -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | - -### Return type - -[**\Fastly\Model\WafActiveRulesResponse**](../Model/WafActiveRulesResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafActiveRule()` - -```php -updateWafActiveRule($options): \Fastly\Model\WafActiveRuleResponse // Update an active rule -``` - -Update an active rule's status for a particular firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['version_id'] = 56; // int | Integer identifying a service version. -$options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. -$options['waf_active_rule'] = {"data":{"id":"3krg2uUGZzb2W9Euo4moOR","type":"waf_active_rule","attributes":{"status":"block"}}}; // \Fastly\Model\WafActiveRule - -try { - $result = $apiInstance->updateWafActiveRule($options); -} catch (Exception $e) { - echo 'Exception when calling WafActiveRulesApi->updateWafActiveRule: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**version_id** | **int** | Integer identifying a service version. | -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | -**waf_active_rule** | [**\Fastly\Model\WafActiveRule**](../Model/WafActiveRule.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafActiveRuleResponse**](../Model/WafActiveRuleResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/WafExclusionsApi.md b/docs/Api/WafExclusionsApi.md deleted file mode 100644 index 66816630..00000000 --- a/docs/Api/WafExclusionsApi.md +++ /dev/null @@ -1,227 +0,0 @@ -# Fastly\Api\WafExclusionsApi - - -```php -$apiInstance = new Fastly\Api\WafExclusionsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**createWafRuleExclusion()**](WafExclusionsApi.md#createWafRuleExclusion) | **POST** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions | Create a WAF rule exclusion -[**deleteWafRuleExclusion()**](WafExclusionsApi.md#deleteWafRuleExclusion) | **DELETE** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions/{exclusion_number} | Delete a WAF rule exclusion -[**getWafRuleExclusion()**](WafExclusionsApi.md#getWafRuleExclusion) | **GET** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions/{exclusion_number} | Get a WAF rule exclusion -[**listWafRuleExclusions()**](WafExclusionsApi.md#listWafRuleExclusions) | **GET** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions | List WAF rule exclusions -[**updateWafRuleExclusion()**](WafExclusionsApi.md#updateWafRuleExclusion) | **PATCH** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions/{exclusion_number} | Update a WAF rule exclusion - - -## `createWafRuleExclusion()` - -```php -createWafRuleExclusion($options): \Fastly\Model\WafExclusionResponse // Create a WAF rule exclusion -``` - -Create a WAF exclusion for a particular firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. -$options['waf_exclusion'] = {"data":{"type":"waf_exclusion","attributes":{"exclusion_type":"rule","condition":"req.url.basename == \"index.html\"","name":"test-waf-exclusion"},"relationships":{"waf_rules":{"data":[{"id":2500162,"type":"waf_rule"}]}}}}; // \Fastly\Model\WafExclusion - -try { - $result = $apiInstance->createWafRuleExclusion($options); -} catch (Exception $e) { - echo 'Exception when calling WafExclusionsApi->createWafRuleExclusion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | -**waf_exclusion** | [**\Fastly\Model\WafExclusion**](../Model/WafExclusion.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafExclusionResponse**](../Model/WafExclusionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `deleteWafRuleExclusion()` - -```php -deleteWafRuleExclusion($options) // Delete a WAF rule exclusion -``` - -Delete a WAF exclusion for a particular firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. -$options['exclusion_number'] = 56; // int | A numeric ID identifying a WAF exclusion. - -try { - $apiInstance->deleteWafRuleExclusion($options); -} catch (Exception $e) { - echo 'Exception when calling WafExclusionsApi->deleteWafRuleExclusion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | -**exclusion_number** | **int** | A numeric ID identifying a WAF exclusion. | - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getWafRuleExclusion()` - -```php -getWafRuleExclusion($options): \Fastly\Model\WafExclusionResponse // Get a WAF rule exclusion -``` - -Get a specific WAF exclusion object. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. -$options['exclusion_number'] = 56; // int | A numeric ID identifying a WAF exclusion. - -try { - $result = $apiInstance->getWafRuleExclusion($options); -} catch (Exception $e) { - echo 'Exception when calling WafExclusionsApi->getWafRuleExclusion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | -**exclusion_number** | **int** | A numeric ID identifying a WAF exclusion. | - -### Return type - -[**\Fastly\Model\WafExclusionResponse**](../Model/WafExclusionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafRuleExclusions()` - -```php -listWafRuleExclusions($options): \Fastly\Model\WafExclusionsResponse // List WAF rule exclusions -``` - -List all exclusions for a particular firewall version. - -### Example -```php - $options['filter_exclusion_type'] = 'filter_exclusion_type_example'; // string | Filters the results based on this exclusion type. -$options['filter_name'] = 'filter_name_example'; // string | Filters the results based on name. -$options['filter_waf_rules_modsec_rule_id'] = 56; // int | Filters the results based on this ModSecurity rule ID. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = waf_rules; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. - -try { - $result = $apiInstance->listWafRuleExclusions($options); -} catch (Exception $e) { - echo 'Exception when calling WafExclusionsApi->listWafRuleExclusions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_exclusion_type** | **string** | Filters the results based on this exclusion type. | [optional] [one of: 'rule', 'variable', 'waf'] -**filter_name** | **string** | Filters the results based on name. | [optional] -**filter_waf_rules_modsec_rule_id** | **int** | Filters the results based on this ModSecurity rule ID. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. | [optional] -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | - -### Return type - -[**\Fastly\Model\WafExclusionsResponse**](../Model/WafExclusionsResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafRuleExclusion()` - -```php -updateWafRuleExclusion($options): \Fastly\Model\WafExclusionResponse // Update a WAF rule exclusion -``` - -Update a WAF exclusion for a particular firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. -$options['exclusion_number'] = 56; // int | A numeric ID identifying a WAF exclusion. -$options['waf_exclusion'] = {"data":{"type":"waf_exclusion","attributes":{"logging":false,"condition":"req.url.basename == \"index.html\" || req.url.basename == \"admin.html\"","name":"updated-test-waf-exclusion"}}}; // \Fastly\Model\WafExclusion - -try { - $result = $apiInstance->updateWafRuleExclusion($options); -} catch (Exception $e) { - echo 'Exception when calling WafExclusionsApi->updateWafRuleExclusion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | -**exclusion_number** | **int** | A numeric ID identifying a WAF exclusion. | -**waf_exclusion** | [**\Fastly\Model\WafExclusion**](../Model/WafExclusion.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafExclusionResponse**](../Model/WafExclusionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/WafFirewallVersionsApi.md b/docs/Api/WafFirewallVersionsApi.md deleted file mode 100644 index 2922b32c..00000000 --- a/docs/Api/WafFirewallVersionsApi.md +++ /dev/null @@ -1,250 +0,0 @@ -# Fastly\Api\WafFirewallVersionsApi - - -```php -$apiInstance = new Fastly\Api\WafFirewallVersionsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**cloneWafFirewallVersion()**](WafFirewallVersionsApi.md#cloneWafFirewallVersion) | **PUT** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/clone | Clone a firewall version -[**createWafFirewallVersion()**](WafFirewallVersionsApi.md#createWafFirewallVersion) | **POST** /waf/firewalls/{firewall_id}/versions | Create a firewall version -[**deployActivateWafFirewallVersion()**](WafFirewallVersionsApi.md#deployActivateWafFirewallVersion) | **PUT** /waf/firewalls/{firewall_id}/versions/{firewall_version_number}/activate | Deploy or activate a firewall version -[**getWafFirewallVersion()**](WafFirewallVersionsApi.md#getWafFirewallVersion) | **GET** /waf/firewalls/{firewall_id}/versions/{firewall_version_number} | Get a firewall version -[**listWafFirewallVersions()**](WafFirewallVersionsApi.md#listWafFirewallVersions) | **GET** /waf/firewalls/{firewall_id}/versions | List firewall versions -[**updateWafFirewallVersion()**](WafFirewallVersionsApi.md#updateWafFirewallVersion) | **PATCH** /waf/firewalls/{firewall_id}/versions/{firewall_version_number} | Update a firewall version - - -## `cloneWafFirewallVersion()` - -```php -cloneWafFirewallVersion($options): \Fastly\Model\WafFirewallVersionResponse // Clone a firewall version -``` - -Clone a specific, existing firewall version into a new, draft firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. - -try { - $result = $apiInstance->cloneWafFirewallVersion($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallVersionsApi->cloneWafFirewallVersion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | - -### Return type - -[**\Fastly\Model\WafFirewallVersionResponse**](../Model/WafFirewallVersionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `createWafFirewallVersion()` - -```php -createWafFirewallVersion($options): \Fastly\Model\WafFirewallVersionResponse // Create a firewall version -``` - -Create a new, draft firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['waf_firewall_version'] = {}; // \Fastly\Model\WafFirewallVersion - -try { - $result = $apiInstance->createWafFirewallVersion($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallVersionsApi->createWafFirewallVersion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**waf_firewall_version** | [**\Fastly\Model\WafFirewallVersion**](../Model/WafFirewallVersion.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafFirewallVersionResponse**](../Model/WafFirewallVersionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `deployActivateWafFirewallVersion()` - -```php -deployActivateWafFirewallVersion($options): object // Deploy or activate a firewall version -``` - -Deploy or activate a specific firewall version. If a firewall has been disabled, deploying a firewall version will automatically enable the firewall again. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. - -try { - $result = $apiInstance->deployActivateWafFirewallVersion($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallVersionsApi->deployActivateWafFirewallVersion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getWafFirewallVersion()` - -```php -getWafFirewallVersion($options): \Fastly\Model\WafFirewallVersionResponse // Get a firewall version -``` - -Get details about a specific firewall version. - -### Example -```php - $options['include'] = waf_firewall,waf_active_rules; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. - -try { - $result = $apiInstance->getWafFirewallVersion($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallVersionsApi->getWafFirewallVersion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. | [optional] -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | - -### Return type - -[**\Fastly\Model\WafFirewallVersionResponse**](../Model/WafFirewallVersionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafFirewallVersions()` - -```php -listWafFirewallVersions($options): \Fastly\Model\WafFirewallVersionsResponse // List firewall versions -``` - -Get a list of firewall versions associated with a specific firewall. - -### Example -```php - $options['include'] = waf_firewall; // string | Include relationships. Optional. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. - -try { - $result = $apiInstance->listWafFirewallVersions($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallVersionsApi->listWafFirewallVersions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**include** | **string** | Include relationships. Optional. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | - -### Return type - -[**\Fastly\Model\WafFirewallVersionsResponse**](../Model/WafFirewallVersionsResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafFirewallVersion()` - -```php -updateWafFirewallVersion($options): \Fastly\Model\WafFirewallVersionResponse // Update a firewall version -``` - -Update a specific firewall version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['firewall_version_number'] = 56; // int | Integer identifying a WAF firewall version. -$options['waf_firewall_version'] = {"data":{"type":"waf_firewall_version","attributes":{"notice_anomaly_score":12}}}; // \Fastly\Model\WafFirewallVersion - -try { - $result = $apiInstance->updateWafFirewallVersion($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallVersionsApi->updateWafFirewallVersion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**firewall_version_number** | **int** | Integer identifying a WAF firewall version. | -**waf_firewall_version** | [**\Fastly\Model\WafFirewallVersion**](../Model/WafFirewallVersion.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafFirewallVersionResponse**](../Model/WafFirewallVersionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/WafFirewallsApi.md b/docs/Api/WafFirewallsApi.md deleted file mode 100644 index 9ba08d0d..00000000 --- a/docs/Api/WafFirewallsApi.md +++ /dev/null @@ -1,211 +0,0 @@ -# Fastly\Api\WafFirewallsApi - - -```php -$apiInstance = new Fastly\Api\WafFirewallsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**createWafFirewall()**](WafFirewallsApi.md#createWafFirewall) | **POST** /waf/firewalls | Create a firewall -[**deleteWafFirewall()**](WafFirewallsApi.md#deleteWafFirewall) | **DELETE** /waf/firewalls/{firewall_id} | Delete a firewall -[**getWafFirewall()**](WafFirewallsApi.md#getWafFirewall) | **GET** /waf/firewalls/{firewall_id} | Get a firewall -[**listWafFirewalls()**](WafFirewallsApi.md#listWafFirewalls) | **GET** /waf/firewalls | List firewalls -[**updateWafFirewall()**](WafFirewallsApi.md#updateWafFirewall) | **PATCH** /waf/firewalls/{firewall_id} | Update a firewall - - -## `createWafFirewall()` - -```php -createWafFirewall($options): \Fastly\Model\WafFirewallResponse // Create a firewall -``` - -Create a firewall object for a particular service and service version using a defined `prefetch_condition` and `response`. If the `prefetch_condition` or the `response` is missing from the request body, Fastly will generate a default object on your service. - -### Example -```php - $options['waf_firewall'] = {"data":{"type":"waf_firewall","attributes":{"prefetch_condition":"WAF_Condition","response":"WAF_Error","service_id":"SU1Z0isxPaozGVKXdv0eY","service_version_number":1}}}; // \Fastly\Model\WafFirewall - -try { - $result = $apiInstance->createWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallsApi->createWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**waf_firewall** | [**\Fastly\Model\WafFirewall**](../Model/WafFirewall.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafFirewallResponse**](../Model/WafFirewallResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `deleteWafFirewall()` - -```php -deleteWafFirewall($options) // Delete a firewall -``` - -Delete the firewall object for a particular service and service version. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['waf_firewall'] = {"data":{"id":"fW7g2uUGZzb2W9Euo4Mo0r","type":"waf_firewall","attributes":{"service_version_number":1}}}; // \Fastly\Model\WafFirewall - -try { - $apiInstance->deleteWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallsApi->deleteWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**waf_firewall** | [**\Fastly\Model\WafFirewall**](../Model/WafFirewall.md) | | [optional] - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getWafFirewall()` - -```php -getWafFirewall($options): \Fastly\Model\WafFirewallResponse // Get a firewall -``` - -Get a specific firewall object. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['filter_service_version_number'] = 'filter_service_version_number_example'; // string | Limit the results returned to a specific service version. -$options['include'] = 'waf_firewall_versions'; // string | Include related objects. Optional. - -try { - $result = $apiInstance->getWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallsApi->getWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**filter_service_version_number** | **string** | Limit the results returned to a specific service version. | [optional] -**include** | **string** | Include related objects. Optional. | [optional] [one of: 'waf_firewall_versions'] [defaults to 'waf_firewall_versions'] - -### Return type - -[**\Fastly\Model\WafFirewallResponse**](../Model/WafFirewallResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafFirewalls()` - -```php -listWafFirewalls($options): \Fastly\Model\WafFirewallsResponse // List firewalls -``` - -List all firewall objects. - -### Example -```php - $options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['filter_service_id'] = 'filter_service_id_example'; // string | Limit the results returned to a specific service. -$options['filter_service_version_number'] = 'filter_service_version_number_example'; // string | Limit the results returned to a specific service version. -$options['include'] = 'waf_firewall_versions'; // string | Include related objects. Optional. - -try { - $result = $apiInstance->listWafFirewalls($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallsApi->listWafFirewalls: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**filter_service_id** | **string** | Limit the results returned to a specific service. | [optional] -**filter_service_version_number** | **string** | Limit the results returned to a specific service version. | [optional] -**include** | **string** | Include related objects. Optional. | [optional] [one of: 'waf_firewall_versions'] [defaults to 'waf_firewall_versions'] - -### Return type - -[**\Fastly\Model\WafFirewallsResponse**](../Model/WafFirewallsResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateWafFirewall()` - -```php -updateWafFirewall($options): \Fastly\Model\WafFirewallResponse // Update a firewall -``` - -Update a firewall object for a particular service and service version. Specifying a `service_version_number` is required. - -### Example -```php - $options['firewall_id'] = 'firewall_id_example'; // string | Alphanumeric string identifying a WAF Firewall. -$options['waf_firewall'] = {"data":{"id":"fW7g2uUGZzb2W9Euo4Mo0r","type":"waf_firewall","attributes":{"response":"NEW_RESPONSE","service_version_number":1}}}; // \Fastly\Model\WafFirewall - -try { - $result = $apiInstance->updateWafFirewall($options); -} catch (Exception $e) { - echo 'Exception when calling WafFirewallsApi->updateWafFirewall: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**firewall_id** | **string** | Alphanumeric string identifying a WAF Firewall. | -**waf_firewall** | [**\Fastly\Model\WafFirewall**](../Model/WafFirewall.md) | | [optional] - -### Return type - -[**\Fastly\Model\WafFirewallResponse**](../Model/WafFirewallResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/WafRuleRevisionsApi.md b/docs/Api/WafRuleRevisionsApi.md deleted file mode 100644 index 47df365f..00000000 --- a/docs/Api/WafRuleRevisionsApi.md +++ /dev/null @@ -1,100 +0,0 @@ -# Fastly\Api\WafRuleRevisionsApi - - -```php -$apiInstance = new Fastly\Api\WafRuleRevisionsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getWafRuleRevision()**](WafRuleRevisionsApi.md#getWafRuleRevision) | **GET** /waf/rules/{waf_rule_id}/revisions/{waf_rule_revision_number} | Get a revision of a rule -[**listWafRuleRevisions()**](WafRuleRevisionsApi.md#listWafRuleRevisions) | **GET** /waf/rules/{waf_rule_id}/revisions | List revisions for a rule - - -## `getWafRuleRevision()` - -```php -getWafRuleRevision($options): \Fastly\Model\WafRuleRevisionResponse // Get a revision of a rule -``` - -Get a specific rule revision. - -### Example -```php - $options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. -$options['waf_rule_revision_number'] = 56; // int | Revision number. -$options['include'] = source,vcl,waf_rule; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. - -try { - $result = $apiInstance->getWafRuleRevision($options); -} catch (Exception $e) { - echo 'Exception when calling WafRuleRevisionsApi->getWafRuleRevision: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | -**waf_rule_revision_number** | **int** | Revision number. | -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. | [optional] - -### Return type - -[**\Fastly\Model\WafRuleRevisionResponse**](../Model/WafRuleRevisionResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafRuleRevisions()` - -```php -listWafRuleRevisions($options): \Fastly\Model\WafRuleRevisionsResponse // List revisions for a rule -``` - -List all revisions for a specific rule. The `rule_id` provided can be the ModSecurity Rule ID or the Fastly generated rule ID. - -### Example -```php - $options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = waf_rule; // string | Include relationships. Optional. - -try { - $result = $apiInstance->listWafRuleRevisions($options); -} catch (Exception $e) { - echo 'Exception when calling WafRuleRevisionsApi->listWafRuleRevisions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional. | [optional] [one of: 'waf_rule'] [defaults to 'waf_rule'] - -### Return type - -[**\Fastly\Model\WafRuleRevisionsResponse**](../Model/WafRuleRevisionsResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/WafRulesApi.md b/docs/Api/WafRulesApi.md deleted file mode 100644 index 7f622065..00000000 --- a/docs/Api/WafRulesApi.md +++ /dev/null @@ -1,104 +0,0 @@ -# Fastly\Api\WafRulesApi - - -```php -$apiInstance = new Fastly\Api\WafRulesApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**getWafRule()**](WafRulesApi.md#getWafRule) | **GET** /waf/rules/{waf_rule_id} | Get a rule -[**listWafRules()**](WafRulesApi.md#listWafRules) | **GET** /waf/rules | List available WAF rules - - -## `getWafRule()` - -```php -getWafRule($options): \Fastly\Model\WafRuleResponse // Get a rule -``` - -Get a specific rule. The `id` provided can be the ModSecurity Rule ID or the Fastly generated rule ID. - -### Example -```php - $options['waf_rule_id'] = 'waf_rule_id_example'; // string | Alphanumeric string identifying a WAF rule. -$options['include'] = waf_tags,waf_rule_revisions; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. - -try { - $result = $apiInstance->getWafRule($options); -} catch (Exception $e) { - echo 'Exception when calling WafRulesApi->getWafRule: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**waf_rule_id** | **string** | Alphanumeric string identifying a WAF rule. | -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. | [optional] - -### Return type - -[**\Fastly\Model\WafRuleResponse**](../Model/WafRuleResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listWafRules()` - -```php -listWafRules($options): \Fastly\Model\WafRulesResponse // List available WAF rules -``` - -List all available WAF rules. - -### Example -```php - $options['filter_modsec_rule_id'] = 'filter_modsec_rule_id_example'; // string | Limit the returned rules to a specific ModSecurity rule ID. -$options['filter_waf_tags_name'] = 'filter_waf_tags_name_example'; // string | Limit the returned rules to a set linked to a tag by name. -$options['filter_waf_rule_revisions_source'] = 'filter_waf_rule_revisions_source_example'; // string | Limit the returned rules to a set linked to a source. -$options['filter_waf_firewall_id_not_match'] = 'filter_waf_firewall_id_not_match_example'; // string | Limit the returned rules to a set not included in the active firewall version for a firewall. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = waf_tags,waf_rule_revisions; // string | Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. - -try { - $result = $apiInstance->listWafRules($options); -} catch (Exception $e) { - echo 'Exception when calling WafRulesApi->listWafRules: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_modsec_rule_id** | **string** | Limit the returned rules to a specific ModSecurity rule ID. | [optional] -**filter_waf_tags_name** | **string** | Limit the returned rules to a set linked to a tag by name. | [optional] -**filter_waf_rule_revisions_source** | **string** | Limit the returned rules to a set linked to a source. | [optional] -**filter_waf_firewall_id_not_match** | **string** | Limit the returned rules to a set not included in the active firewall version for a firewall. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. | [optional] - -### Return type - -[**\Fastly\Model\WafRulesResponse**](../Model/WafRulesResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/WafTagsApi.md b/docs/Api/WafTagsApi.md deleted file mode 100644 index d78b15db..00000000 --- a/docs/Api/WafTagsApi.md +++ /dev/null @@ -1,61 +0,0 @@ -# Fastly\Api\WafTagsApi - - -```php -$apiInstance = new Fastly\Api\WafTagsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**listWafTags()**](WafTagsApi.md#listWafTags) | **GET** /waf/tags | List tags - - -## `listWafTags()` - -```php -listWafTags($options): \Fastly\Model\WafTagsResponse // List tags -``` - -List all tags. - -### Example -```php - $options['filter_name'] = 'filter_name_example'; // string | Limit the returned tags to a specific name. -$options['page_number'] = 1; // int | Current page. -$options['page_size'] = 20; // int | Number of records per page. -$options['include'] = waf_rules; // string | Include relationships. Optional. - -try { - $result = $apiInstance->listWafTags($options); -} catch (Exception $e) { - echo 'Exception when calling WafTagsApi->listWafTags: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**filter_name** | **string** | Limit the returned tags to a specific name. | [optional] -**page_number** | **int** | Current page. | [optional] -**page_size** | **int** | Number of records per page. | [optional] [defaults to 20] -**include** | **string** | Include relationships. Optional. | [optional] [one of: 'waf_rules'] [defaults to 'waf_rules'] - -### Return type - -[**\Fastly\Model\WafTagsResponse**](../Model/WafTagsResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Model/Backend.md b/docs/Model/Backend.md index c585b255..41ab9d15 100644 --- a/docs/Model/Backend.md +++ b/docs/Model/Backend.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] diff --git a/docs/Model/BackendResponse.md b/docs/Model/BackendResponse.md index e5374591..4ae8bd32 100644 --- a/docs/Model/BackendResponse.md +++ b/docs/Model/BackendResponse.md @@ -22,6 +22,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] diff --git a/docs/Model/BotManagementResponseBodyGetAllServices.md b/docs/Model/BotManagementResponseBodyGetAllServices.md new file mode 100644 index 00000000..5378fcf4 --- /dev/null +++ b/docs/Model/BotManagementResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # BotManagementResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\BotManagementResponseProductProduct**](BotManagementResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Bot Management enabled. | [optional] +**_links** | [**\Fastly\Model\BotManagementResponseLinksGetAllServicesLinks**](BotManagementResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseCustomer.md b/docs/Model/BotManagementResponseCustomer.md new file mode 100644 index 00000000..b3d6a790 --- /dev/null +++ b/docs/Model/BotManagementResponseCustomer.md @@ -0,0 +1,10 @@ +# # BotManagementResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipMemberWafRule.md b/docs/Model/BotManagementResponseCustomerCustomer.md similarity index 55% rename from docs/Model/RelationshipMemberWafRule.md rename to docs/Model/BotManagementResponseCustomerCustomer.md index e474f68d..f55f5867 100644 --- a/docs/Model/RelationshipMemberWafRule.md +++ b/docs/Model/BotManagementResponseCustomerCustomer.md @@ -1,11 +1,11 @@ -# # RelationshipMemberWafRule +# # BotManagementResponseCustomerCustomer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRule**](TypeWafRule.md) | | [optional] -**id** | **string** | | [optional] [readonly] +**id** | **string** | Customer identifier | [optional] +**object** | **string** | Name of the object | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseEnabledServices.md b/docs/Model/BotManagementResponseEnabledServices.md new file mode 100644 index 00000000..28c35b1c --- /dev/null +++ b/docs/Model/BotManagementResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # BotManagementResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services with Bot Management enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafActiveRules.md b/docs/Model/BotManagementResponseLinksGetAllServices.md similarity index 55% rename from docs/Model/RelationshipWafActiveRules.md rename to docs/Model/BotManagementResponseLinksGetAllServices.md index 84e68acc..9e964a61 100644 --- a/docs/Model/RelationshipWafActiveRules.md +++ b/docs/Model/BotManagementResponseLinksGetAllServices.md @@ -1,10 +1,10 @@ -# # RelationshipWafActiveRules +# # BotManagementResponseLinksGetAllServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**waf_active_rules** | [**\Fastly\Model\RelationshipWafActiveRulesWafActiveRules**](RelationshipWafActiveRulesWafActiveRules.md) | | [optional] +**_links** | [**\Fastly\Model\BotManagementResponseLinksGetAllServicesLinks**](BotManagementResponseLinksGetAllServicesLinks.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BulkWafActiveRules.md b/docs/Model/BotManagementResponseLinksGetAllServicesLinks.md similarity index 63% rename from docs/Model/BulkWafActiveRules.md rename to docs/Model/BotManagementResponseLinksGetAllServicesLinks.md index b6652ef5..88ed21a9 100644 --- a/docs/Model/BulkWafActiveRules.md +++ b/docs/Model/BotManagementResponseLinksGetAllServicesLinks.md @@ -1,10 +1,10 @@ -# # BulkWafActiveRules +# # BotManagementResponseLinksGetAllServicesLinks ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafActiveRuleData[]**](WafActiveRuleData.md) | | [optional] +**self** | **string** | Location of the resource | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseBodyGetAllServices.md b/docs/Model/BrotliCompressionResponseBodyGetAllServices.md new file mode 100644 index 00000000..12aa56c2 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # BrotliCompressionResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\BrotliCompressionResponseProductProduct**](BrotliCompressionResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Brotli Compression enabled. | [optional] +**_links** | [**\Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks**](BrotliCompressionResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseCustomer.md b/docs/Model/BrotliCompressionResponseCustomer.md new file mode 100644 index 00000000..9b9409c2 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseCustomer.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseEnabledServices.md b/docs/Model/BrotliCompressionResponseEnabledServices.md new file mode 100644 index 00000000..a6891260 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services with Brotli Compression enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseLinksGetAllServices.md b/docs/Model/BrotliCompressionResponseLinksGetAllServices.md new file mode 100644 index 00000000..00e141f9 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks**](BrotliCompressionResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseLinksGetAllServicesLinks.md b/docs/Model/BrotliCompressionResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..c646eec2 --- /dev/null +++ b/docs/Model/BrotliCompressionResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # BrotliCompressionResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ComputeAclUpdateEntry.md b/docs/Model/ComputeAclUpdateEntry.md index a86774fa..4693b078 100644 --- a/docs/Model/ComputeAclUpdateEntry.md +++ b/docs/Model/ComputeAclUpdateEntry.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**op** | **string** | One of \"create\" or \"update\", indicating that the rest of this entry is to be added to/updated in the ACL. | [optional] +**op** | **string** | One of \"create\", \"update\", or \"delete\" indicating the operation to perform on the update. | [optional] **prefix** | **string** | An IP prefix defined in Classless Inter-Domain Routing (CIDR) format, i.e. a valid IP address (v4 or v6) followed by a forward slash (/) and a prefix length (0-32 or 0-128, depending on address family). | [optional] -**action** | **string** | The action taken on the IP address, either \"block\" or \"allow\". | [optional] +**action** | **string** | The action taken on the IP address, one of \"BLOCK\" or \"ALLOW\". If using the \"delete\" operation, no action should be specified. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafRule.md b/docs/Model/DdosProtectionAction.md similarity index 88% rename from docs/Model/TypeWafRule.md rename to docs/Model/DdosProtectionAction.md index 0cd69ddc..dc44c175 100644 --- a/docs/Model/TypeWafRule.md +++ b/docs/Model/DdosProtectionAction.md @@ -1,4 +1,4 @@ -# # TypeWafRule +# # DdosProtectionAction ## Properties diff --git a/docs/Model/DdosProtectionAttributeStats.md b/docs/Model/DdosProtectionAttributeStats.md new file mode 100644 index 00000000..e5badbda --- /dev/null +++ b/docs/Model/DdosProtectionAttributeStats.md @@ -0,0 +1,11 @@ +# # DdosProtectionAttributeStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**\Fastly\Model\DdosProtectionTrafficAttribute**](DdosProtectionTrafficAttribute.md) | | [optional] +**values** | [**\Fastly\Model\DdosProtectionAttributeValue[]**](DdosProtectionAttributeValue.md) | Values for traffic attribute. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafFirewallWafFirewall.md b/docs/Model/DdosProtectionAttributeValue.md similarity index 55% rename from docs/Model/RelationshipWafFirewallWafFirewall.md rename to docs/Model/DdosProtectionAttributeValue.md index 29f89d57..78c26132 100644 --- a/docs/Model/RelationshipWafFirewallWafFirewall.md +++ b/docs/Model/DdosProtectionAttributeValue.md @@ -1,10 +1,11 @@ -# # RelationshipWafFirewallWafFirewall +# # DdosProtectionAttributeValue ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\RelationshipMemberWafFirewall[]**](RelationshipMemberWafFirewall.md) | | [optional] +**value** | **string** | | [optional] +**percentage** | **int** | Percentage of traffic containing a value. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionError.md b/docs/Model/DdosProtectionError.md new file mode 100644 index 00000000..4155b002 --- /dev/null +++ b/docs/Model/DdosProtectionError.md @@ -0,0 +1,13 @@ +# # DdosProtectionError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | | [optional] +**status** | **int** | | [optional] +**detail** | **string** | | [optional] +**errors** | [**\Fastly\Model\DdosProtectionErrorErrors[]**](DdosProtectionErrorErrors.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionErrorErrors.md b/docs/Model/DdosProtectionErrorErrors.md new file mode 100644 index 00000000..0ebf2d2f --- /dev/null +++ b/docs/Model/DdosProtectionErrorErrors.md @@ -0,0 +1,11 @@ +# # DdosProtectionErrorErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **string** | | [optional] +**error** | **string** | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionEvent.md b/docs/Model/DdosProtectionEvent.md new file mode 100644 index 00000000..aa485a0a --- /dev/null +++ b/docs/Model/DdosProtectionEvent.md @@ -0,0 +1,17 @@ +# # DdosProtectionEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**id** | **string** | Unique ID of the event. | [optional] +**name** | **string** | A human-readable name for the event. | [optional] +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**started_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**ended_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionEventAllOf.md b/docs/Model/DdosProtectionEventAllOf.md new file mode 100644 index 00000000..4c74e1bd --- /dev/null +++ b/docs/Model/DdosProtectionEventAllOf.md @@ -0,0 +1,15 @@ +# # DdosProtectionEventAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID of the event. | [optional] +**name** | **string** | A human-readable name for the event. | [optional] +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**started_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**ended_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IncludedWithWafFirewallVersionItem.md b/docs/Model/DdosProtectionNotAuthenticated.md similarity index 60% rename from docs/Model/IncludedWithWafFirewallVersionItem.md rename to docs/Model/DdosProtectionNotAuthenticated.md index 1e5aa101..6640f21a 100644 --- a/docs/Model/IncludedWithWafFirewallVersionItem.md +++ b/docs/Model/DdosProtectionNotAuthenticated.md @@ -1,10 +1,11 @@ -# # IncludedWithWafFirewallVersionItem +# # DdosProtectionNotAuthenticated ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafActiveRuleData**](WafActiveRuleData.md) | | [optional] +**title** | **string** | | [optional] +**status** | **int** | | [optional] [one of: 401] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionNotFound.md b/docs/Model/DdosProtectionNotFound.md new file mode 100644 index 00000000..b3792590 --- /dev/null +++ b/docs/Model/DdosProtectionNotFound.md @@ -0,0 +1,11 @@ +# # DdosProtectionNotFound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | | [optional] +**status** | **int** | | [optional] [one of: 404] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseBodyGetAllServices.md b/docs/Model/DdosProtectionResponseBodyGetAllServices.md new file mode 100644 index 00000000..c60388e9 --- /dev/null +++ b/docs/Model/DdosProtectionResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # DdosProtectionResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DdosProtectionResponseProductProduct**](DdosProtectionResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with DDoS Protection enabled. | [optional] +**_links** | [**\Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks**](DdosProtectionResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseCustomer.md b/docs/Model/DdosProtectionResponseCustomer.md new file mode 100644 index 00000000..9fea1210 --- /dev/null +++ b/docs/Model/DdosProtectionResponseCustomer.md @@ -0,0 +1,10 @@ +# # DdosProtectionResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafTags.md b/docs/Model/DdosProtectionResponseEnabledServices.md similarity index 59% rename from docs/Model/RelationshipWafTags.md rename to docs/Model/DdosProtectionResponseEnabledServices.md index 924feab1..8350ea34 100644 --- a/docs/Model/RelationshipWafTags.md +++ b/docs/Model/DdosProtectionResponseEnabledServices.md @@ -1,10 +1,10 @@ -# # RelationshipWafTags +# # DdosProtectionResponseEnabledServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**waf_tags** | [**\Fastly\Model\RelationshipWafTagsWafTags**](RelationshipWafTagsWafTags.md) | | [optional] +**services** | **string[]** | A list of services with DDoS Protection enabled. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewall.md b/docs/Model/DdosProtectionResponseLinksGetAllServices.md similarity index 55% rename from docs/Model/WafFirewall.md rename to docs/Model/DdosProtectionResponseLinksGetAllServices.md index 6b062d24..46c57161 100644 --- a/docs/Model/WafFirewall.md +++ b/docs/Model/DdosProtectionResponseLinksGetAllServices.md @@ -1,10 +1,10 @@ -# # WafFirewall +# # DdosProtectionResponseLinksGetAllServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafFirewallData**](WafFirewallData.md) | | [optional] +**_links** | [**\Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks**](DdosProtectionResponseLinksGetAllServicesLinks.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseLinksGetAllServicesLinks.md b/docs/Model/DdosProtectionResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..16a95817 --- /dev/null +++ b/docs/Model/DdosProtectionResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # DdosProtectionResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionRule.md b/docs/Model/DdosProtectionRule.md new file mode 100644 index 00000000..8a8889fb --- /dev/null +++ b/docs/Model/DdosProtectionRule.md @@ -0,0 +1,22 @@ +# # DdosProtectionRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**id** | **string** | Unique ID of the rule. | [optional] +**name** | **string** | A human-readable name for the rule. | [optional] +**action** | [**\Fastly\Model\DdosProtectionAction**](DdosProtectionAction.md) | | [optional] +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**source_ip** | **string** | Source IP address attribute. | [optional] +**country_code** | **string** | Country code attribute. | [optional] +**host** | **string** | Host attribute. | [optional] +**asn** | **string** | ASN attribute. | [optional] +**source_ip_prefix** | **string** | Source IP prefix attribute. | [optional] +**additional_attributes** | **string[]** | Attribute category for additional, unlisted attributes used in a rule. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionRuleAllOf.md b/docs/Model/DdosProtectionRuleAllOf.md new file mode 100644 index 00000000..d0a76c5f --- /dev/null +++ b/docs/Model/DdosProtectionRuleAllOf.md @@ -0,0 +1,20 @@ +# # DdosProtectionRuleAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID of the rule. | [optional] +**name** | **string** | A human-readable name for the rule. | [optional] +**action** | [**\Fastly\Model\DdosProtectionAction**](DdosProtectionAction.md) | | [optional] +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**source_ip** | **string** | Source IP address attribute. | [optional] +**country_code** | **string** | Country code attribute. | [optional] +**host** | **string** | Host attribute. | [optional] +**asn** | **string** | ASN attribute. | [optional] +**source_ip_prefix** | **string** | Source IP prefix attribute. | [optional] +**additional_attributes** | **string[]** | Attribute category for additional, unlisted attributes used in a rule. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafActiveRule.md b/docs/Model/DdosProtectionTrafficAttribute.md similarity index 84% rename from docs/Model/TypeWafActiveRule.md rename to docs/Model/DdosProtectionTrafficAttribute.md index a9a28f97..1f929842 100644 --- a/docs/Model/TypeWafActiveRule.md +++ b/docs/Model/DdosProtectionTrafficAttribute.md @@ -1,4 +1,4 @@ -# # TypeWafActiveRule +# # DdosProtectionTrafficAttribute ## Properties diff --git a/docs/Model/DdosProtectionTrafficStats.md b/docs/Model/DdosProtectionTrafficStats.md new file mode 100644 index 00000000..e0ed8c99 --- /dev/null +++ b/docs/Model/DdosProtectionTrafficStats.md @@ -0,0 +1,14 @@ +# # DdosProtectionTrafficStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**attributes** | [**\Fastly\Model\DdosProtectionAttributeStats[]**](DdosProtectionAttributeStats.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionTrafficStatsAllOf.md b/docs/Model/DdosProtectionTrafficStatsAllOf.md new file mode 100644 index 00000000..0bb57ec6 --- /dev/null +++ b/docs/Model/DdosProtectionTrafficStatsAllOf.md @@ -0,0 +1,12 @@ +# # DdosProtectionTrafficStatsAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**attributes** | [**\Fastly\Model\DdosProtectionAttributeStats[]**](DdosProtectionAttributeStats.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseBodyGetAllServices.md b/docs/Model/DomainInspectorResponseBodyGetAllServices.md new file mode 100644 index 00000000..e5effe68 --- /dev/null +++ b/docs/Model/DomainInspectorResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # DomainInspectorResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DomainInspectorResponseProductProduct**](DomainInspectorResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Domain Inspector enabled. | [optional] +**_links** | [**\Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks**](DomainInspectorResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseCustomer.md b/docs/Model/DomainInspectorResponseCustomer.md new file mode 100644 index 00000000..53165f6f --- /dev/null +++ b/docs/Model/DomainInspectorResponseCustomer.md @@ -0,0 +1,10 @@ +# # DomainInspectorResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafRuleWafRule.md b/docs/Model/DomainInspectorResponseEnabledServices.md similarity index 58% rename from docs/Model/RelationshipWafRuleWafRule.md rename to docs/Model/DomainInspectorResponseEnabledServices.md index ceb8240b..f5d1bece 100644 --- a/docs/Model/RelationshipWafRuleWafRule.md +++ b/docs/Model/DomainInspectorResponseEnabledServices.md @@ -1,10 +1,10 @@ -# # RelationshipWafRuleWafRule +# # DomainInspectorResponseEnabledServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\RelationshipMemberWafRule[]**](RelationshipMemberWafRule.md) | | [optional] +**services** | **string[]** | A list of services with Domain Inspector enabled. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusion.md b/docs/Model/DomainInspectorResponseLinksGetAllServices.md similarity index 55% rename from docs/Model/WafExclusion.md rename to docs/Model/DomainInspectorResponseLinksGetAllServices.md index 9d4f6713..7b0f6e3e 100644 --- a/docs/Model/WafExclusion.md +++ b/docs/Model/DomainInspectorResponseLinksGetAllServices.md @@ -1,10 +1,10 @@ -# # WafExclusion +# # DomainInspectorResponseLinksGetAllServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafExclusionData**](WafExclusionData.md) | | [optional] +**_links** | [**\Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks**](DomainInspectorResponseLinksGetAllServicesLinks.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseLinksGetAllServicesLinks.md b/docs/Model/DomainInspectorResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..6e41f4db --- /dev/null +++ b/docs/Model/DomainInspectorResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # DomainInspectorResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseBodyGetAllServices.md b/docs/Model/FanoutResponseBodyGetAllServices.md new file mode 100644 index 00000000..5deb4983 --- /dev/null +++ b/docs/Model/FanoutResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # FanoutResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\FanoutResponseProductProduct**](FanoutResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Fanout enabled. | [optional] +**_links** | [**\Fastly\Model\FanoutResponseLinksGetAllServicesLinks**](FanoutResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseCustomer.md b/docs/Model/FanoutResponseCustomer.md new file mode 100644 index 00000000..dd84ce1c --- /dev/null +++ b/docs/Model/FanoutResponseCustomer.md @@ -0,0 +1,10 @@ +# # FanoutResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseEnabledServices.md b/docs/Model/FanoutResponseEnabledServices.md new file mode 100644 index 00000000..1c51873c --- /dev/null +++ b/docs/Model/FanoutResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # FanoutResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services with Fanout enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseLinksGetAllServices.md b/docs/Model/FanoutResponseLinksGetAllServices.md new file mode 100644 index 00000000..04e15daf --- /dev/null +++ b/docs/Model/FanoutResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # FanoutResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\FanoutResponseLinksGetAllServicesLinks**](FanoutResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseLinksGetAllServicesLinks.md b/docs/Model/FanoutResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..a0082dbe --- /dev/null +++ b/docs/Model/FanoutResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # FanoutResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseBodyGetAllServices.md b/docs/Model/ImageOptimizerResponseBodyGetAllServices.md new file mode 100644 index 00000000..c33d1082 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # ImageOptimizerResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ImageOptimizerResponseProductProduct**](ImageOptimizerResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Image Optimizer enabled. | [optional] +**_links** | [**\Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks**](ImageOptimizerResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseCustomer.md b/docs/Model/ImageOptimizerResponseCustomer.md new file mode 100644 index 00000000..c71bb958 --- /dev/null +++ b/docs/Model/ImageOptimizerResponseCustomer.md @@ -0,0 +1,10 @@ +# # ImageOptimizerResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafRule.md b/docs/Model/ImageOptimizerResponseEnabledServices.md similarity index 59% rename from docs/Model/RelationshipWafRule.md rename to docs/Model/ImageOptimizerResponseEnabledServices.md index 1e1bed61..2090b3d8 100644 --- a/docs/Model/RelationshipWafRule.md +++ b/docs/Model/ImageOptimizerResponseEnabledServices.md @@ -1,10 +1,10 @@ -# # RelationshipWafRule +# # ImageOptimizerResponseEnabledServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**waf_rule** | [**\Fastly\Model\RelationshipWafRuleWafRule**](RelationshipWafRuleWafRule.md) | | [optional] +**services** | **string[]** | A list of services with Image Optimizer enabled. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipMemberWafFirewall.md b/docs/Model/ImageOptimizerResponseLinksGetAllServices.md similarity index 55% rename from docs/Model/RelationshipMemberWafFirewall.md rename to docs/Model/ImageOptimizerResponseLinksGetAllServices.md index 7c49cd69..5812e98d 100644 --- a/docs/Model/RelationshipMemberWafFirewall.md +++ b/docs/Model/ImageOptimizerResponseLinksGetAllServices.md @@ -1,11 +1,10 @@ -# # RelationshipMemberWafFirewall +# # ImageOptimizerResponseLinksGetAllServices ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewall**](TypeWafFirewall.md) | | [optional] -**id** | **string** | | [optional] [readonly] +**_links** | [**\Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks**](ImageOptimizerResponseLinksGetAllServicesLinks.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseLinksGetAllServicesLinks.md b/docs/Model/ImageOptimizerResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..ef95ca6f --- /dev/null +++ b/docs/Model/ImageOptimizerResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # ImageOptimizerResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IncludedWithWafActiveRuleItem.md b/docs/Model/IncludedWithWafActiveRuleItem.md deleted file mode 100644 index 8bade8a2..00000000 --- a/docs/Model/IncludedWithWafActiveRuleItem.md +++ /dev/null @@ -1,13 +0,0 @@ -# # IncludedWithWafActiveRuleItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SchemasWafFirewallVersionData**](SchemasWafFirewallVersionData.md) | | [optional] -**type** | [**\Fastly\Model\TypeWafRuleRevision**](TypeWafRuleRevision.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF rule revision. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleRevisionAttributes**](WafRuleRevisionAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IncludedWithWafExclusionItem.md b/docs/Model/IncludedWithWafExclusionItem.md deleted file mode 100644 index e68bc3a8..00000000 --- a/docs/Model/IncludedWithWafExclusionItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# # IncludedWithWafExclusionItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRuleRevision**](TypeWafRuleRevision.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF rule revision. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleRevisionAttributes**](WafRuleRevisionAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IncludedWithWafRuleItem.md b/docs/Model/IncludedWithWafRuleItem.md deleted file mode 100644 index e0b64e77..00000000 --- a/docs/Model/IncludedWithWafRuleItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# # IncludedWithWafRuleItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRuleRevision**](TypeWafRuleRevision.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF rule revision. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleRevisionAttributes**](WafRuleRevisionAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2002.md b/docs/Model/InlineResponse2002.md index 1c4b556f..4720b98a 100644 --- a/docs/Model/InlineResponse2002.md +++ b/docs/Model/InlineResponse2002.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**expires_at** | **string** | Time-stamp (GMT) when the domain_ownership validation will expire. | [optional] [readonly] +**data** | [**\Fastly\Model\DdosProtectionEvent[]**](DdosProtectionEvent.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2003.md b/docs/Model/InlineResponse2003.md index 20b23b2c..fe05b558 100644 --- a/docs/Model/InlineResponse2003.md +++ b/docs/Model/InlineResponse2003.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] +**data** | [**\Fastly\Model\DdosProtectionRule[]**](DdosProtectionRule.md) | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2004.md b/docs/Model/InlineResponse2004.md index 13d927e5..5fc18418 100644 --- a/docs/Model/InlineResponse2004.md +++ b/docs/Model/InlineResponse2004.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | **string[]** | | [optional] -**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] +**expires_at** | **string** | Time-stamp (GMT) when the domain_ownership validation will expire. | [optional] [readonly] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2005.md b/docs/Model/InlineResponse2005.md index 5fe489f7..4e608d88 100644 --- a/docs/Model/InlineResponse2005.md +++ b/docs/Model/InlineResponse2005.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SecretStoreResponse[]**](SecretStoreResponse.md) | | [optional] +**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2006.md b/docs/Model/InlineResponse2006.md index 3fbb62f4..c1f9e9c9 100644 --- a/docs/Model/InlineResponse2006.md +++ b/docs/Model/InlineResponse2006.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SecretResponse[]**](SecretResponse.md) | | [optional] +**data** | **string[]** | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2007.md b/docs/Model/InlineResponse2007.md index 98fb2fdc..9fdb0540 100644 --- a/docs/Model/InlineResponse2007.md +++ b/docs/Model/InlineResponse2007.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\ServiceAuthorizationResponseData[]**](ServiceAuthorizationResponseData.md) | | [optional] +**data** | [**\Fastly\Model\SecretStoreResponse[]**](SecretStoreResponse.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallData.md b/docs/Model/InlineResponse2008.md similarity index 52% rename from docs/Model/WafFirewallData.md rename to docs/Model/InlineResponse2008.md index e5d9103f..dadf558d 100644 --- a/docs/Model/WafFirewallData.md +++ b/docs/Model/InlineResponse2008.md @@ -1,11 +1,11 @@ -# # WafFirewallData +# # InlineResponse2008 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewall**](TypeWafFirewall.md) | | [optional] -**attributes** | [**\Fastly\Model\WafFirewallDataAttributes**](WafFirewallDataAttributes.md) | | [optional] +**data** | [**\Fastly\Model\SecretResponse[]**](SecretResponse.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2009.md b/docs/Model/InlineResponse2009.md new file mode 100644 index 00000000..ae38b8db --- /dev/null +++ b/docs/Model/InlineResponse2009.md @@ -0,0 +1,10 @@ +# # InlineResponse2009 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\ServiceAuthorizationResponseData[]**](ServiceAuthorizationResponseData.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KvStoreRequestCreate.md b/docs/Model/KvStoreRequestCreate.md index 92e46785..e156104e 100644 --- a/docs/Model/KvStoreRequestCreate.md +++ b/docs/Model/KvStoreRequestCreate.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | A human-readable name for the store. Refer to https://www.fastly.com/documentation/guides/concepts/edge-state/data-stores/#limitations-and-constraints for constraints on the KV store name. | +**name** | **string** | A human-readable name for the store. Refer to https://docs.fastly.com/products/compute-resource-limits#kv-store for limitations on the KV store name. | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogAggregationsFilterFieldItem.md b/docs/Model/LogAggregationsFilterFieldItem.md new file mode 100644 index 00000000..ca65b9b9 --- /dev/null +++ b/docs/Model/LogAggregationsFilterFieldItem.md @@ -0,0 +1,12 @@ +# # LogAggregationsFilterFieldItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **string** | The log field to which this filter should be applied. | [optional] +**operator** | **string** | The comparison operator used for this filter. | [optional] [one of: 'eq', 'ends-with', 'in', 'not_in', 'gt', 'gte', 'lt', 'lte'] +**value** | [**\Fastly\Model\LogAggregationsValueField**](LogAggregationsValueField.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogAggregationsGetResponse.md b/docs/Model/LogAggregationsGetResponse.md new file mode 100644 index 00000000..c9a9403c --- /dev/null +++ b/docs/Model/LogAggregationsGetResponse.md @@ -0,0 +1,11 @@ +# # LogAggregationsGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\LogAggregationsResult[]**](LogAggregationsResult.md) | | [optional] +**meta** | [**\Fastly\Model\LogAggregationsGetResponseMeta**](LogAggregationsGetResponseMeta.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogAggregationsGetResponseMeta.md b/docs/Model/LogAggregationsGetResponseMeta.md new file mode 100644 index 00000000..0c74617c --- /dev/null +++ b/docs/Model/LogAggregationsGetResponseMeta.md @@ -0,0 +1,15 @@ +# # LogAggregationsGetResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_id** | **string** | Specifies the ID of the service for which data should be returned. | [optional] +**start** | **string** | Start time for the query as supplied in the request. | [optional] +**end** | **string** | End time for the query as supplied in the request. | [optional] +**limit** | **int** | Number of records per page. | [optional] [defaults to 20] +**sort** | **string** | Comma-separated list of the series names whose values were used to sort the results. | [optional] +**filters** | [**\Fastly\Model\LogAggregationsGetResponseMetaFilters**](LogAggregationsGetResponseMetaFilters.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogAggregationsGetResponseMetaFilters.md b/docs/Model/LogAggregationsGetResponseMetaFilters.md new file mode 100644 index 00000000..79de0040 --- /dev/null +++ b/docs/Model/LogAggregationsGetResponseMetaFilters.md @@ -0,0 +1,10 @@ +# # LogAggregationsGetResponseMetaFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_fields** | [**\Fastly\Model\LogAggregationsFilterFieldItem[]**](LogAggregationsFilterFieldItem.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogAggregationsResult.md b/docs/Model/LogAggregationsResult.md new file mode 100644 index 00000000..4942c88a --- /dev/null +++ b/docs/Model/LogAggregationsResult.md @@ -0,0 +1,11 @@ +# # LogAggregationsResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | **array<string,object>** | | [optional] +**values** | **array<string,object>** | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafFirewall.md b/docs/Model/LogAggregationsValueField.md similarity index 86% rename from docs/Model/TypeWafFirewall.md rename to docs/Model/LogAggregationsValueField.md index 81142c42..32842865 100644 --- a/docs/Model/TypeWafFirewall.md +++ b/docs/Model/LogAggregationsValueField.md @@ -1,4 +1,4 @@ -# # TypeWafFirewall +# # LogAggregationsValueField ## Properties diff --git a/docs/Model/LogExplorerInsightsResponseBodyGetAllServices.md b/docs/Model/LogExplorerInsightsResponseBodyGetAllServices.md new file mode 100644 index 00000000..4e2eefc3 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # LogExplorerInsightsResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\LogExplorerInsightsResponseProductProduct**](LogExplorerInsightsResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A ist of services with Log Explorer & Insights enabled. | [optional] +**_links** | [**\Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks**](LogExplorerInsightsResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipMemberWafActiveRule.md b/docs/Model/LogExplorerInsightsResponseCustomer.md similarity index 53% rename from docs/Model/RelationshipMemberWafActiveRule.md rename to docs/Model/LogExplorerInsightsResponseCustomer.md index 23c385f7..c542199f 100644 --- a/docs/Model/RelationshipMemberWafActiveRule.md +++ b/docs/Model/LogExplorerInsightsResponseCustomer.md @@ -1,11 +1,10 @@ -# # RelationshipMemberWafActiveRule +# # LogExplorerInsightsResponseCustomer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafActiveRule**](TypeWafActiveRule.md) | | [optional] -**id** | **string** | | [optional] [readonly] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseEnabledServices.md b/docs/Model/LogExplorerInsightsResponseEnabledServices.md new file mode 100644 index 00000000..0d479d29 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # LogExplorerInsightsResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A ist of services with Log Explorer & Insights enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseLinksGetAllServices.md b/docs/Model/LogExplorerInsightsResponseLinksGetAllServices.md new file mode 100644 index 00000000..c24d09c3 --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # LogExplorerInsightsResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks**](LogExplorerInsightsResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.md b/docs/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..c535a1eb --- /dev/null +++ b/docs/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # LogExplorerInsightsResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesFilterFieldItem.md b/docs/Model/LogTimeseriesFilterFieldItem.md new file mode 100644 index 00000000..4f7e0eb9 --- /dev/null +++ b/docs/Model/LogTimeseriesFilterFieldItem.md @@ -0,0 +1,12 @@ +# # LogTimeseriesFilterFieldItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **string** | The log field to which this filter should be applied. | [optional] +**operator** | **string** | The comparison operator used for this filter. | [optional] [one of: 'eq', 'ends-with', 'in', 'not_in', 'gt', 'gte', 'lt', 'lte'] +**value** | [**\Fastly\Model\LogTimeseriesValueField**](LogTimeseriesValueField.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesGetResponse.md b/docs/Model/LogTimeseriesGetResponse.md new file mode 100644 index 00000000..d84013c0 --- /dev/null +++ b/docs/Model/LogTimeseriesGetResponse.md @@ -0,0 +1,11 @@ +# # LogTimeseriesGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\LogTimeseriesResult[]**](LogTimeseriesResult.md) | | [optional] +**meta** | [**\Fastly\Model\LogTimeseriesGetResponseMeta**](LogTimeseriesGetResponseMeta.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesGetResponseMeta.md b/docs/Model/LogTimeseriesGetResponseMeta.md new file mode 100644 index 00000000..fdef07de --- /dev/null +++ b/docs/Model/LogTimeseriesGetResponseMeta.md @@ -0,0 +1,14 @@ +# # LogTimeseriesGetResponseMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_id** | **string** | ID of the service for which data was returned. | [optional] +**start** | **string** | Start time for the query as supplied in the request. | [optional] +**end** | **string** | End time for the query as supplied in the request. | [optional] +**granularity** | **string** | The granularity of the time buckets in the response. | [optional] +**filters** | [**\Fastly\Model\LogTimeseriesGetResponseMetaFilters**](LogTimeseriesGetResponseMetaFilters.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesGetResponseMetaFilters.md b/docs/Model/LogTimeseriesGetResponseMetaFilters.md new file mode 100644 index 00000000..d33b0486 --- /dev/null +++ b/docs/Model/LogTimeseriesGetResponseMetaFilters.md @@ -0,0 +1,10 @@ +# # LogTimeseriesGetResponseMetaFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter_fields** | [**\Fastly\Model\LogTimeseriesFilterFieldItem[]**](LogTimeseriesFilterFieldItem.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesResult.md b/docs/Model/LogTimeseriesResult.md new file mode 100644 index 00000000..fd33d8e8 --- /dev/null +++ b/docs/Model/LogTimeseriesResult.md @@ -0,0 +1,11 @@ +# # LogTimeseriesResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | [**\Fastly\Model\LogTimeseriesResultDimensions**](LogTimeseriesResultDimensions.md) | | [optional] +**values** | **array<string,object>** | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafExclusion.md b/docs/Model/LogTimeseriesResultDimensions.md similarity index 72% rename from docs/Model/TypeWafExclusion.md rename to docs/Model/LogTimeseriesResultDimensions.md index a05943c0..51db9fb4 100644 --- a/docs/Model/TypeWafExclusion.md +++ b/docs/Model/LogTimeseriesResultDimensions.md @@ -1,9 +1,10 @@ -# # TypeWafExclusion +# # LogTimeseriesResultDimensions ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**time** | **string** | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafFirewallVersion.md b/docs/Model/LogTimeseriesValueField.md similarity index 87% rename from docs/Model/TypeWafFirewallVersion.md rename to docs/Model/LogTimeseriesValueField.md index f6059039..26ff50a7 100644 --- a/docs/Model/TypeWafFirewallVersion.md +++ b/docs/Model/LogTimeseriesValueField.md @@ -1,4 +1,4 @@ -# # TypeWafFirewallVersion +# # LogTimeseriesValueField ## Properties diff --git a/docs/Model/NgwafResponseBodyGetAllServices.md b/docs/Model/NgwafResponseBodyGetAllServices.md new file mode 100644 index 00000000..f3d7f3d9 --- /dev/null +++ b/docs/Model/NgwafResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # NgwafResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\NgwafResponseProductProduct**](NgwafResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with the Next-Gen WAF enabled. | [optional] +**_links** | [**\Fastly\Model\NgwafResponseLinksGetAllServicesLinks**](NgwafResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafFirewall.md b/docs/Model/NgwafResponseCustomer.md similarity index 55% rename from docs/Model/RelationshipWafFirewall.md rename to docs/Model/NgwafResponseCustomer.md index 60fa1ff8..bd46eb2c 100644 --- a/docs/Model/RelationshipWafFirewall.md +++ b/docs/Model/NgwafResponseCustomer.md @@ -1,10 +1,10 @@ -# # RelationshipWafFirewall +# # NgwafResponseCustomer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**waf_firewall** | [**\Fastly\Model\RelationshipWafFirewallWafFirewall**](RelationshipWafFirewallWafFirewall.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NgwafResponseEnabledServices.md b/docs/Model/NgwafResponseEnabledServices.md new file mode 100644 index 00000000..06681130 --- /dev/null +++ b/docs/Model/NgwafResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # NgwafResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services with the Next-Gen WAF enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NgwafResponseLinksGetAllServices.md b/docs/Model/NgwafResponseLinksGetAllServices.md new file mode 100644 index 00000000..5c1a933f --- /dev/null +++ b/docs/Model/NgwafResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # NgwafResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\NgwafResponseLinksGetAllServicesLinks**](NgwafResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NgwafResponseLinksGetAllServicesLinks.md b/docs/Model/NgwafResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..559c9770 --- /dev/null +++ b/docs/Model/NgwafResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # NgwafResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseBodyGetAllServices.md b/docs/Model/OriginInspectorResponseBodyGetAllServices.md new file mode 100644 index 00000000..4152db04 --- /dev/null +++ b/docs/Model/OriginInspectorResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # OriginInspectorResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\OriginInspectorResponseProductProduct**](OriginInspectorResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Origin Inspector enabled. | [optional] +**_links** | [**\Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks**](OriginInspectorResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseCustomer.md b/docs/Model/OriginInspectorResponseCustomer.md new file mode 100644 index 00000000..ff702df0 --- /dev/null +++ b/docs/Model/OriginInspectorResponseCustomer.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseEnabledServices.md b/docs/Model/OriginInspectorResponseEnabledServices.md new file mode 100644 index 00000000..a59a3858 --- /dev/null +++ b/docs/Model/OriginInspectorResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services with Origin Inspector enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseLinksGetAllServices.md b/docs/Model/OriginInspectorResponseLinksGetAllServices.md new file mode 100644 index 00000000..94a7862d --- /dev/null +++ b/docs/Model/OriginInspectorResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks**](OriginInspectorResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseLinksGetAllServicesLinks.md b/docs/Model/OriginInspectorResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..a39b0d52 --- /dev/null +++ b/docs/Model/OriginInspectorResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # OriginInspectorResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Pop.md b/docs/Model/Pop.md index affba94d..37cb1c48 100644 --- a/docs/Model/Pop.md +++ b/docs/Model/Pop.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **code** | **string** | the three-letter code for the [POP](https://www.fastly.com/documentation/learning/concepts/pop/) | **name** | **string** | the name of the POP | **group** | **string** | | -**region** | **string** | | [one of: 'APAC', 'Asia', 'AF-West', 'EU-Central', 'EU-East', 'EU-West', 'Middle-East', 'North-America', 'SA-South', 'SA-East', 'SA-West', 'SA-North', 'South-Africa', 'South-America', 'US-Central', 'US-East', 'US-West', 'Asia-South'] -**stats_region** | **string** | the region used for stats reporting | [one of: 'southamerica_std', 'africa_std', 'anzac', 'asia', 'europe', 'usa', 'asia_india', 'asia_southkorea'] -**billing_region** | **string** | the region used for billing | [one of: 'Africa', 'Australia', 'Asia', 'Europe', 'India', 'North America', 'South Korea', 'South America'] +**region** | **string** | | [one of: 'APAC', 'Asia', 'AF-West', 'EU-Central', 'EU-East', 'EU-West', 'MX-North', 'MX-Central', 'MX-South', 'Middle-East', 'North-America', 'SA-South', 'SA-East', 'SA-West', 'SA-North', 'South-Africa', 'South-America', 'US-Central', 'US-East', 'US-West', 'Asia-South'] +**stats_region** | **string** | the region used for stats reporting | [one of: 'southamerica_std', 'africa_std', 'anzac', 'asia', 'europe', 'usa', 'asia_india', 'asia_southkorea', 'mexico'] +**billing_region** | **string** | the region used for billing | [one of: 'Africa', 'Australia', 'Asia', 'Europe', 'India', 'Mexico', 'North America', 'South Korea', 'South America'] **coordinates** | [**\Fastly\Model\PopCoordinates**](PopCoordinates.md) | | [optional] **shield** | **string** | the name of the [shield code](https://www.fastly.com/documentation/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding | [optional] diff --git a/docs/Model/RateLimiter.md b/docs/Model/RateLimiter.md index 91078570..91a76904 100644 --- a/docs/Model/RateLimiter.md +++ b/docs/Model/RateLimiter.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | A human readable name for the rate limiting rule. | [optional] -**uri_dictionary_name** | **string** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] +**uri_dictionary_name** | **string** | The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] **http_methods** | **string[]** | Array of HTTP methods to apply rate limiting to. | [optional] [one of: 'HEAD', 'OPTIONS', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'TRACE'] **rps_limit** | **int** | Upper limit of requests per second allowed by the rate limiter. | [optional] **window_size** | **int** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] [one of: 1, 10, 60] diff --git a/docs/Model/RateLimiterResponse.md b/docs/Model/RateLimiterResponse.md index d33e8b2b..464e051f 100644 --- a/docs/Model/RateLimiterResponse.md +++ b/docs/Model/RateLimiterResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | A human readable name for the rate limiting rule. | [optional] -**uri_dictionary_name** | **string** | The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] +**uri_dictionary_name** | **string** | The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. | [optional] **http_methods** | **string[]** | Array of HTTP methods to apply rate limiting to. | [optional] [one of: 'HEAD', 'OPTIONS', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'TRACE'] **rps_limit** | **int** | Upper limit of requests per second allowed by the rate limiter. | [optional] **window_size** | **int** | Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. | [optional] [one of: 1, 10, 60] diff --git a/docs/Model/RelationshipMemberWafFirewallVersion.md b/docs/Model/RelationshipMemberWafFirewallVersion.md deleted file mode 100644 index 4e2ff4ea..00000000 --- a/docs/Model/RelationshipMemberWafFirewallVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipMemberWafFirewallVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewallVersion**](TypeWafFirewallVersion.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a Firewall version. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipMemberWafRuleRevision.md b/docs/Model/RelationshipMemberWafRuleRevision.md deleted file mode 100644 index 4b4ab203..00000000 --- a/docs/Model/RelationshipMemberWafRuleRevision.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipMemberWafRuleRevision - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRuleRevision**](TypeWafRuleRevision.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF rule revision. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipMemberWafTag.md b/docs/Model/RelationshipMemberWafTag.md deleted file mode 100644 index 35461842..00000000 --- a/docs/Model/RelationshipMemberWafTag.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipMemberWafTag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafTag**](TypeWafTag.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF tag. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafFirewallVersion.md b/docs/Model/RelationshipWafFirewallVersion.md deleted file mode 100644 index 7b828c54..00000000 --- a/docs/Model/RelationshipWafFirewallVersion.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafFirewallVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_firewall_version** | [**\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion**](RelationshipWafFirewallVersionWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafFirewallVersionWafFirewallVersion.md b/docs/Model/RelationshipWafFirewallVersionWafFirewallVersion.md deleted file mode 100644 index d3c02e3d..00000000 --- a/docs/Model/RelationshipWafFirewallVersionWafFirewallVersion.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafFirewallVersionWafFirewallVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\RelationshipMemberWafFirewallVersion[]**](RelationshipMemberWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafFirewallVersions.md b/docs/Model/RelationshipWafFirewallVersions.md deleted file mode 100644 index 69ee6a16..00000000 --- a/docs/Model/RelationshipWafFirewallVersions.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafFirewallVersions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_firewall_versions** | [**\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion**](RelationshipWafFirewallVersionWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafRuleRevision.md b/docs/Model/RelationshipWafRuleRevision.md deleted file mode 100644 index f8a0b14f..00000000 --- a/docs/Model/RelationshipWafRuleRevision.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafRuleRevision - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafRuleRevisionWafRuleRevisions.md b/docs/Model/RelationshipWafRuleRevisionWafRuleRevisions.md deleted file mode 100644 index 99e65e95..00000000 --- a/docs/Model/RelationshipWafRuleRevisionWafRuleRevisions.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafRuleRevisionWafRuleRevisions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\RelationshipMemberWafRuleRevision[]**](RelationshipMemberWafRuleRevision.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafRuleRevisions.md b/docs/Model/RelationshipWafRuleRevisions.md deleted file mode 100644 index a78f8135..00000000 --- a/docs/Model/RelationshipWafRuleRevisions.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafRuleRevisions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafRules.md b/docs/Model/RelationshipWafRules.md deleted file mode 100644 index 89bfc066..00000000 --- a/docs/Model/RelationshipWafRules.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafRules - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_rules** | [**\Fastly\Model\RelationshipWafRuleWafRule**](RelationshipWafRuleWafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafTagsWafTags.md b/docs/Model/RelationshipWafTagsWafTags.md deleted file mode 100644 index 4acd19aa..00000000 --- a/docs/Model/RelationshipWafTagsWafTags.md +++ /dev/null @@ -1,10 +0,0 @@ -# # RelationshipWafTagsWafTags - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\RelationshipMemberWafTag[]**](RelationshipMemberWafTag.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipsForWafActiveRule.md b/docs/Model/RelationshipsForWafActiveRule.md deleted file mode 100644 index 6bc9eb21..00000000 --- a/docs/Model/RelationshipsForWafActiveRule.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipsForWafActiveRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_firewall_version** | [**\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion**](RelationshipWafFirewallVersionWafFirewallVersion.md) | | [optional] -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipsForWafExclusion.md b/docs/Model/RelationshipsForWafExclusion.md deleted file mode 100644 index f60bf325..00000000 --- a/docs/Model/RelationshipsForWafExclusion.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipsForWafExclusion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_rules** | [**\Fastly\Model\RelationshipWafRuleWafRule**](RelationshipWafRuleWafRule.md) | | [optional] -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipsForWafFirewallVersion.md b/docs/Model/RelationshipsForWafFirewallVersion.md deleted file mode 100644 index c1560ece..00000000 --- a/docs/Model/RelationshipsForWafFirewallVersion.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipsForWafFirewallVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_firewall_versions** | [**\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion**](RelationshipWafFirewallVersionWafFirewallVersion.md) | | [optional] -**waf_active_rules** | [**\Fastly\Model\RelationshipWafActiveRulesWafActiveRules**](RelationshipWafActiveRulesWafActiveRules.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipsForWafRule.md b/docs/Model/RelationshipsForWafRule.md deleted file mode 100644 index f3c2b0ae..00000000 --- a/docs/Model/RelationshipsForWafRule.md +++ /dev/null @@ -1,11 +0,0 @@ -# # RelationshipsForWafRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_tags** | [**\Fastly\Model\RelationshipWafTagsWafTags**](RelationshipWafTagsWafTags.md) | | [optional] -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Resource.md b/docs/Model/Resource.md index 1f2a7a5d..9d4205dd 100644 --- a/docs/Model/Resource.md +++ b/docs/Model/Resource.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **resource_id** | **string** | The ID of the underlying linked resource. | [optional] -**name** | **string** | The name of the resource link. | [optional] +**name** | **string** | The name of the resource link. Note this is separate from the resource store name and might not match the store name. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ResourceResponse.md b/docs/Model/ResourceResponse.md index 7110e684..0cc29ab4 100644 --- a/docs/Model/ResourceResponse.md +++ b/docs/Model/ResourceResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **resource_id** | **string** | The ID of the underlying linked resource. | [optional] -**name** | **string** | The name of the resource link. | [optional] +**name** | **string** | The name of the resource link. Note this is separate from the resource store name and might not match the store name. | [optional] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/SchemasWafFirewallVersion.md b/docs/Model/SchemasWafFirewallVersion.md deleted file mode 100644 index 0c72d54a..00000000 --- a/docs/Model/SchemasWafFirewallVersion.md +++ /dev/null @@ -1,10 +0,0 @@ -# # SchemasWafFirewallVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SchemasWafFirewallVersionData**](SchemasWafFirewallVersionData.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SchemasWafFirewallVersionData.md b/docs/Model/SchemasWafFirewallVersionData.md deleted file mode 100644 index b2ebe061..00000000 --- a/docs/Model/SchemasWafFirewallVersionData.md +++ /dev/null @@ -1,11 +0,0 @@ -# # SchemasWafFirewallVersionData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewallVersion**](TypeWafFirewallVersion.md) | | [optional] -**attributes** | [**\Fastly\Model\WafFirewallVersionDataAttributes**](WafFirewallVersionDataAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafRuleRevision.md b/docs/Model/TypeWafRuleRevision.md deleted file mode 100644 index 0d23afb3..00000000 --- a/docs/Model/TypeWafRuleRevision.md +++ /dev/null @@ -1,9 +0,0 @@ -# # TypeWafRuleRevision - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TypeWafTag.md b/docs/Model/TypeWafTag.md deleted file mode 100644 index 11c6f014..00000000 --- a/docs/Model/TypeWafTag.md +++ /dev/null @@ -1,9 +0,0 @@ -# # TypeWafTag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRule.md b/docs/Model/WafActiveRule.md deleted file mode 100644 index e074ab8c..00000000 --- a/docs/Model/WafActiveRule.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafActiveRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafActiveRuleData**](WafActiveRuleData.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleCreationResponse.md b/docs/Model/WafActiveRuleCreationResponse.md deleted file mode 100644 index bf4aaf97..00000000 --- a/docs/Model/WafActiveRuleCreationResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafActiveRuleCreationResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafActiveRuleResponseData[]**](WafActiveRuleResponseData.md) | | [optional] -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafActiveRuleItem[]**](IncludedWithWafActiveRuleItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleData.md b/docs/Model/WafActiveRuleData.md deleted file mode 100644 index 7939707d..00000000 --- a/docs/Model/WafActiveRuleData.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafActiveRuleData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafActiveRule**](TypeWafActiveRule.md) | | [optional] -**attributes** | [**\Fastly\Model\WafActiveRuleDataAttributes**](WafActiveRuleDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipsForWafActiveRule**](RelationshipsForWafActiveRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleDataAttributes.md b/docs/Model/WafActiveRuleDataAttributes.md deleted file mode 100644 index 068ec4ae..00000000 --- a/docs/Model/WafActiveRuleDataAttributes.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafActiveRuleDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**modsec_rule_id** | **int** | The ModSecurity rule ID of the associated rule revision. | [optional] -**revision** | [**\Fastly\Model\WafRuleRevisionOrLatest**](WafRuleRevisionOrLatest.md) | | [optional] -**status** | **string** | Describes the behavior for the particular rule revision within this firewall version. | [optional] [one of: 'log', 'block', 'score'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleResponse.md b/docs/Model/WafActiveRuleResponse.md deleted file mode 100644 index 3b12c6af..00000000 --- a/docs/Model/WafActiveRuleResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafActiveRuleResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafActiveRuleResponseData**](WafActiveRuleResponseData.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleResponseData.md b/docs/Model/WafActiveRuleResponseData.md deleted file mode 100644 index c5d2a888..00000000 --- a/docs/Model/WafActiveRuleResponseData.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafActiveRuleResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafActiveRule**](TypeWafActiveRule.md) | | [optional] -**attributes** | [**\Fastly\Model\WafActiveRuleResponseDataAttributes**](WafActiveRuleResponseDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\WafActiveRuleResponseDataRelationships**](WafActiveRuleResponseDataRelationships.md) | | [optional] -**id** | **string** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleResponseDataAllOf.md b/docs/Model/WafActiveRuleResponseDataAllOf.md deleted file mode 100644 index 2b2299fd..00000000 --- a/docs/Model/WafActiveRuleResponseDataAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafActiveRuleResponseDataAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafActiveRuleResponseDataAttributes**](WafActiveRuleResponseDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\WafActiveRuleResponseDataRelationships**](WafActiveRuleResponseDataRelationships.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleResponseDataAttributes.md b/docs/Model/WafActiveRuleResponseDataAttributes.md deleted file mode 100644 index e040619d..00000000 --- a/docs/Model/WafActiveRuleResponseDataAttributes.md +++ /dev/null @@ -1,14 +0,0 @@ -# # WafActiveRuleResponseDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**latest_revision** | **int** | The latest rule revision number that is available for the associated rule revision. | [optional] [readonly] -**outdated** | **bool** | Indicates if the associated rule revision is up to date or not. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleResponseDataAttributesAllOf.md b/docs/Model/WafActiveRuleResponseDataAttributesAllOf.md deleted file mode 100644 index 7f675dd9..00000000 --- a/docs/Model/WafActiveRuleResponseDataAttributesAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafActiveRuleResponseDataAttributesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**latest_revision** | **int** | The latest rule revision number that is available for the associated rule revision. | [optional] [readonly] -**outdated** | **bool** | Indicates if the associated rule revision is up to date or not. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRuleResponseDataRelationships.md b/docs/Model/WafActiveRuleResponseDataRelationships.md deleted file mode 100644 index db0de4af..00000000 --- a/docs/Model/WafActiveRuleResponseDataRelationships.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafActiveRuleResponseDataRelationships - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_firewall_version** | [**\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion**](RelationshipWafFirewallVersionWafFirewallVersion.md) | | [optional] -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRulesResponse.md b/docs/Model/WafActiveRulesResponse.md deleted file mode 100644 index 0e1655a4..00000000 --- a/docs/Model/WafActiveRulesResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafActiveRulesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafActiveRuleResponseData[]**](WafActiveRuleResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafActiveRuleItem[]**](IncludedWithWafActiveRuleItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafActiveRulesResponseAllOf.md b/docs/Model/WafActiveRulesResponseAllOf.md deleted file mode 100644 index 2cd2e11e..00000000 --- a/docs/Model/WafActiveRulesResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafActiveRulesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafActiveRuleResponseData[]**](WafActiveRuleResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafActiveRuleItem[]**](IncludedWithWafActiveRuleItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionData.md b/docs/Model/WafExclusionData.md deleted file mode 100644 index bf0d1149..00000000 --- a/docs/Model/WafExclusionData.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafExclusionData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafExclusion**](TypeWafExclusion.md) | | [optional] -**attributes** | [**\Fastly\Model\WafExclusionDataAttributes**](WafExclusionDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipsForWafExclusion**](RelationshipsForWafExclusion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionDataAttributes.md b/docs/Model/WafExclusionDataAttributes.md deleted file mode 100644 index d8bf8d5d..00000000 --- a/docs/Model/WafExclusionDataAttributes.md +++ /dev/null @@ -1,15 +0,0 @@ -# # WafExclusionDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**condition** | **string** | A conditional expression in VCL used to determine if the condition is met. | [optional] -**exclusion_type** | **string** | The type of exclusion. | [optional] [one of: 'rule', 'variable', 'waf'] -**logging** | **bool** | Whether to generate a log upon matching. | [optional] [defaults to true] -**name** | **string** | Name of the exclusion. | [optional] -**number** | **int** | A numeric ID identifying a WAF exclusion. | [optional] -**variable** | **string** | The variable to exclude. An optional selector can be specified after the variable separated by a colon (`:`) to restrict the variable to a particular parameter. Required for `exclusion_type=variable`. | [optional] [one of: 'req.cookies', 'req.headers', 'req.post', 'req.post_filename', 'req.qs', 'null'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionResponse.md b/docs/Model/WafExclusionResponse.md deleted file mode 100644 index 0d374b64..00000000 --- a/docs/Model/WafExclusionResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafExclusionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafExclusionResponseData**](WafExclusionResponseData.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionResponseData.md b/docs/Model/WafExclusionResponseData.md deleted file mode 100644 index 4169736e..00000000 --- a/docs/Model/WafExclusionResponseData.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafExclusionResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafExclusion**](TypeWafExclusion.md) | | [optional] -**attributes** | [**\Fastly\Model\WafExclusionResponseDataAttributes**](WafExclusionResponseDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\WafExclusionResponseDataRelationships**](WafExclusionResponseDataRelationships.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF exclusion. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionResponseDataAllOf.md b/docs/Model/WafExclusionResponseDataAllOf.md deleted file mode 100644 index 0400dcbf..00000000 --- a/docs/Model/WafExclusionResponseDataAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafExclusionResponseDataAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Alphanumeric string identifying a WAF exclusion. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafExclusionResponseDataAttributes**](WafExclusionResponseDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\WafExclusionResponseDataRelationships**](WafExclusionResponseDataRelationships.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionResponseDataAttributes.md b/docs/Model/WafExclusionResponseDataAttributes.md deleted file mode 100644 index e615692d..00000000 --- a/docs/Model/WafExclusionResponseDataAttributes.md +++ /dev/null @@ -1,18 +0,0 @@ -# # WafExclusionResponseDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**condition** | **string** | A conditional expression in VCL used to determine if the condition is met. | [optional] -**exclusion_type** | **string** | The type of exclusion. | [optional] [one of: 'rule', 'variable', 'waf'] -**logging** | **bool** | Whether to generate a log upon matching. | [optional] [defaults to true] -**name** | **string** | Name of the exclusion. | [optional] -**number** | **int** | A numeric ID identifying a WAF exclusion. | [optional] -**variable** | **string** | The variable to exclude. An optional selector can be specified after the variable separated by a colon (`:`) to restrict the variable to a particular parameter. Required for `exclusion_type=variable`. | [optional] [one of: 'req.cookies', 'req.headers', 'req.post', 'req.post_filename', 'req.qs', 'null'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionResponseDataAttributesAllOf.md b/docs/Model/WafExclusionResponseDataAttributesAllOf.md deleted file mode 100644 index 221afbf5..00000000 --- a/docs/Model/WafExclusionResponseDataAttributesAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# # WafExclusionResponseDataAttributesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**condition** | **string** | A conditional expression in VCL used to determine if the condition is met. | [optional] -**exclusion_type** | **string** | The type of exclusion. | [optional] [one of: 'rule', 'variable', 'waf'] -**logging** | **bool** | Whether to generate a log upon matching. | [optional] [defaults to true] -**name** | **string** | Name of the exclusion. | [optional] -**number** | **int** | A numeric ID identifying a WAF exclusion. | [optional] -**variable** | **string** | The variable to exclude. An optional selector can be specified after the variable separated by a colon (`:`) to restrict the variable to a particular parameter. Required for `exclusion_type=variable`. | [optional] [one of: 'req.cookies', 'req.headers', 'req.post', 'req.post_filename', 'req.qs', 'null'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionResponseDataRelationships.md b/docs/Model/WafExclusionResponseDataRelationships.md deleted file mode 100644 index 0925b157..00000000 --- a/docs/Model/WafExclusionResponseDataRelationships.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafExclusionResponseDataRelationships - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**waf_rules** | [**\Fastly\Model\RelationshipWafRuleWafRule**](RelationshipWafRuleWafRule.md) | | [optional] -**waf_rule_revisions** | [**\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions**](RelationshipWafRuleRevisionWafRuleRevisions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionsResponse.md b/docs/Model/WafExclusionsResponse.md deleted file mode 100644 index 01d900c8..00000000 --- a/docs/Model/WafExclusionsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafExclusionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafExclusionResponseData[]**](WafExclusionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafExclusionItem[]**](IncludedWithWafExclusionItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafExclusionsResponseAllOf.md b/docs/Model/WafExclusionsResponseAllOf.md deleted file mode 100644 index 0d9d83d8..00000000 --- a/docs/Model/WafExclusionsResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafExclusionsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafExclusionResponseData[]**](WafExclusionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafExclusionItem[]**](IncludedWithWafExclusionItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallDataAttributes.md b/docs/Model/WafFirewallDataAttributes.md deleted file mode 100644 index c32cecbd..00000000 --- a/docs/Model/WafFirewallDataAttributes.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafFirewallDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**disabled** | **bool** | The status of the firewall. | [optional] [defaults to false] -**prefetch_condition** | **string** | Name of the corresponding condition object. | [optional] -**response** | **string** | Name of the corresponding response object. | [optional] -**service_version_number** | **int** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallResponse.md b/docs/Model/WafFirewallResponse.md deleted file mode 100644 index 5edb9af2..00000000 --- a/docs/Model/WafFirewallResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafFirewallResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafFirewallResponseData**](WafFirewallResponseData.md) | | [optional] -**included** | [**\Fastly\Model\SchemasWafFirewallVersion[]**](SchemasWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallResponseData.md b/docs/Model/WafFirewallResponseData.md deleted file mode 100644 index 200fc049..00000000 --- a/docs/Model/WafFirewallResponseData.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafFirewallResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewall**](TypeWafFirewall.md) | | [optional] -**attributes** | [**\Fastly\Model\WafFirewallResponseDataAttributes**](WafFirewallResponseDataAttributes.md) | | [optional] -**id** | **string** | | [optional] [readonly] -**relationships** | [**\Fastly\Model\RelationshipWafFirewallVersions**](RelationshipWafFirewallVersions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallResponseDataAllOf.md b/docs/Model/WafFirewallResponseDataAllOf.md deleted file mode 100644 index a8c918aa..00000000 --- a/docs/Model/WafFirewallResponseDataAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafFirewallResponseDataAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafFirewallResponseDataAttributes**](WafFirewallResponseDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipWafFirewallVersions**](RelationshipWafFirewallVersions.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallResponseDataAttributes.md b/docs/Model/WafFirewallResponseDataAttributes.md deleted file mode 100644 index 518f1cf9..00000000 --- a/docs/Model/WafFirewallResponseDataAttributes.md +++ /dev/null @@ -1,21 +0,0 @@ -# # WafFirewallResponseDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**service_id** | **string** | | [optional] [readonly] -**active_rules_fastly_block_count** | **int** | The number of active Fastly rules set to block on the active or latest firewall version. | [optional] [readonly] -**active_rules_fastly_log_count** | **int** | The number of active Fastly rules set to log on the active or latest firewall version. | [optional] [readonly] -**active_rules_fastly_score_count** | **int** | The number of active Fastly rules set to score on the active or latest firewall version. | [optional] [readonly] -**active_rules_owasp_block_count** | **int** | The number of active OWASP rules set to block on the active or latest firewall version. | [optional] [readonly] -**active_rules_owasp_log_count** | **int** | The number of active OWASP rules set to log on the active or latest firewall version. | [optional] [readonly] -**active_rules_owasp_score_count** | **int** | The number of active OWASP rules set to score on the active or latest firewall version. | [optional] [readonly] -**active_rules_trustwave_block_count** | **int** | The number of active Trustwave rules set to block on the active or latest firewall version. | [optional] [readonly] -**active_rules_trustwave_log_count** | **int** | The number of active Trustwave rules set to log on the active or latest firewall version. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallResponseDataAttributesAllOf.md b/docs/Model/WafFirewallResponseDataAttributesAllOf.md deleted file mode 100644 index 98f900de..00000000 --- a/docs/Model/WafFirewallResponseDataAttributesAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# # WafFirewallResponseDataAttributesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**service_id** | **string** | | [optional] [readonly] -**active_rules_fastly_block_count** | **int** | The number of active Fastly rules set to block on the active or latest firewall version. | [optional] [readonly] -**active_rules_fastly_log_count** | **int** | The number of active Fastly rules set to log on the active or latest firewall version. | [optional] [readonly] -**active_rules_fastly_score_count** | **int** | The number of active Fastly rules set to score on the active or latest firewall version. | [optional] [readonly] -**active_rules_owasp_block_count** | **int** | The number of active OWASP rules set to block on the active or latest firewall version. | [optional] [readonly] -**active_rules_owasp_log_count** | **int** | The number of active OWASP rules set to log on the active or latest firewall version. | [optional] [readonly] -**active_rules_owasp_score_count** | **int** | The number of active OWASP rules set to score on the active or latest firewall version. | [optional] [readonly] -**active_rules_trustwave_block_count** | **int** | The number of active Trustwave rules set to block on the active or latest firewall version. | [optional] [readonly] -**active_rules_trustwave_log_count** | **int** | The number of active Trustwave rules set to log on the active or latest firewall version. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersion.md b/docs/Model/WafFirewallVersion.md deleted file mode 100644 index 1d536187..00000000 --- a/docs/Model/WafFirewallVersion.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafFirewallVersion - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafFirewallVersionData**](WafFirewallVersionData.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionData.md b/docs/Model/WafFirewallVersionData.md deleted file mode 100644 index fbe32e86..00000000 --- a/docs/Model/WafFirewallVersionData.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafFirewallVersionData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewallVersion**](TypeWafFirewallVersion.md) | | [optional] -**attributes** | [**\Fastly\Model\WafFirewallVersionDataAttributes**](WafFirewallVersionDataAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionDataAttributes.md b/docs/Model/WafFirewallVersionDataAttributes.md deleted file mode 100644 index fd87a414..00000000 --- a/docs/Model/WafFirewallVersionDataAttributes.md +++ /dev/null @@ -1,40 +0,0 @@ -# # WafFirewallVersionDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowed_http_versions** | **string** | Allowed HTTP versions. | [optional] [defaults to 'HTTP/1.0 HTTP/1.1 HTTP/2'] -**allowed_methods** | **string** | A space-separated list of HTTP method names. | [optional] [defaults to 'GET HEAD POST OPTIONS PUT PATCH DELETE'] -**allowed_request_content_type** | **string** | Allowed request content types. | [optional] [defaults to 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json|text/plain'] -**allowed_request_content_type_charset** | **string** | Allowed request content type charset. | [optional] [defaults to 'utf-8|iso-8859-1|iso-8859-15|windows-1252'] -**arg_name_length** | **int** | The maximum allowed argument name length. | [optional] [defaults to 100] -**arg_length** | **int** | The maximum allowed length of an argument. | [optional] [defaults to 400] -**combined_file_sizes** | **int** | The maximum allowed size of all files (in bytes). | [optional] [defaults to 10000000] -**comment** | **string** | A freeform descriptive note. | [optional] -**critical_anomaly_score** | **int** | Score value to add for critical anomalies. | [optional] [defaults to 6] -**crs_validate_utf8_encoding** | **bool** | CRS validate UTF8 encoding. | [optional] -**error_anomaly_score** | **int** | Score value to add for error anomalies. | [optional] [defaults to 5] -**high_risk_country_codes** | **string** | A space-separated list of country codes in ISO 3166-1 (two-letter) format. | [optional] -**http_violation_score_threshold** | **int** | HTTP violation threshold. | [optional] -**inbound_anomaly_score_threshold** | **int** | Inbound anomaly threshold. | [optional] -**lfi_score_threshold** | **int** | Local file inclusion attack threshold. | [optional] -**locked** | **bool** | Whether a specific firewall version is locked from being modified. | [optional] [defaults to false] -**max_file_size** | **int** | The maximum allowed file size, in bytes. | [optional] [defaults to 10000000] -**max_num_args** | **int** | The maximum number of arguments allowed. | [optional] [defaults to 255] -**notice_anomaly_score** | **int** | Score value to add for notice anomalies. | [optional] [defaults to 4] -**number** | **int** | | [optional] [readonly] -**paranoia_level** | **int** | The configured paranoia level. | [optional] [defaults to 1] -**php_injection_score_threshold** | **int** | PHP injection threshold. | [optional] -**rce_score_threshold** | **int** | Remote code execution threshold. | [optional] -**restricted_extensions** | **string** | A space-separated list of allowed file extensions. | [optional] [defaults to '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx'] -**restricted_headers** | **string** | A space-separated list of allowed header names. | [optional] [defaults to '/proxy/ /lock-token/ /content-range/ /translate/ /if/'] -**rfi_score_threshold** | **int** | Remote file inclusion attack threshold. | [optional] -**session_fixation_score_threshold** | **int** | Session fixation attack threshold. | [optional] -**sql_injection_score_threshold** | **int** | SQL injection attack threshold. | [optional] -**total_arg_length** | **int** | The maximum size of argument names and values. | [optional] [defaults to 6400] -**warning_anomaly_score** | **int** | Score value to add for warning anomalies. | [optional] -**xss_score_threshold** | **int** | XSS attack threshold. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionResponse.md b/docs/Model/WafFirewallVersionResponse.md deleted file mode 100644 index 285b1a55..00000000 --- a/docs/Model/WafFirewallVersionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafFirewallVersionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafFirewallVersionResponseData**](WafFirewallVersionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafFirewallVersionItem[]**](IncludedWithWafFirewallVersionItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionResponseData.md b/docs/Model/WafFirewallVersionResponseData.md deleted file mode 100644 index 09e71f00..00000000 --- a/docs/Model/WafFirewallVersionResponseData.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafFirewallVersionResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafFirewallVersion**](TypeWafFirewallVersion.md) | | [optional] -**attributes** | [**\Fastly\Model\WafFirewallVersionResponseDataAttributes**](WafFirewallVersionResponseDataAttributes.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a Firewall version. | [optional] [readonly] -**relationships** | [**\Fastly\Model\RelationshipsForWafFirewallVersion**](RelationshipsForWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionResponseDataAllOf.md b/docs/Model/WafFirewallVersionResponseDataAllOf.md deleted file mode 100644 index 0b82c394..00000000 --- a/docs/Model/WafFirewallVersionResponseDataAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafFirewallVersionResponseDataAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Alphanumeric string identifying a Firewall version. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafFirewallVersionResponseDataAttributes**](WafFirewallVersionResponseDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipsForWafFirewallVersion**](RelationshipsForWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionResponseDataAttributes.md b/docs/Model/WafFirewallVersionResponseDataAttributes.md deleted file mode 100644 index 4417da89..00000000 --- a/docs/Model/WafFirewallVersionResponseDataAttributes.md +++ /dev/null @@ -1,24 +0,0 @@ -# # WafFirewallVersionResponseDataAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**active** | **bool** | Whether a specific firewall version is currently deployed. | [optional] [readonly] -**active_rules_fastly_block_count** | **int** | The number of active Fastly rules set to block. | [optional] [readonly] -**active_rules_fastly_log_count** | **int** | The number of active Fastly rules set to log. | [optional] [readonly] -**active_rules_fastly_score_count** | **int** | The number of active Fastly rules set to score. | [optional] [readonly] -**active_rules_owasp_block_count** | **int** | The number of active OWASP rules set to block. | [optional] [readonly] -**active_rules_owasp_log_count** | **int** | The number of active OWASP rules set to log. | [optional] [readonly] -**active_rules_owasp_score_count** | **int** | The number of active OWASP rules set to score. | [optional] [readonly] -**active_rules_trustwave_block_count** | **int** | The number of active Trustwave rules set to block. | [optional] [readonly] -**active_rules_trustwave_log_count** | **int** | The number of active Trustwave rules set to log. | [optional] [readonly] -**last_deployment_status** | **string** | The status of the last deployment of this firewall version. | [optional] [readonly] [one of: 'null', 'pending', 'in progress', 'completed', 'failed'] -**deployed_at** | **string** | Time-stamp (GMT) indicating when the firewall version was last deployed. | [optional] [readonly] -**error** | **string** | Contains error message if the firewall version fails to deploy. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionResponseDataAttributesAllOf.md b/docs/Model/WafFirewallVersionResponseDataAttributesAllOf.md deleted file mode 100644 index 714f0cfc..00000000 --- a/docs/Model/WafFirewallVersionResponseDataAttributesAllOf.md +++ /dev/null @@ -1,21 +0,0 @@ -# # WafFirewallVersionResponseDataAttributesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | **bool** | Whether a specific firewall version is currently deployed. | [optional] [readonly] -**active_rules_fastly_block_count** | **int** | The number of active Fastly rules set to block. | [optional] [readonly] -**active_rules_fastly_log_count** | **int** | The number of active Fastly rules set to log. | [optional] [readonly] -**active_rules_fastly_score_count** | **int** | The number of active Fastly rules set to score. | [optional] [readonly] -**active_rules_owasp_block_count** | **int** | The number of active OWASP rules set to block. | [optional] [readonly] -**active_rules_owasp_log_count** | **int** | The number of active OWASP rules set to log. | [optional] [readonly] -**active_rules_owasp_score_count** | **int** | The number of active OWASP rules set to score. | [optional] [readonly] -**active_rules_trustwave_block_count** | **int** | The number of active Trustwave rules set to block. | [optional] [readonly] -**active_rules_trustwave_log_count** | **int** | The number of active Trustwave rules set to log. | [optional] [readonly] -**last_deployment_status** | **string** | The status of the last deployment of this firewall version. | [optional] [readonly] [one of: 'null', 'pending', 'in progress', 'completed', 'failed'] -**deployed_at** | **string** | Time-stamp (GMT) indicating when the firewall version was last deployed. | [optional] [readonly] -**error** | **string** | Contains error message if the firewall version fails to deploy. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionsResponse.md b/docs/Model/WafFirewallVersionsResponse.md deleted file mode 100644 index 9b6e8f8e..00000000 --- a/docs/Model/WafFirewallVersionsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafFirewallVersionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafFirewallVersionResponseData[]**](WafFirewallVersionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafFirewallVersionItem[]**](IncludedWithWafFirewallVersionItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallVersionsResponseAllOf.md b/docs/Model/WafFirewallVersionsResponseAllOf.md deleted file mode 100644 index 2b6d1ca5..00000000 --- a/docs/Model/WafFirewallVersionsResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafFirewallVersionsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafFirewallVersionResponseData[]**](WafFirewallVersionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafFirewallVersionItem[]**](IncludedWithWafFirewallVersionItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallsResponse.md b/docs/Model/WafFirewallsResponse.md deleted file mode 100644 index a6853060..00000000 --- a/docs/Model/WafFirewallsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafFirewallsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafFirewallResponseData[]**](WafFirewallResponseData.md) | | [optional] -**included** | [**\Fastly\Model\SchemasWafFirewallVersion[]**](SchemasWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafFirewallsResponseAllOf.md b/docs/Model/WafFirewallsResponseAllOf.md deleted file mode 100644 index 524144ac..00000000 --- a/docs/Model/WafFirewallsResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafFirewallsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafFirewallResponseData[]**](WafFirewallResponseData.md) | | [optional] -**included** | [**\Fastly\Model\SchemasWafFirewallVersion[]**](SchemasWafFirewallVersion.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRule.md b/docs/Model/WafRule.md deleted file mode 100644 index 4e5069b8..00000000 --- a/docs/Model/WafRule.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRule**](TypeWafRule.md) | | [optional] -**id** | **string** | | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleAttributes**](WafRuleAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleAttributes.md b/docs/Model/WafRuleAttributes.md deleted file mode 100644 index fc20c05c..00000000 --- a/docs/Model/WafRuleAttributes.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafRuleAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**modsec_rule_id** | **int** | Corresponding ModSecurity rule ID. | [optional] [readonly] -**publisher** | **string** | Rule publisher. | [optional] [readonly] [one of: 'fastly', 'trustwave', 'owasp'] -**type** | **string** | The rule's [type](https://docs.fastly.com/en/guides/managing-rules-on-the-fastly-waf#understanding-the-types-of-rules). | [optional] [readonly] [one of: 'strict', 'score', 'threshold'] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleResponse.md b/docs/Model/WafRuleResponse.md deleted file mode 100644 index 59402083..00000000 --- a/docs/Model/WafRuleResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafRuleResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafRuleResponseData**](WafRuleResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafRuleItem[]**](IncludedWithWafRuleItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleResponseData.md b/docs/Model/WafRuleResponseData.md deleted file mode 100644 index a88d3c12..00000000 --- a/docs/Model/WafRuleResponseData.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafRuleResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRule**](TypeWafRule.md) | | [optional] -**id** | **string** | | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleAttributes**](WafRuleAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipsForWafRule**](RelationshipsForWafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleResponseDataAllOf.md b/docs/Model/WafRuleResponseDataAllOf.md deleted file mode 100644 index dd6d6407..00000000 --- a/docs/Model/WafRuleResponseDataAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafRuleResponseDataAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**relationships** | [**\Fastly\Model\RelationshipsForWafRule**](RelationshipsForWafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevision.md b/docs/Model/WafRuleRevision.md deleted file mode 100644 index 3dbb719a..00000000 --- a/docs/Model/WafRuleRevision.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafRuleRevision - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRuleRevision**](TypeWafRuleRevision.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF rule revision. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleRevisionAttributes**](WafRuleRevisionAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionAttributes.md b/docs/Model/WafRuleRevisionAttributes.md deleted file mode 100644 index 3b895f25..00000000 --- a/docs/Model/WafRuleRevisionAttributes.md +++ /dev/null @@ -1,17 +0,0 @@ -# # WafRuleRevisionAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **string** | Message metadata for the rule. | [optional] [readonly] -**modsec_rule_id** | **int** | Corresponding ModSecurity rule ID. | [optional] [readonly] -**paranoia_level** | **int** | Paranoia level for the rule. | [optional] [readonly] -**revision** | **int** | Revision number. | [optional] -**severity** | **int** | Severity metadata for the rule. | [optional] [readonly] -**source** | **string** | The ModSecurity rule logic. | [optional] [readonly] -**state** | **string** | The state, indicating if the revision is the most recent version of the rule. | [optional] [readonly] [one of: 'latest', 'outdated'] -**vcl** | **string** | The VCL representation of the rule logic. | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionOrLatest.md b/docs/Model/WafRuleRevisionOrLatest.md deleted file mode 100644 index 7944c934..00000000 --- a/docs/Model/WafRuleRevisionOrLatest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # WafRuleRevisionOrLatest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionResponse.md b/docs/Model/WafRuleRevisionResponse.md deleted file mode 100644 index 0a5eef13..00000000 --- a/docs/Model/WafRuleRevisionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafRuleRevisionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafRuleRevisionResponseData**](WafRuleRevisionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\WafRule[]**](WafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionResponseData.md b/docs/Model/WafRuleRevisionResponseData.md deleted file mode 100644 index 95e20f6e..00000000 --- a/docs/Model/WafRuleRevisionResponseData.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafRuleRevisionResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafRuleRevision**](TypeWafRuleRevision.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF rule revision. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafRuleRevisionAttributes**](WafRuleRevisionAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipWafRule**](RelationshipWafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionResponseDataAllOf.md b/docs/Model/WafRuleRevisionResponseDataAllOf.md deleted file mode 100644 index b254dc79..00000000 --- a/docs/Model/WafRuleRevisionResponseDataAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafRuleRevisionResponseDataAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**relationships** | [**\Fastly\Model\RelationshipWafRule**](RelationshipWafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionsResponse.md b/docs/Model/WafRuleRevisionsResponse.md deleted file mode 100644 index 28c32472..00000000 --- a/docs/Model/WafRuleRevisionsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafRuleRevisionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafRuleRevisionResponseData[]**](WafRuleRevisionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\WafRule[]**](WafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRuleRevisionsResponseAllOf.md b/docs/Model/WafRuleRevisionsResponseAllOf.md deleted file mode 100644 index 8d3f7ac3..00000000 --- a/docs/Model/WafRuleRevisionsResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafRuleRevisionsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafRuleRevisionResponseData[]**](WafRuleRevisionResponseData.md) | | [optional] -**included** | [**\Fastly\Model\WafRule[]**](WafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRulesResponse.md b/docs/Model/WafRulesResponse.md deleted file mode 100644 index 6e1d4b77..00000000 --- a/docs/Model/WafRulesResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafRulesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafRuleResponseData[]**](WafRuleResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafRuleItem[]**](IncludedWithWafRuleItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafRulesResponseAllOf.md b/docs/Model/WafRulesResponseAllOf.md deleted file mode 100644 index b8a55393..00000000 --- a/docs/Model/WafRulesResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafRulesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafRuleResponseData[]**](WafRuleResponseData.md) | | [optional] -**included** | [**\Fastly\Model\IncludedWithWafRuleItem[]**](IncludedWithWafRuleItem.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafTag.md b/docs/Model/WafTag.md deleted file mode 100644 index ab4b0392..00000000 --- a/docs/Model/WafTag.md +++ /dev/null @@ -1,12 +0,0 @@ -# # WafTag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafTag**](TypeWafTag.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF tag. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafTagAttributes**](WafTagAttributes.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafTagAttributes.md b/docs/Model/WafTagAttributes.md deleted file mode 100644 index 71c863b6..00000000 --- a/docs/Model/WafTagAttributes.md +++ /dev/null @@ -1,10 +0,0 @@ -# # WafTagAttributes - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **string** | | [optional] [readonly] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafTagsResponse.md b/docs/Model/WafTagsResponse.md deleted file mode 100644 index 521776af..00000000 --- a/docs/Model/WafTagsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafTagsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**links** | [**\Fastly\Model\PaginationLinks**](PaginationLinks.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationMeta**](PaginationMeta.md) | | [optional] -**data** | [**\Fastly\Model\WafTagsResponseDataItem[]**](WafTagsResponseDataItem.md) | | [optional] -**included** | [**\Fastly\Model\WafRule[]**](WafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafTagsResponseAllOf.md b/docs/Model/WafTagsResponseAllOf.md deleted file mode 100644 index 8cb18512..00000000 --- a/docs/Model/WafTagsResponseAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# # WafTagsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\WafTagsResponseDataItem[]**](WafTagsResponseDataItem.md) | | [optional] -**included** | [**\Fastly\Model\WafRule[]**](WafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WafTagsResponseDataItem.md b/docs/Model/WafTagsResponseDataItem.md deleted file mode 100644 index c75f4abd..00000000 --- a/docs/Model/WafTagsResponseDataItem.md +++ /dev/null @@ -1,13 +0,0 @@ -# # WafTagsResponseDataItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Fastly\Model\TypeWafTag**](TypeWafTag.md) | | [optional] -**id** | **string** | Alphanumeric string identifying a WAF tag. | [optional] [readonly] -**attributes** | [**\Fastly\Model\WafTagAttributes**](WafTagAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipWafRule**](RelationshipWafRule.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseBodyGetAllServices.md b/docs/Model/WebsocketsResponseBodyGetAllServices.md new file mode 100644 index 00000000..d6a97d4d --- /dev/null +++ b/docs/Model/WebsocketsResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # WebsocketsResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\WebsocketsResponseProductProduct**](WebsocketsResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services with Websockets enabled. | [optional] +**_links** | [**\Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks**](WebsocketsResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RelationshipWafActiveRulesWafActiveRules.md b/docs/Model/WebsocketsResponseCustomer.md similarity index 54% rename from docs/Model/RelationshipWafActiveRulesWafActiveRules.md rename to docs/Model/WebsocketsResponseCustomer.md index 96adcb85..4fc16ae4 100644 --- a/docs/Model/RelationshipWafActiveRulesWafActiveRules.md +++ b/docs/Model/WebsocketsResponseCustomer.md @@ -1,10 +1,10 @@ -# # RelationshipWafActiveRulesWafActiveRules +# # WebsocketsResponseCustomer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\RelationshipMemberWafActiveRule[]**](RelationshipMemberWafActiveRule.md) | | [optional] +**customer** | [**\Fastly\Model\BotManagementResponseCustomerCustomer**](BotManagementResponseCustomerCustomer.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseEnabledServices.md b/docs/Model/WebsocketsResponseEnabledServices.md new file mode 100644 index 00000000..cb8edf74 --- /dev/null +++ b/docs/Model/WebsocketsResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # WebsocketsResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services with Websockets enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseLinksGetAllServices.md b/docs/Model/WebsocketsResponseLinksGetAllServices.md new file mode 100644 index 00000000..5ddf51e1 --- /dev/null +++ b/docs/Model/WebsocketsResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # WebsocketsResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks**](WebsocketsResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebsocketsResponseLinksGetAllServicesLinks.md b/docs/Model/WebsocketsResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..be92f0e6 --- /dev/null +++ b/docs/Model/WebsocketsResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # WebsocketsResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/BackendApi.php b/lib/Api/BackendApi.php index 76cb8c6b..b31b7fa3 100644 --- a/lib/Api/BackendApi.php +++ b/lib/Api/BackendApi.php @@ -139,6 +139,7 @@ public function getConfig() * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -197,6 +198,7 @@ public function createBackend($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -343,6 +345,7 @@ public function createBackendWithHttpInfo($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -404,6 +407,7 @@ function ($response) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -491,6 +495,7 @@ function ($exception) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -535,6 +540,7 @@ public function createBackendRequest($options) $name = array_key_exists('name', $options) ? $options['name'] : null; $override_host = array_key_exists('override_host', $options) ? $options['override_host'] : null; $port = array_key_exists('port', $options) ? $options['port'] : null; + $prefer_ipv6 = array_key_exists('prefer_ipv6', $options) ? $options['prefer_ipv6'] : null; $request_condition = array_key_exists('request_condition', $options) ? $options['request_condition'] : null; $share_key = array_key_exists('share_key', $options) ? $options['share_key'] : null; $shield = array_key_exists('shield', $options) ? $options['shield'] : null; @@ -669,6 +675,10 @@ public function createBackendRequest($options) $formParams['port'] = ObjectSerializer::toFormValue($port); } // form params + if ($prefer_ipv6 !== null) { + $formParams['prefer_ipv6'] = ObjectSerializer::toFormValue($prefer_ipv6); + } + // form params if ($request_condition !== null) { $formParams['request_condition'] = ObjectSerializer::toFormValue($request_condition); } @@ -1902,6 +1912,7 @@ public function listBackendsRequest($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -1961,6 +1972,7 @@ public function updateBackend($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2108,6 +2120,7 @@ public function updateBackendWithHttpInfo($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2170,6 +2183,7 @@ function ($response) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2258,6 +2272,7 @@ function ($exception) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2303,6 +2318,7 @@ public function updateBackendRequest($options) $name = array_key_exists('name', $options) ? $options['name'] : null; $override_host = array_key_exists('override_host', $options) ? $options['override_host'] : null; $port = array_key_exists('port', $options) ? $options['port'] : null; + $prefer_ipv6 = array_key_exists('prefer_ipv6', $options) ? $options['prefer_ipv6'] : null; $request_condition = array_key_exists('request_condition', $options) ? $options['request_condition'] : null; $share_key = array_key_exists('share_key', $options) ? $options['share_key'] : null; $shield = array_key_exists('shield', $options) ? $options['shield'] : null; @@ -2451,6 +2467,10 @@ public function updateBackendRequest($options) $formParams['port'] = ObjectSerializer::toFormValue($port); } // form params + if ($prefer_ipv6 !== null) { + $formParams['prefer_ipv6'] = ObjectSerializer::toFormValue($prefer_ipv6); + } + // form params if ($request_condition !== null) { $formParams['request_condition'] = ObjectSerializer::toFormValue($request_condition); } diff --git a/lib/Api/WafExclusionsApi.php b/lib/Api/DdosProtectionApi.php similarity index 60% rename from lib/Api/WafExclusionsApi.php rename to lib/Api/DdosProtectionApi.php index 4a0af1c7..878a552b 100644 --- a/lib/Api/WafExclusionsApi.php +++ b/lib/Api/DdosProtectionApi.php @@ -1,6 +1,6 @@ createWafRuleExclusionWithHttpInfo($options); + list($response) = $this->ddosProtectionEventGetWithHttpInfo($options); return $response; } /** - * Operation createWafRuleExclusionWithHttpInfo + * Operation ddosProtectionEventGetWithHttpInfo * - * Create a WAF rule exclusion + * Get event by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafExclusionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionEvent|DdosProtectionError|DdosProtectionError, HTTP status code, HTTP response headers (array of strings) */ - public function createWafRuleExclusionWithHttpInfo($options) + public function ddosProtectionEventGetWithHttpInfo($options) { - $request = $this->createWafRuleExclusionRequest($options); + $request = $this->ddosProtectionEventGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -177,7 +171,7 @@ public function createWafRuleExclusionWithHttpInfo($options) ); } - if ('POST' != 'GET' && 'POST' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -205,21 +199,45 @@ public function createWafRuleExclusionWithHttpInfo($options) } switch($statusCode) { - case 201: - if ('\Fastly\Model\WafExclusionResponse' === '\SplFileObject') { + case 200: + if ('\Fastly\Model\DdosProtectionEvent' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionEvent', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('DdosProtectionError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafExclusionResponse', []), + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\WafExclusionResponse'; + $returnType = '\Fastly\Model\DdosProtectionEvent'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -234,10 +252,26 @@ public function createWafRuleExclusionWithHttpInfo($options) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\WafExclusionResponse', + '\Fastly\Model\DdosProtectionEvent', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -248,26 +282,23 @@ public function createWafRuleExclusionWithHttpInfo($options) } /** - * Operation createWafRuleExclusionAsync + * Operation ddosProtectionEventGetAsync * - * Create a WAF rule exclusion + * Get event by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function createWafRuleExclusionAsync($options) + public function ddosProtectionEventGetAsync($options) { - return $this->createWafRuleExclusionAsyncWithHttpInfo($options) + return $this->ddosProtectionEventGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -276,27 +307,24 @@ function ($response) { } /** - * Operation createWafRuleExclusionAsyncWithHttpInfo + * Operation ddosProtectionEventGetAsyncWithHttpInfo * - * Create a WAF rule exclusion + * Get event by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function createWafRuleExclusionAsyncWithHttpInfo($options) + public function ddosProtectionEventGetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\WafExclusionResponse'; - $request = $this->createWafRuleExclusionRequest($options); + $returnType = '\Fastly\Model\DdosProtectionEvent'; + $request = $this->ddosProtectionEventGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -332,42 +360,31 @@ function ($exception) { } /** - * Create request for operation 'createWafRuleExclusion' + * Create request for operation 'ddosProtectionEventGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function createWafRuleExclusionRequest($options) + public function ddosProtectionEventGetRequest($options) { // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - $waf_exclusion = array_key_exists('waf_exclusion', $options) ? $options['waf_exclusion'] : null; + $event_id = array_key_exists('event_id', $options) ? $options['event_id'] : null; - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling createWafRuleExclusion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { + // verify the required parameter 'event_id' is set + if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling createWafRuleExclusion' + 'Missing the required parameter $event_id when calling ddosProtectionEventGet' ); } - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions'; + $resourcePath = '/ddos-protection/v1/events/{event_id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -377,18 +394,10 @@ public function createWafRuleExclusionRequest($options) // path params - if ($firewall_id !== null) { + if ($event_id !== null) { $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), + '{' . 'event_id' . '}', + ObjectSerializer::toPathValue($event_id), $resourcePath ); } @@ -396,23 +405,17 @@ public function createWafRuleExclusionRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + ['application/json', 'application/problem+json'], + [] ); } // for model (json/xml) - if (isset($waf_exclusion)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_exclusion)); - } else { - $httpBody = $waf_exclusion; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -461,7 +464,7 @@ public function createWafRuleExclusionRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -469,51 +472,56 @@ public function createWafRuleExclusionRequest($options) } /** - * Operation deleteWafRuleExclusion + * Operation ddosProtectionEventList * - * Delete a WAF rule exclusion + * Get events * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $service_id Filter results based on a service_id. (optional) + * @param \DateTime $from Represents the start of a date-time range expressed in RFC 3339 format. (optional) + * @param \DateTime $to Represents the end of a date-time range expressed in RFC 3339 format. (optional) + * @param string $name name (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void - * @deprecated + * @return \Fastly\Model\InlineResponse2002|DdosProtectionError|DdosProtectionError */ - public function deleteWafRuleExclusion($options) + public function ddosProtectionEventList($options) { - $this->deleteWafRuleExclusionWithHttpInfo($options); + list($response) = $this->ddosProtectionEventListWithHttpInfo($options); + return $response; } /** - * Operation deleteWafRuleExclusionWithHttpInfo + * Operation ddosProtectionEventListWithHttpInfo * - * Delete a WAF rule exclusion + * Get events * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $service_id Filter results based on a service_id. (optional) + * @param \DateTime $from Represents the start of a date-time range expressed in RFC 3339 format. (optional) + * @param \DateTime $to Represents the end of a date-time range expressed in RFC 3339 format. (optional) + * @param string $name (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\InlineResponse2002|DdosProtectionError|DdosProtectionError, HTTP status code, HTTP response headers (array of strings) */ - public function deleteWafRuleExclusionWithHttpInfo($options) + public function ddosProtectionEventListWithHttpInfo($options) { - $request = $this->deleteWafRuleExclusionRequest($options); + $request = $this->ddosProtectionEventListRequest($options); try { $options = $this->createHttpClientOption(); @@ -535,7 +543,7 @@ public function deleteWafRuleExclusionWithHttpInfo($options) ); } - if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -562,36 +570,112 @@ public function deleteWafRuleExclusionWithHttpInfo($options) ); } - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + if ('\Fastly\Model\InlineResponse2002' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2002', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\InlineResponse2002'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\InlineResponse2002', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation deleteWafRuleExclusionAsync + * Operation ddosProtectionEventListAsync * - * Delete a WAF rule exclusion + * Get events * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $service_id Filter results based on a service_id. (optional) + * @param \DateTime $from Represents the start of a date-time range expressed in RFC 3339 format. (optional) + * @param \DateTime $to Represents the end of a date-time range expressed in RFC 3339 format. (optional) + * @param string $name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function deleteWafRuleExclusionAsync($options) + public function ddosProtectionEventListAsync($options) { - return $this->deleteWafRuleExclusionAsyncWithHttpInfo($options) + return $this->ddosProtectionEventListAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -600,33 +684,45 @@ function ($response) { } /** - * Operation deleteWafRuleExclusionAsyncWithHttpInfo + * Operation ddosProtectionEventListAsyncWithHttpInfo * - * Delete a WAF rule exclusion + * Get events * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $service_id Filter results based on a service_id. (optional) + * @param \DateTime $from Represents the start of a date-time range expressed in RFC 3339 format. (optional) + * @param \DateTime $to Represents the end of a date-time range expressed in RFC 3339 format. (optional) + * @param string $name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function deleteWafRuleExclusionAsyncWithHttpInfo($options) + public function ddosProtectionEventListAsyncWithHttpInfo($options) { - $returnType = ''; - $request = $this->deleteWafRuleExclusionRequest($options); + $returnType = '\Fastly\Model\InlineResponse2002'; + $request = $this->ddosProtectionEventListRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -646,89 +742,122 @@ function ($exception) { } /** - * Create request for operation 'deleteWafRuleExclusion' + * Create request for operation 'ddosProtectionEventList' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $service_id Filter results based on a service_id. (optional) + * @param \DateTime $from Represents the start of a date-time range expressed in RFC 3339 format. (optional) + * @param \DateTime $to Represents the end of a date-time range expressed in RFC 3339 format. (optional) + * @param string $name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function deleteWafRuleExclusionRequest($options) + public function ddosProtectionEventListRequest($options) { // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - $exclusion_number = array_key_exists('exclusion_number', $options) ? $options['exclusion_number'] : null; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : 20; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $from = array_key_exists('from', $options) ? $options['from'] : null; + $to = array_key_exists('to', $options) ? $options['to'] : null; + $name = array_key_exists('name', $options) ? $options['name'] : null; - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling deleteWafRuleExclusion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling deleteWafRuleExclusion' - ); - } - // verify the required parameter 'exclusion_number' is set - if ($exclusion_number === null || (is_array($exclusion_number) && count($exclusion_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $exclusion_number when calling deleteWafRuleExclusion' - ); + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling DdosProtectionApi.ddosProtectionEventList, must be smaller than or equal to 100.'); } - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions/{exclusion_number}'; + + $resourcePath = '/ddos-protection/v1/events'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), - $resourcePath - ); + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } } - // path params - if ($exclusion_number !== null) { - $resourcePath = str_replace( - '{' . 'exclusion_number' . '}', - ObjectSerializer::toPathValue($exclusion_number), - $resourcePath - ); + // query params + if ($service_id !== null) { + if('form' === 'form' && is_array($service_id)) { + foreach($service_id as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['service_id'] = ObjectSerializer::toString($service_id); + } + } + // query params + if ($from !== null) { + if('form' === 'form' && is_array($from)) { + foreach($from as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['from'] = ObjectSerializer::toString($from); + } + } + // query params + if ($to !== null) { + if('form' === 'form' && is_array($to)) { + foreach($to as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['to'] = ObjectSerializer::toString($to); + } + } + // query params + if ($name !== null) { + if('form' === 'form' && is_array($name)) { + foreach($name as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['name'] = ObjectSerializer::toString($name); + } } + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/json', 'application/problem+json'], [] ); } @@ -783,7 +912,7 @@ public function deleteWafRuleExclusionRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'DELETE', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -791,52 +920,50 @@ public function deleteWafRuleExclusionRequest($options) } /** - * Operation getWafRuleExclusion + * Operation ddosProtectionEventRuleList * - * Get a WAF rule exclusion + * Get all rules for an event * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $event_id Unique ID of the event. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\WafExclusionResponse - * @deprecated + * @return \Fastly\Model\InlineResponse2003|DdosProtectionError|DdosProtectionError */ - public function getWafRuleExclusion($options) + public function ddosProtectionEventRuleList($options) { - list($response) = $this->getWafRuleExclusionWithHttpInfo($options); + list($response) = $this->ddosProtectionEventRuleListWithHttpInfo($options); return $response; } /** - * Operation getWafRuleExclusionWithHttpInfo + * Operation ddosProtectionEventRuleListWithHttpInfo * - * Get a WAF rule exclusion + * Get all rules for an event * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $event_id Unique ID of the event. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafExclusionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\InlineResponse2003|DdosProtectionError|DdosProtectionError, HTTP status code, HTTP response headers (array of strings) */ - public function getWafRuleExclusionWithHttpInfo($options) + public function ddosProtectionEventRuleListWithHttpInfo($options) { - $request = $this->getWafRuleExclusionRequest($options); + $request = $this->ddosProtectionEventRuleListRequest($options); try { $options = $this->createHttpClientOption(); @@ -887,20 +1014,44 @@ public function getWafRuleExclusionWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\WafExclusionResponse' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2003' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2003', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('DdosProtectionError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafExclusionResponse', []), + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\WafExclusionResponse'; + $returnType = '\Fastly\Model\InlineResponse2003'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -918,7 +1069,23 @@ public function getWafRuleExclusionWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\WafExclusionResponse', + '\Fastly\Model\InlineResponse2003', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -929,26 +1096,25 @@ public function getWafRuleExclusionWithHttpInfo($options) } /** - * Operation getWafRuleExclusionAsync + * Operation ddosProtectionEventRuleListAsync * - * Get a WAF rule exclusion + * Get all rules for an event * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $event_id Unique ID of the event. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafRuleExclusionAsync($options) + public function ddosProtectionEventRuleListAsync($options) { - return $this->getWafRuleExclusionAsyncWithHttpInfo($options) + return $this->ddosProtectionEventRuleListAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -957,27 +1123,26 @@ function ($response) { } /** - * Operation getWafRuleExclusionAsyncWithHttpInfo + * Operation ddosProtectionEventRuleListAsyncWithHttpInfo * - * Get a WAF rule exclusion + * Get all rules for an event * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $event_id Unique ID of the event. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function getWafRuleExclusionAsyncWithHttpInfo($options) + public function ddosProtectionEventRuleListAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\WafExclusionResponse'; - $request = $this->getWafRuleExclusionRequest($options); + $returnType = '\Fastly\Model\InlineResponse2003'; + $request = $this->ddosProtectionEventRuleListRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1013,77 +1178,74 @@ function ($exception) { } /** - * Create request for operation 'getWafRuleExclusion' + * Create request for operation 'ddosProtectionEventRuleList' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) + * @param string $event_id Unique ID of the event. (required) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function getWafRuleExclusionRequest($options) + public function ddosProtectionEventRuleListRequest($options) { // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - $exclusion_number = array_key_exists('exclusion_number', $options) ? $options['exclusion_number'] : null; + $event_id = array_key_exists('event_id', $options) ? $options['event_id'] : null; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : 20; - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafRuleExclusion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { + // verify the required parameter 'event_id' is set + if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling getWafRuleExclusion' + 'Missing the required parameter $event_id when calling ddosProtectionEventRuleList' ); } - // verify the required parameter 'exclusion_number' is set - if ($exclusion_number === null || (is_array($exclusion_number) && count($exclusion_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $exclusion_number when calling getWafRuleExclusion' - ); + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling DdosProtectionApi.ddosProtectionEventRuleList, must be smaller than or equal to 100.'); } - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions/{exclusion_number}'; + + $resourcePath = '/ddos-protection/v1/events/{event_id}/rules'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), - $resourcePath - ); + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } } + + // path params - if ($exclusion_number !== null) { + if ($event_id !== null) { $resourcePath = str_replace( - '{' . 'exclusion_number' . '}', - ObjectSerializer::toPathValue($exclusion_number), + '{' . 'event_id' . '}', + ObjectSerializer::toPathValue($event_id), $resourcePath ); } @@ -1091,11 +1253,11 @@ public function getWafRuleExclusionRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json', 'application/problem+json'], [] ); } @@ -1158,62 +1320,46 @@ public function getWafRuleExclusionRequest($options) } /** - * Operation listWafRuleExclusions + * Operation ddosProtectionRuleGet * - * List WAF rule exclusions + * Get a rule by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_exclusion_type Filters the results based on this exclusion type. (optional) - * @param string $filter_name Filters the results based on name. (optional) - * @param int $filter_waf_rules_modsec_rule_id Filters the results based on this ModSecurity rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\WafExclusionsResponse - * @deprecated + * @return \Fastly\Model\DdosProtectionRule|DdosProtectionError|DdosProtectionError */ - public function listWafRuleExclusions($options) + public function ddosProtectionRuleGet($options) { - list($response) = $this->listWafRuleExclusionsWithHttpInfo($options); + list($response) = $this->ddosProtectionRuleGetWithHttpInfo($options); return $response; } /** - * Operation listWafRuleExclusionsWithHttpInfo + * Operation ddosProtectionRuleGetWithHttpInfo * - * List WAF rule exclusions + * Get a rule by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_exclusion_type Filters the results based on this exclusion type. (optional) - * @param string $filter_name Filters the results based on name. (optional) - * @param int $filter_waf_rules_modsec_rule_id Filters the results based on this ModSecurity rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafExclusionsResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionRule|DdosProtectionError|DdosProtectionError, HTTP status code, HTTP response headers (array of strings) */ - public function listWafRuleExclusionsWithHttpInfo($options) + public function ddosProtectionRuleGetWithHttpInfo($options) { - $request = $this->listWafRuleExclusionsRequest($options); + $request = $this->ddosProtectionRuleGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -1264,20 +1410,44 @@ public function listWafRuleExclusionsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\WafExclusionsResponse' === '\SplFileObject') { + if ('\Fastly\Model\DdosProtectionRule' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafExclusionsResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionRule', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\WafExclusionsResponse'; + $returnType = '\Fastly\Model\DdosProtectionRule'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1295,7 +1465,23 @@ public function listWafRuleExclusionsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\WafExclusionsResponse', + '\Fastly\Model\DdosProtectionRule', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1306,31 +1492,23 @@ public function listWafRuleExclusionsWithHttpInfo($options) } /** - * Operation listWafRuleExclusionsAsync + * Operation ddosProtectionRuleGetAsync * - * List WAF rule exclusions + * Get a rule by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_exclusion_type Filters the results based on this exclusion type. (optional) - * @param string $filter_name Filters the results based on name. (optional) - * @param int $filter_waf_rules_modsec_rule_id Filters the results based on this ModSecurity rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafRuleExclusionsAsync($options) + public function ddosProtectionRuleGetAsync($options) { - return $this->listWafRuleExclusionsAsyncWithHttpInfo($options) + return $this->ddosProtectionRuleGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1339,32 +1517,24 @@ function ($response) { } /** - * Operation listWafRuleExclusionsAsyncWithHttpInfo + * Operation ddosProtectionRuleGetAsyncWithHttpInfo * - * List WAF rule exclusions + * Get a rule by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_exclusion_type Filters the results based on this exclusion type. (optional) - * @param string $filter_name Filters the results based on name. (optional) - * @param int $filter_waf_rules_modsec_rule_id Filters the results based on this ModSecurity rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafRuleExclusionsAsyncWithHttpInfo($options) + public function ddosProtectionRuleGetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\WafExclusionsResponse'; - $request = $this->listWafRuleExclusionsRequest($options); + $returnType = '\Fastly\Model\DdosProtectionRule'; + $request = $this->ddosProtectionRuleGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1400,146 +1570,44 @@ function ($exception) { } /** - * Create request for operation 'listWafRuleExclusions' + * Create request for operation 'ddosProtectionRuleGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_exclusion_type Filters the results based on this exclusion type. (optional) - * @param string $filter_name Filters the results based on name. (optional) - * @param int $filter_waf_rules_modsec_rule_id Filters the results based on this ModSecurity rule ID. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rules` and `waf_rule_revisions`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function listWafRuleExclusionsRequest($options) + public function ddosProtectionRuleGetRequest($options) { // unbox the parameters from the associative array - $filter_exclusion_type = array_key_exists('filter_exclusion_type', $options) ? $options['filter_exclusion_type'] : null; - $filter_name = array_key_exists('filter_name', $options) ? $options['filter_name'] : null; - $filter_waf_rules_modsec_rule_id = array_key_exists('filter_waf_rules_modsec_rule_id', $options) ? $options['filter_waf_rules_modsec_rule_id'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafExclusionsApi.listWafRuleExclusions, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafExclusionsApi.listWafRuleExclusions, must be bigger than or equal to 1.'); - } + $rule_id = array_key_exists('rule_id', $options) ? $options['rule_id'] : null; - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling listWafRuleExclusions' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { + // verify the required parameter 'rule_id' is set + if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling listWafRuleExclusions' + 'Missing the required parameter $rule_id when calling ddosProtectionRuleGet' ); } - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions'; + $resourcePath = '/ddos-protection/v1/rules/{rule_id}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if ($filter_exclusion_type !== null) { - if('form' === 'form' && is_array($filter_exclusion_type)) { - foreach($filter_exclusion_type as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[exclusion_type]'] = ObjectSerializer::toString($filter_exclusion_type); - } - } - // query params - if ($filter_name !== null) { - if('form' === 'form' && is_array($filter_name)) { - foreach($filter_name as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[name]'] = ObjectSerializer::toString($filter_name); - } - } - // query params - if ($filter_waf_rules_modsec_rule_id !== null) { - if('form' === 'form' && is_array($filter_waf_rules_modsec_rule_id)) { - foreach($filter_waf_rules_modsec_rule_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[waf_rules.modsec_rule_id]'] = ObjectSerializer::toString($filter_waf_rules_modsec_rule_id); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { + if ($rule_id !== null) { $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), + '{' . 'rule_id' . '}', + ObjectSerializer::toPathValue($rule_id), $resourcePath ); } @@ -1547,11 +1615,11 @@ public function listWafRuleExclusionsRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json', 'application/problem+json'], [] ); } @@ -1614,54 +1682,48 @@ public function listWafRuleExclusionsRequest($options) } /** - * Operation updateWafRuleExclusion + * Operation ddosProtectionTrafficStatsRuleGet * - * Update a WAF rule exclusion + * Get traffic stats for a rule * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\WafExclusionResponse - * @deprecated + * @return \Fastly\Model\DdosProtectionTrafficStats|DdosProtectionError|DdosProtectionError */ - public function updateWafRuleExclusion($options) + public function ddosProtectionTrafficStatsRuleGet($options) { - list($response) = $this->updateWafRuleExclusionWithHttpInfo($options); + list($response) = $this->ddosProtectionTrafficStatsRuleGetWithHttpInfo($options); return $response; } /** - * Operation updateWafRuleExclusionWithHttpInfo + * Operation ddosProtectionTrafficStatsRuleGetWithHttpInfo * - * Update a WAF rule exclusion + * Get traffic stats for a rule * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafExclusionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\DdosProtectionTrafficStats|DdosProtectionError|DdosProtectionError, HTTP status code, HTTP response headers (array of strings) */ - public function updateWafRuleExclusionWithHttpInfo($options) + public function ddosProtectionTrafficStatsRuleGetWithHttpInfo($options) { - $request = $this->updateWafRuleExclusionRequest($options); + $request = $this->ddosProtectionTrafficStatsRuleGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -1683,7 +1745,7 @@ public function updateWafRuleExclusionWithHttpInfo($options) ); } - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -1711,21 +1773,45 @@ public function updateWafRuleExclusionWithHttpInfo($options) } switch($statusCode) { - case 201: - if ('\Fastly\Model\WafExclusionResponse' === '\SplFileObject') { + case 200: + if ('\Fastly\Model\DdosProtectionTrafficStats' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionTrafficStats', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('DdosProtectionError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafExclusionResponse', []), + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\WafExclusionResponse'; + $returnType = '\Fastly\Model\DdosProtectionTrafficStats'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1740,10 +1826,26 @@ public function updateWafRuleExclusionWithHttpInfo($options) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DdosProtectionTrafficStats', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\WafExclusionResponse', + 'DdosProtectionError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1754,27 +1856,24 @@ public function updateWafRuleExclusionWithHttpInfo($options) } /** - * Operation updateWafRuleExclusionAsync + * Operation ddosProtectionTrafficStatsRuleGetAsync * - * Update a WAF rule exclusion + * Get traffic stats for a rule * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function updateWafRuleExclusionAsync($options) + public function ddosProtectionTrafficStatsRuleGetAsync($options) { - return $this->updateWafRuleExclusionAsyncWithHttpInfo($options) + return $this->ddosProtectionTrafficStatsRuleGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -1783,28 +1882,25 @@ function ($response) { } /** - * Operation updateWafRuleExclusionAsyncWithHttpInfo + * Operation ddosProtectionTrafficStatsRuleGetAsyncWithHttpInfo * - * Update a WAF rule exclusion + * Get traffic stats for a rule * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function updateWafRuleExclusionAsyncWithHttpInfo($options) + public function ddosProtectionTrafficStatsRuleGetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\WafExclusionResponse'; - $request = $this->updateWafRuleExclusionRequest($options); + $returnType = '\Fastly\Model\DdosProtectionTrafficStats'; + $request = $this->ddosProtectionTrafficStatsRuleGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1840,50 +1936,39 @@ function ($exception) { } /** - * Create request for operation 'updateWafRuleExclusion' + * Create request for operation 'ddosProtectionTrafficStatsRuleGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param int $exclusion_number A numeric ID identifying a WAF exclusion. (required) - * @param \Fastly\Model\WafExclusion $waf_exclusion (optional) + * @param string $event_id Unique ID of the event. (required) + * @param string $rule_id Unique ID of the rule. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function updateWafRuleExclusionRequest($options) + public function ddosProtectionTrafficStatsRuleGetRequest($options) { // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - $exclusion_number = array_key_exists('exclusion_number', $options) ? $options['exclusion_number'] : null; - $waf_exclusion = array_key_exists('waf_exclusion', $options) ? $options['waf_exclusion'] : null; + $event_id = array_key_exists('event_id', $options) ? $options['event_id'] : null; + $rule_id = array_key_exists('rule_id', $options) ? $options['rule_id'] : null; - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { + // verify the required parameter 'event_id' is set + if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafRuleExclusion' + 'Missing the required parameter $event_id when calling ddosProtectionTrafficStatsRuleGet' ); } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { + // verify the required parameter 'rule_id' is set + if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling updateWafRuleExclusion' - ); - } - // verify the required parameter 'exclusion_number' is set - if ($exclusion_number === null || (is_array($exclusion_number) && count($exclusion_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $exclusion_number when calling updateWafRuleExclusion' + 'Missing the required parameter $rule_id when calling ddosProtectionTrafficStatsRuleGet' ); } - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/exclusions/{exclusion_number}'; + $resourcePath = '/ddos-protection/v1/events/{event_id}/rules/{rule_id}/traffic-stats'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1893,26 +1978,18 @@ public function updateWafRuleExclusionRequest($options) // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { + if ($event_id !== null) { $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), + '{' . 'event_id' . '}', + ObjectSerializer::toPathValue($event_id), $resourcePath ); } // path params - if ($exclusion_number !== null) { + if ($rule_id !== null) { $resourcePath = str_replace( - '{' . 'exclusion_number' . '}', - ObjectSerializer::toPathValue($exclusion_number), + '{' . 'rule_id' . '}', + ObjectSerializer::toPathValue($rule_id), $resourcePath ); } @@ -1920,23 +1997,17 @@ public function updateWafRuleExclusionRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json', 'application/problem+json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] + ['application/json', 'application/problem+json'], + [] ); } // for model (json/xml) - if (isset($waf_exclusion)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_exclusion)); - } else { - $httpBody = $waf_exclusion; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1985,7 +2056,7 @@ public function updateWafRuleExclusionRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'PATCH', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/DictionaryApi.php b/lib/Api/DictionaryApi.php index 7c87c054..671241a4 100644 --- a/lib/Api/DictionaryApi.php +++ b/lib/Api/DictionaryApi.php @@ -112,7 +112,7 @@ public function getConfig() /** * Operation createDictionary * - * Create an edge dictionary + * Create a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -137,7 +137,7 @@ public function createDictionary($options) /** * Operation createDictionaryWithHttpInfo * - * Create an edge dictionary + * Create a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -250,7 +250,7 @@ public function createDictionaryWithHttpInfo($options) /** * Operation createDictionaryAsync * - * Create an edge dictionary + * Create a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -278,7 +278,7 @@ function ($response) { /** * Operation createDictionaryAsyncWithHttpInfo * - * Create an edge dictionary + * Create a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -474,7 +474,7 @@ public function createDictionaryRequest($options) /** * Operation deleteDictionary * - * Delete an edge dictionary + * Delete a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -498,7 +498,7 @@ public function deleteDictionary($options) /** * Operation deleteDictionaryWithHttpInfo * - * Delete an edge dictionary + * Delete a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -610,7 +610,7 @@ public function deleteDictionaryWithHttpInfo($options) /** * Operation deleteDictionaryAsync * - * Delete an edge dictionary + * Delete a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -637,7 +637,7 @@ function ($response) { /** * Operation deleteDictionaryAsyncWithHttpInfo * - * Delete an edge dictionary + * Delete a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -836,7 +836,7 @@ public function deleteDictionaryRequest($options) /** * Operation getDictionary * - * Get an edge dictionary + * Get a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -860,7 +860,7 @@ public function getDictionary($options) /** * Operation getDictionaryWithHttpInfo * - * Get an edge dictionary + * Get a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -972,7 +972,7 @@ public function getDictionaryWithHttpInfo($options) /** * Operation getDictionaryAsync * - * Get an edge dictionary + * Get a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -999,7 +999,7 @@ function ($response) { /** * Operation getDictionaryAsyncWithHttpInfo * - * Get an edge dictionary + * Get a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1198,7 +1198,7 @@ public function getDictionaryRequest($options) /** * Operation listDictionaries * - * List edge dictionaries + * List dictionaries * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1221,7 +1221,7 @@ public function listDictionaries($options) /** * Operation listDictionariesWithHttpInfo * - * List edge dictionaries + * List dictionaries * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1332,7 +1332,7 @@ public function listDictionariesWithHttpInfo($options) /** * Operation listDictionariesAsync * - * List edge dictionaries + * List dictionaries * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1358,7 +1358,7 @@ function ($response) { /** * Operation listDictionariesAsyncWithHttpInfo * - * List edge dictionaries + * List dictionaries * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1540,7 +1540,7 @@ public function listDictionariesRequest($options) /** * Operation updateDictionary * - * Update an edge dictionary + * Update a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1566,7 +1566,7 @@ public function updateDictionary($options) /** * Operation updateDictionaryWithHttpInfo * - * Update an edge dictionary + * Update a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1680,7 +1680,7 @@ public function updateDictionaryWithHttpInfo($options) /** * Operation updateDictionaryAsync * - * Update an edge dictionary + * Update a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1709,7 +1709,7 @@ function ($response) { /** * Operation updateDictionaryAsyncWithHttpInfo * - * Update an edge dictionary + * Update a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * diff --git a/lib/Api/DictionaryInfoApi.php b/lib/Api/DictionaryInfoApi.php index 731c41a5..8744c68f 100644 --- a/lib/Api/DictionaryInfoApi.php +++ b/lib/Api/DictionaryInfoApi.php @@ -112,7 +112,7 @@ public function getConfig() /** * Operation getDictionaryInfo * - * Get edge dictionary metadata + * Get dictionary metadata * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -136,7 +136,7 @@ public function getDictionaryInfo($options) /** * Operation getDictionaryInfoWithHttpInfo * - * Get edge dictionary metadata + * Get dictionary metadata * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -248,7 +248,7 @@ public function getDictionaryInfoWithHttpInfo($options) /** * Operation getDictionaryInfoAsync * - * Get edge dictionary metadata + * Get dictionary metadata * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -275,7 +275,7 @@ function ($response) { /** * Operation getDictionaryInfoAsyncWithHttpInfo * - * Get edge dictionary metadata + * Get dictionary metadata * * Note: the input parameter is an associative array with the keys listed as the parameter name below * diff --git a/lib/Api/DictionaryItemApi.php b/lib/Api/DictionaryItemApi.php index b135d0fb..797c0f58 100644 --- a/lib/Api/DictionaryItemApi.php +++ b/lib/Api/DictionaryItemApi.php @@ -112,7 +112,7 @@ public function getConfig() /** * Operation bulkUpdateDictionaryItem * - * Update multiple entries in an edge dictionary + * Update multiple entries in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -136,7 +136,7 @@ public function bulkUpdateDictionaryItem($options) /** * Operation bulkUpdateDictionaryItemWithHttpInfo * - * Update multiple entries in an edge dictionary + * Update multiple entries in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -248,7 +248,7 @@ public function bulkUpdateDictionaryItemWithHttpInfo($options) /** * Operation bulkUpdateDictionaryItemAsync * - * Update multiple entries in an edge dictionary + * Update multiple entries in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -275,7 +275,7 @@ function ($response) { /** * Operation bulkUpdateDictionaryItemAsyncWithHttpInfo * - * Update multiple entries in an edge dictionary + * Update multiple entries in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -466,7 +466,7 @@ public function bulkUpdateDictionaryItemRequest($options) /** * Operation createDictionaryItem * - * Create an entry in an edge dictionary + * Create an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -491,7 +491,7 @@ public function createDictionaryItem($options) /** * Operation createDictionaryItemWithHttpInfo * - * Create an entry in an edge dictionary + * Create an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -604,7 +604,7 @@ public function createDictionaryItemWithHttpInfo($options) /** * Operation createDictionaryItemAsync * - * Create an entry in an edge dictionary + * Create an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -632,7 +632,7 @@ function ($response) { /** * Operation createDictionaryItemAsyncWithHttpInfo * - * Create an entry in an edge dictionary + * Create an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -828,7 +828,7 @@ public function createDictionaryItemRequest($options) /** * Operation deleteDictionaryItem * - * Delete an item from an edge dictionary + * Delete an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -852,7 +852,7 @@ public function deleteDictionaryItem($options) /** * Operation deleteDictionaryItemWithHttpInfo * - * Delete an item from an edge dictionary + * Delete an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -964,7 +964,7 @@ public function deleteDictionaryItemWithHttpInfo($options) /** * Operation deleteDictionaryItemAsync * - * Delete an item from an edge dictionary + * Delete an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -991,7 +991,7 @@ function ($response) { /** * Operation deleteDictionaryItemAsyncWithHttpInfo * - * Delete an item from an edge dictionary + * Delete an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1190,7 +1190,7 @@ public function deleteDictionaryItemRequest($options) /** * Operation getDictionaryItem * - * Get an item from an edge dictionary + * Get an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1214,7 +1214,7 @@ public function getDictionaryItem($options) /** * Operation getDictionaryItemWithHttpInfo * - * Get an item from an edge dictionary + * Get an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1326,7 +1326,7 @@ public function getDictionaryItemWithHttpInfo($options) /** * Operation getDictionaryItemAsync * - * Get an item from an edge dictionary + * Get an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1353,7 +1353,7 @@ function ($response) { /** * Operation getDictionaryItemAsyncWithHttpInfo * - * Get an item from an edge dictionary + * Get an item from a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1552,7 +1552,7 @@ public function getDictionaryItemRequest($options) /** * Operation listDictionaryItems * - * List items in an edge dictionary + * List items in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1562,7 +1562,7 @@ public function getDictionaryItemRequest($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param string $dictionary_id Alphanumeric string identifying a Dictionary. (required) * @param int $page Current page. (optional) - * @param int $per_page Number of records per page. (optional, default to 20) + * @param int $per_page Number of records per page. (optional, default to 100) * @param string $sort Field on which to sort. (optional, default to 'created') * @param string $direction Direction in which to sort results. (optional, default to 'ascend') * @@ -1579,7 +1579,7 @@ public function listDictionaryItems($options) /** * Operation listDictionaryItemsWithHttpInfo * - * List items in an edge dictionary + * List items in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1589,7 +1589,7 @@ public function listDictionaryItems($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param string $dictionary_id Alphanumeric string identifying a Dictionary. (required) * @param int $page Current page. (optional) - * @param int $per_page Number of records per page. (optional, default to 20) + * @param int $per_page Number of records per page. (optional, default to 100) * @param string $sort Field on which to sort. (optional, default to 'created') * @param string $direction Direction in which to sort results. (optional, default to 'ascend') * @@ -1694,7 +1694,7 @@ public function listDictionaryItemsWithHttpInfo($options) /** * Operation listDictionaryItemsAsync * - * List items in an edge dictionary + * List items in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1704,7 +1704,7 @@ public function listDictionaryItemsWithHttpInfo($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param string $dictionary_id Alphanumeric string identifying a Dictionary. (required) * @param int $page Current page. (optional) - * @param int $per_page Number of records per page. (optional, default to 20) + * @param int $per_page Number of records per page. (optional, default to 100) * @param string $sort Field on which to sort. (optional, default to 'created') * @param string $direction Direction in which to sort results. (optional, default to 'ascend') * @@ -1724,7 +1724,7 @@ function ($response) { /** * Operation listDictionaryItemsAsyncWithHttpInfo * - * List items in an edge dictionary + * List items in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1734,7 +1734,7 @@ function ($response) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param string $dictionary_id Alphanumeric string identifying a Dictionary. (required) * @param int $page Current page. (optional) - * @param int $per_page Number of records per page. (optional, default to 20) + * @param int $per_page Number of records per page. (optional, default to 100) * @param string $sort Field on which to sort. (optional, default to 'created') * @param string $direction Direction in which to sort results. (optional, default to 'ascend') * @@ -1790,7 +1790,7 @@ function ($exception) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param string $dictionary_id Alphanumeric string identifying a Dictionary. (required) * @param int $page Current page. (optional) - * @param int $per_page Number of records per page. (optional, default to 20) + * @param int $per_page Number of records per page. (optional, default to 100) * @param string $sort Field on which to sort. (optional, default to 'created') * @param string $direction Direction in which to sort results. (optional, default to 'ascend') * @@ -1803,7 +1803,7 @@ public function listDictionaryItemsRequest($options) $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; $dictionary_id = array_key_exists('dictionary_id', $options) ? $options['dictionary_id'] : null; $page = array_key_exists('page', $options) ? $options['page'] : null; - $per_page = array_key_exists('per_page', $options) ? $options['per_page'] : 20; + $per_page = array_key_exists('per_page', $options) ? $options['per_page'] : 100; $sort = array_key_exists('sort', $options) ? $options['sort'] : 'created'; $direction = array_key_exists('direction', $options) ? $options['direction'] : 'ascend'; @@ -1819,8 +1819,8 @@ public function listDictionaryItemsRequest($options) 'Missing the required parameter $dictionary_id when calling listDictionaryItems' ); } - if ($per_page !== null && $per_page > 100) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling DictionaryItemApi.listDictionaryItems, must be smaller than or equal to 100.'); + if ($per_page !== null && $per_page > 1000) { + throw new \InvalidArgumentException('invalid value for "$per_page" when calling DictionaryItemApi.listDictionaryItems, must be smaller than or equal to 1000.'); } if ($per_page !== null && $per_page < 1) { throw new \InvalidArgumentException('invalid value for "$per_page" when calling DictionaryItemApi.listDictionaryItems, must be bigger than or equal to 1.'); @@ -1969,7 +1969,7 @@ public function listDictionaryItemsRequest($options) /** * Operation updateDictionaryItem * - * Update an entry in an edge dictionary + * Update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -1995,7 +1995,7 @@ public function updateDictionaryItem($options) /** * Operation updateDictionaryItemWithHttpInfo * - * Update an entry in an edge dictionary + * Update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -2109,7 +2109,7 @@ public function updateDictionaryItemWithHttpInfo($options) /** * Operation updateDictionaryItemAsync * - * Update an entry in an edge dictionary + * Update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -2138,7 +2138,7 @@ function ($response) { /** * Operation updateDictionaryItemAsyncWithHttpInfo * - * Update an entry in an edge dictionary + * Update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -2351,7 +2351,7 @@ public function updateDictionaryItemRequest($options) /** * Operation upsertDictionaryItem * - * Insert or update an entry in an edge dictionary + * Insert or update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -2377,7 +2377,7 @@ public function upsertDictionaryItem($options) /** * Operation upsertDictionaryItemWithHttpInfo * - * Insert or update an entry in an edge dictionary + * Insert or update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -2491,7 +2491,7 @@ public function upsertDictionaryItemWithHttpInfo($options) /** * Operation upsertDictionaryItemAsync * - * Insert or update an entry in an edge dictionary + * Insert or update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -2520,7 +2520,7 @@ function ($response) { /** * Operation upsertDictionaryItemAsyncWithHttpInfo * - * Insert or update an entry in an edge dictionary + * Insert or update an entry in a dictionary * * Note: the input parameter is an associative array with the keys listed as the parameter name below * diff --git a/lib/Api/DomainOwnershipsApi.php b/lib/Api/DomainOwnershipsApi.php index 3ca0c673..fb150664 100644 --- a/lib/Api/DomainOwnershipsApi.php +++ b/lib/Api/DomainOwnershipsApi.php @@ -122,7 +122,7 @@ public function getConfig() * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2002 + * @return \Fastly\Model\InlineResponse2004 */ public function listDomainOwnerships($options) { @@ -143,7 +143,7 @@ public function listDomainOwnerships($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2002, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) */ public function listDomainOwnershipsWithHttpInfo($options) { @@ -198,20 +198,20 @@ public function listDomainOwnershipsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2002' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2004' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2002', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2002'; + $returnType = '\Fastly\Model\InlineResponse2004'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -229,7 +229,7 @@ public function listDomainOwnershipsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2002', + '\Fastly\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -279,7 +279,7 @@ function ($response) { */ public function listDomainOwnershipsAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2002'; + $returnType = '\Fastly\Model\InlineResponse2004'; $request = $this->listDomainOwnershipsRequest($options); return $this->client diff --git a/lib/Api/HistoricalApi.php b/lib/Api/HistoricalApi.php index ca0b57dc..83b5acc0 100644 --- a/lib/Api/HistoricalApi.php +++ b/lib/Api/HistoricalApi.php @@ -122,7 +122,7 @@ public function getConfig() * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -147,7 +147,7 @@ public function getHistStats($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -260,7 +260,7 @@ public function getHistStatsWithHttpInfo($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -288,7 +288,7 @@ function ($response) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -342,7 +342,7 @@ function ($exception) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -492,7 +492,7 @@ public function getHistStatsRequest($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -517,7 +517,7 @@ public function getHistStatsAggregated($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -630,7 +630,7 @@ public function getHistStatsAggregatedWithHttpInfo($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -658,7 +658,7 @@ function ($response) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -712,7 +712,7 @@ function ($exception) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -863,7 +863,7 @@ public function getHistStatsAggregatedRequest($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -889,7 +889,7 @@ public function getHistStatsField($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1003,7 +1003,7 @@ public function getHistStatsFieldWithHttpInfo($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1032,7 +1032,7 @@ function ($response) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1087,7 +1087,7 @@ function ($exception) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1253,7 +1253,7 @@ public function getHistStatsFieldRequest($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1279,7 +1279,7 @@ public function getHistStatsService($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1393,7 +1393,7 @@ public function getHistStatsServiceWithHttpInfo($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1422,7 +1422,7 @@ function ($response) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1477,7 +1477,7 @@ function ($exception) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1644,7 +1644,7 @@ public function getHistStatsServiceRequest($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1671,7 +1671,7 @@ public function getHistStatsServiceField($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1786,7 +1786,7 @@ public function getHistStatsServiceFieldWithHttpInfo($options) * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1816,7 +1816,7 @@ function ($response) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1872,7 +1872,7 @@ function ($exception) { * @param string $from Timestamp that defines the start of the window for which to fetch statistics, including the timestamp itself. Accepts Unix timestamps, or any form of input parsable by the [Chronic Ruby library](https://github.com/mojombo/chronic), such as 'yesterday', or 'two weeks ago'. Default varies based on the value of `by`. (optional) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') - * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `southamerica_std` - South America. (optional) + * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/KvStoreApi.php b/lib/Api/KvStoreApi.php index 22664f2b..a3e30f58 100644 --- a/lib/Api/KvStoreApi.php +++ b/lib/Api/KvStoreApi.php @@ -1054,7 +1054,7 @@ public function kvStoreGetRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2003 + * @return \Fastly\Model\InlineResponse2005 */ public function kvStoreList($options) { @@ -1077,7 +1077,7 @@ public function kvStoreList($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2003, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreListWithHttpInfo($options) { @@ -1132,20 +1132,20 @@ public function kvStoreListWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2003' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2005' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2003', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2005', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2003'; + $returnType = '\Fastly\Model\InlineResponse2005'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1163,7 +1163,7 @@ public function kvStoreListWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2003', + '\Fastly\Model\InlineResponse2005', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1217,7 +1217,7 @@ function ($response) { */ public function kvStoreListAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2003'; + $returnType = '\Fastly\Model\InlineResponse2005'; $request = $this->kvStoreListRequest($options); return $this->client diff --git a/lib/Api/KvStoreItemApi.php b/lib/Api/KvStoreItemApi.php index 7077f512..7b70db23 100644 --- a/lib/Api/KvStoreItemApi.php +++ b/lib/Api/KvStoreItemApi.php @@ -793,7 +793,7 @@ public function kvStoreGetItemRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2004 + * @return \Fastly\Model\InlineResponse2006 */ public function kvStoreListItemKeys($options) { @@ -819,7 +819,7 @@ public function kvStoreListItemKeys($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreListItemKeysWithHttpInfo($options) { @@ -874,20 +874,20 @@ public function kvStoreListItemKeysWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2004' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2006' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2004', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2006', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2004'; + $returnType = '\Fastly\Model\InlineResponse2006'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -905,7 +905,7 @@ public function kvStoreListItemKeysWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2004', + '\Fastly\Model\InlineResponse2006', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -965,7 +965,7 @@ function ($response) { */ public function kvStoreListItemKeysAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2004'; + $returnType = '\Fastly\Model\InlineResponse2006'; $request = $this->kvStoreListItemKeysRequest($options); return $this->client diff --git a/lib/Api/ObservabilityAggregationsForLogsApi.php b/lib/Api/ObservabilityAggregationsForLogsApi.php new file mode 100644 index 00000000..205f92f6 --- /dev/null +++ b/lib/Api/ObservabilityAggregationsForLogsApi.php @@ -0,0 +1,615 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation logAggregationsGet + * + * Retrieve aggregated log results + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $source source (required) + * @param string $service_id service_id (required) + * @param string $start start (required) + * @param string $end end (required) + * @param float $limit limit (optional) + * @param string $filter filter (optional) + * @param string $series series (required) + * @param string $dimensions dimensions (optional) + * @param string $sort sort (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\LogAggregationsGetResponse + */ + public function logAggregationsGet($options) + { + list($response) = $this->logAggregationsGetWithHttpInfo($options); + return $response; + } + + /** + * Operation logAggregationsGetWithHttpInfo + * + * Retrieve aggregated log results + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param float $limit (optional) + * @param string $filter (optional) + * @param string $series (required) + * @param string $dimensions (optional) + * @param string $sort (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\LogAggregationsGetResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function logAggregationsGetWithHttpInfo($options) + { + $request = $this->logAggregationsGetRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\LogAggregationsGetResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\LogAggregationsGetResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\LogAggregationsGetResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\LogAggregationsGetResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation logAggregationsGetAsync + * + * Retrieve aggregated log results + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param float $limit (optional) + * @param string $filter (optional) + * @param string $series (required) + * @param string $dimensions (optional) + * @param string $sort (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function logAggregationsGetAsync($options) + { + return $this->logAggregationsGetAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation logAggregationsGetAsyncWithHttpInfo + * + * Retrieve aggregated log results + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param float $limit (optional) + * @param string $filter (optional) + * @param string $series (required) + * @param string $dimensions (optional) + * @param string $sort (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function logAggregationsGetAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\LogAggregationsGetResponse'; + $request = $this->logAggregationsGetRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'logAggregationsGet' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param float $limit (optional) + * @param string $filter (optional) + * @param string $series (required) + * @param string $dimensions (optional) + * @param string $sort (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function logAggregationsGetRequest($options) + { + // unbox the parameters from the associative array + $source = array_key_exists('source', $options) ? $options['source'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $start = array_key_exists('start', $options) ? $options['start'] : null; + $end = array_key_exists('end', $options) ? $options['end'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : null; + $filter = array_key_exists('filter', $options) ? $options['filter'] : null; + $series = array_key_exists('series', $options) ? $options['series'] : null; + $dimensions = array_key_exists('dimensions', $options) ? $options['dimensions'] : null; + $sort = array_key_exists('sort', $options) ? $options['sort'] : null; + + // verify the required parameter 'source' is set + if ($source === null || (is_array($source) && count($source) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $source when calling logAggregationsGet' + ); + } + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling logAggregationsGet' + ); + } + // verify the required parameter 'start' is set + if ($start === null || (is_array($start) && count($start) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $start when calling logAggregationsGet' + ); + } + // verify the required parameter 'end' is set + if ($end === null || (is_array($end) && count($end) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $end when calling logAggregationsGet' + ); + } + // verify the required parameter 'series' is set + if ($series === null || (is_array($series) && count($series) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $series when calling logAggregationsGet' + ); + } + + $resourcePath = '/observability/aggregations'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($source !== null) { + if('form' === 'form' && is_array($source)) { + foreach($source as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['source'] = ObjectSerializer::toString($source); + } + } + // query params + if ($service_id !== null) { + if('form' === 'form' && is_array($service_id)) { + foreach($service_id as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['service_id'] = ObjectSerializer::toString($service_id); + } + } + // query params + if ($start !== null) { + if('form' === 'form' && is_array($start)) { + foreach($start as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['start'] = ObjectSerializer::toString($start); + } + } + // query params + if ($end !== null) { + if('form' === 'form' && is_array($end)) { + foreach($end as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['end'] = ObjectSerializer::toString($end); + } + } + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } + } + // query params + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['filter'] = ObjectSerializer::toString($filter); + } + } + // query params + if ($series !== null) { + if('form' === 'form' && is_array($series)) { + foreach($series as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['series'] = ObjectSerializer::toString($series); + } + } + // query params + if ($dimensions !== null) { + if('form' === 'form' && is_array($dimensions)) { + foreach($dimensions as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['dimensions'] = ObjectSerializer::toString($dimensions); + } + } + // query params + if ($sort !== null) { + if('form' === 'form' && is_array($sort)) { + foreach($sort as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['sort'] = ObjectSerializer::toString($sort); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/WafTagsApi.php b/lib/Api/ObservabilityTimeseriesForLogsApi.php similarity index 62% rename from lib/Api/WafTagsApi.php rename to lib/Api/ObservabilityTimeseriesForLogsApi.php index ab47d195..19bbd783 100644 --- a/lib/Api/WafTagsApi.php +++ b/lib/Api/ObservabilityTimeseriesForLogsApi.php @@ -1,6 +1,6 @@ listWafTagsWithHttpInfo($options); + list($response) = $this->logTimeseriesGetWithHttpInfo($options); return $response; } /** - * Operation listWafTagsWithHttpInfo + * Operation logTimeseriesGetWithHttpInfo * - * List tags + * Retrieve log data as time series * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rules') + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param string $granularity (required) + * @param string $filter (optional) + * @param string $series (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafTagsResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated + * @return array of \Fastly\Model\LogTimeseriesGetResponse, HTTP status code, HTTP response headers (array of strings) */ - public function listWafTagsWithHttpInfo($options) + public function logTimeseriesGetWithHttpInfo($options) { - $request = $this->listWafTagsRequest($options); + $request = $this->logTimeseriesGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -208,20 +212,20 @@ public function listWafTagsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\WafTagsResponse' === '\SplFileObject') { + if ('\Fastly\Model\LogTimeseriesGetResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafTagsResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\LogTimeseriesGetResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\WafTagsResponse'; + $returnType = '\Fastly\Model\LogTimeseriesGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -239,7 +243,7 @@ public function listWafTagsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\WafTagsResponse', + '\Fastly\Model\LogTimeseriesGetResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -250,27 +254,29 @@ public function listWafTagsWithHttpInfo($options) } /** - * Operation listWafTagsAsync + * Operation logTimeseriesGetAsync * - * List tags + * Retrieve log data as time series * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rules') + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param string $granularity (required) + * @param string $filter (optional) + * @param string $series (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafTagsAsync($options) + public function logTimeseriesGetAsync($options) { - return $this->listWafTagsAsyncWithHttpInfo($options) + return $this->logTimeseriesGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -279,28 +285,30 @@ function ($response) { } /** - * Operation listWafTagsAsyncWithHttpInfo + * Operation logTimeseriesGetAsyncWithHttpInfo * - * List tags + * Retrieve log data as time series * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rules') + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param string $granularity (required) + * @param string $filter (optional) + * @param string $series (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated */ - public function listWafTagsAsyncWithHttpInfo($options) + public function logTimeseriesGetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\WafTagsResponse'; - $request = $this->listWafTagsRequest($options); + $returnType = '\Fastly\Model\LogTimeseriesGetResponse'; + $request = $this->logTimeseriesGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -336,39 +344,73 @@ function ($exception) { } /** - * Create request for operation 'listWafTags' + * Create request for operation 'logTimeseriesGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param string $filter_name Limit the returned tags to a specific name. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rules') + * @param string $source (required) + * @param string $service_id (required) + * @param string $start (required) + * @param string $end (required) + * @param string $granularity (required) + * @param string $filter (optional) + * @param string $series (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request - * @deprecated */ - public function listWafTagsRequest($options) + public function logTimeseriesGetRequest($options) { // unbox the parameters from the associative array - $filter_name = array_key_exists('filter_name', $options) ? $options['filter_name'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : 'waf_rules'; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafTagsApi.listWafTags, must be smaller than or equal to 100.'); + $source = array_key_exists('source', $options) ? $options['source'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $start = array_key_exists('start', $options) ? $options['start'] : null; + $end = array_key_exists('end', $options) ? $options['end'] : null; + $granularity = array_key_exists('granularity', $options) ? $options['granularity'] : null; + $filter = array_key_exists('filter', $options) ? $options['filter'] : null; + $series = array_key_exists('series', $options) ? $options['series'] : null; + + // verify the required parameter 'source' is set + if ($source === null || (is_array($source) && count($source) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $source when calling logTimeseriesGet' + ); } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafTagsApi.listWafTags, must be bigger than or equal to 1.'); + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling logTimeseriesGet' + ); + } + // verify the required parameter 'start' is set + if ($start === null || (is_array($start) && count($start) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $start when calling logTimeseriesGet' + ); + } + // verify the required parameter 'end' is set + if ($end === null || (is_array($end) && count($end) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $end when calling logTimeseriesGet' + ); + } + // verify the required parameter 'granularity' is set + if ($granularity === null || (is_array($granularity) && count($granularity) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $granularity when calling logTimeseriesGet' + ); + } + // verify the required parameter 'series' is set + if ($series === null || (is_array($series) && count($series) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $series when calling logTimeseriesGet' + ); } - - $resourcePath = '/waf/tags'; + $resourcePath = '/observability/timeseries'; $formParams = []; $queryParams = []; $headerParams = []; @@ -376,47 +418,80 @@ public function listWafTagsRequest($options) $multipart = false; // query params - if ($filter_name !== null) { - if('form' === 'form' && is_array($filter_name)) { - foreach($filter_name as $key => $value) { + if ($source !== null) { + if('form' === 'form' && is_array($source)) { + foreach($source as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['source'] = ObjectSerializer::toString($source); + } + } + // query params + if ($service_id !== null) { + if('form' === 'form' && is_array($service_id)) { + foreach($service_id as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['service_id'] = ObjectSerializer::toString($service_id); + } + } + // query params + if ($start !== null) { + if('form' === 'form' && is_array($start)) { + foreach($start as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['start'] = ObjectSerializer::toString($start); + } + } + // query params + if ($end !== null) { + if('form' === 'form' && is_array($end)) { + foreach($end as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['filter[name]'] = ObjectSerializer::toString($filter_name); + $queryParams['end'] = ObjectSerializer::toString($end); } } // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { + if ($granularity !== null) { + if('form' === 'form' && is_array($granularity)) { + foreach($granularity as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); + $queryParams['granularity'] = ObjectSerializer::toString($granularity); } } // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { + if ($filter !== null) { + if('form' === 'form' && is_array($filter)) { + foreach($filter as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); + $queryParams['filter'] = ObjectSerializer::toString($filter); } } // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { + if ($series !== null) { + if('form' === 'form' && is_array($series)) { + foreach($series as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['include'] = ObjectSerializer::toString($include); + $queryParams['series'] = ObjectSerializer::toString($series); } } @@ -425,11 +500,11 @@ public function listWafTagsRequest($options) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], + ['application/json'], [] ); } diff --git a/lib/Api/ProductBotManagementApi.php b/lib/Api/ProductBotManagementApi.php index bee3282a..dd27a140 100644 --- a/lib/Api/ProductBotManagementApi.php +++ b/lib/Api/ProductBotManagementApi.php @@ -962,6 +962,308 @@ public function getProductBotManagementRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductBotManagement + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\BotManagementResponseBodyGetAllServices + */ + public function getServicesProductBotManagement($options) + { + list($response) = $this->getServicesProductBotManagementWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductBotManagementWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\BotManagementResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductBotManagementWithHttpInfo($options) + { + $request = $this->getServicesProductBotManagementRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\BotManagementResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\BotManagementResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\BotManagementResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\BotManagementResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductBotManagementAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductBotManagementAsync($options) + { + return $this->getServicesProductBotManagementAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductBotManagementAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductBotManagementAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\BotManagementResponseBodyGetAllServices'; + $request = $this->getServicesProductBotManagementRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductBotManagement' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductBotManagementRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/bot_management/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductBrotliCompressionApi.php b/lib/Api/ProductBrotliCompressionApi.php index f5c8ef68..e85c5381 100644 --- a/lib/Api/ProductBrotliCompressionApi.php +++ b/lib/Api/ProductBrotliCompressionApi.php @@ -962,6 +962,308 @@ public function getProductBrotliCompressionRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductBrotliCompression + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\BrotliCompressionResponseBodyGetAllServices + */ + public function getServicesProductBrotliCompression($options) + { + list($response) = $this->getServicesProductBrotliCompressionWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductBrotliCompressionWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\BrotliCompressionResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductBrotliCompressionWithHttpInfo($options) + { + $request = $this->getServicesProductBrotliCompressionRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\BrotliCompressionResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\BrotliCompressionResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\BrotliCompressionResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\BrotliCompressionResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductBrotliCompressionAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductBrotliCompressionAsync($options) + { + return $this->getServicesProductBrotliCompressionAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductBrotliCompressionAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductBrotliCompressionAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\BrotliCompressionResponseBodyGetAllServices'; + $request = $this->getServicesProductBrotliCompressionRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductBrotliCompression' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductBrotliCompressionRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/brotli_compression/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductDdosProtectionApi.php b/lib/Api/ProductDdosProtectionApi.php index 4dfaf0c7..dcf7610d 100644 --- a/lib/Api/ProductDdosProtectionApi.php +++ b/lib/Api/ProductDdosProtectionApi.php @@ -1284,6 +1284,308 @@ public function getProductDdosProtectionConfigurationRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductDdosProtection + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DdosProtectionResponseBodyGetAllServices + */ + public function getServicesProductDdosProtection($options) + { + list($response) = $this->getServicesProductDdosProtectionWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductDdosProtectionWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DdosProtectionResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductDdosProtectionWithHttpInfo($options) + { + $request = $this->getServicesProductDdosProtectionRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DdosProtectionResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DdosProtectionResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DdosProtectionResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductDdosProtectionAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductDdosProtectionAsync($options) + { + return $this->getServicesProductDdosProtectionAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductDdosProtectionAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductDdosProtectionAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DdosProtectionResponseBodyGetAllServices'; + $request = $this->getServicesProductDdosProtectionRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductDdosProtection' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductDdosProtectionRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/ddos_protection/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductDomainInspectorApi.php b/lib/Api/ProductDomainInspectorApi.php index 677e3d48..22c40850 100644 --- a/lib/Api/ProductDomainInspectorApi.php +++ b/lib/Api/ProductDomainInspectorApi.php @@ -962,6 +962,308 @@ public function getProductDomainInspectorRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductDomainInspector + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DomainInspectorResponseBodyGetAllServices + */ + public function getServicesProductDomainInspector($options) + { + list($response) = $this->getServicesProductDomainInspectorWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductDomainInspectorWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DomainInspectorResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductDomainInspectorWithHttpInfo($options) + { + $request = $this->getServicesProductDomainInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DomainInspectorResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DomainInspectorResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DomainInspectorResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DomainInspectorResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductDomainInspectorAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductDomainInspectorAsync($options) + { + return $this->getServicesProductDomainInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductDomainInspectorAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductDomainInspectorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DomainInspectorResponseBodyGetAllServices'; + $request = $this->getServicesProductDomainInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductDomainInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductDomainInspectorRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/domain_inspector/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductFanoutApi.php b/lib/Api/ProductFanoutApi.php index 3a6a3ced..935c6ecc 100644 --- a/lib/Api/ProductFanoutApi.php +++ b/lib/Api/ProductFanoutApi.php @@ -962,6 +962,308 @@ public function getProductFanoutRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductFanout + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\FanoutResponseBodyGetAllServices + */ + public function getServicesProductFanout($options) + { + list($response) = $this->getServicesProductFanoutWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductFanoutWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\FanoutResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductFanoutWithHttpInfo($options) + { + $request = $this->getServicesProductFanoutRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\FanoutResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\FanoutResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\FanoutResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\FanoutResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductFanoutAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductFanoutAsync($options) + { + return $this->getServicesProductFanoutAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductFanoutAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductFanoutAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\FanoutResponseBodyGetAllServices'; + $request = $this->getServicesProductFanoutRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductFanout' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductFanoutRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/fanout/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductImageOptimizerApi.php b/lib/Api/ProductImageOptimizerApi.php index 00778dea..512cc95b 100644 --- a/lib/Api/ProductImageOptimizerApi.php +++ b/lib/Api/ProductImageOptimizerApi.php @@ -962,6 +962,308 @@ public function getProductImageOptimizerRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductImageOptimizer + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ImageOptimizerResponseBodyGetAllServices + */ + public function getServicesProductImageOptimizer($options) + { + list($response) = $this->getServicesProductImageOptimizerWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductImageOptimizerWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ImageOptimizerResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductImageOptimizerWithHttpInfo($options) + { + $request = $this->getServicesProductImageOptimizerRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ImageOptimizerResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ImageOptimizerResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ImageOptimizerResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ImageOptimizerResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductImageOptimizerAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductImageOptimizerAsync($options) + { + return $this->getServicesProductImageOptimizerAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductImageOptimizerAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductImageOptimizerAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ImageOptimizerResponseBodyGetAllServices'; + $request = $this->getServicesProductImageOptimizerRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductImageOptimizer' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductImageOptimizerRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/image_optimizer/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductLogExplorerInsightsApi.php b/lib/Api/ProductLogExplorerInsightsApi.php index 35982ba7..8ce8fde9 100644 --- a/lib/Api/ProductLogExplorerInsightsApi.php +++ b/lib/Api/ProductLogExplorerInsightsApi.php @@ -962,6 +962,308 @@ public function getProductLogExplorerInsightsRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductLogExplorerInsights + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices + */ + public function getServicesProductLogExplorerInsights($options) + { + list($response) = $this->getServicesProductLogExplorerInsightsWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductLogExplorerInsightsWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductLogExplorerInsightsWithHttpInfo($options) + { + $request = $this->getServicesProductLogExplorerInsightsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductLogExplorerInsightsAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductLogExplorerInsightsAsync($options) + { + return $this->getServicesProductLogExplorerInsightsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductLogExplorerInsightsAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductLogExplorerInsightsAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\LogExplorerInsightsResponseBodyGetAllServices'; + $request = $this->getServicesProductLogExplorerInsightsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductLogExplorerInsights' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductLogExplorerInsightsRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/log_explorer_insights/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductNgwafApi.php b/lib/Api/ProductNgwafApi.php index 317cad8f..c9975150 100644 --- a/lib/Api/ProductNgwafApi.php +++ b/lib/Api/ProductNgwafApi.php @@ -1296,6 +1296,308 @@ public function getProductNgwafConfigurationRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductNgwaf + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\NgwafResponseBodyGetAllServices + */ + public function getServicesProductNgwaf($options) + { + list($response) = $this->getServicesProductNgwafWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductNgwafWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\NgwafResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductNgwafWithHttpInfo($options) + { + $request = $this->getServicesProductNgwafRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\NgwafResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\NgwafResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\NgwafResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\NgwafResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductNgwafAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductNgwafAsync($options) + { + return $this->getServicesProductNgwafAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductNgwafAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductNgwafAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\NgwafResponseBodyGetAllServices'; + $request = $this->getServicesProductNgwafRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductNgwaf' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductNgwafRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/ngwaf/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductOriginInspectorApi.php b/lib/Api/ProductOriginInspectorApi.php index 0a03445b..483f1fa6 100644 --- a/lib/Api/ProductOriginInspectorApi.php +++ b/lib/Api/ProductOriginInspectorApi.php @@ -962,6 +962,308 @@ public function getProductOriginInspectorRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductOriginInspector + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\OriginInspectorResponseBodyGetAllServices + */ + public function getServicesProductOriginInspector($options) + { + list($response) = $this->getServicesProductOriginInspectorWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductOriginInspectorWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\OriginInspectorResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductOriginInspectorWithHttpInfo($options) + { + $request = $this->getServicesProductOriginInspectorRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\OriginInspectorResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\OriginInspectorResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\OriginInspectorResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\OriginInspectorResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductOriginInspectorAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductOriginInspectorAsync($options) + { + return $this->getServicesProductOriginInspectorAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductOriginInspectorAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductOriginInspectorAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\OriginInspectorResponseBodyGetAllServices'; + $request = $this->getServicesProductOriginInspectorRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductOriginInspector' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductOriginInspectorRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/origin_inspector/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/ProductWebsocketsApi.php b/lib/Api/ProductWebsocketsApi.php index 0af563a1..5c221743 100644 --- a/lib/Api/ProductWebsocketsApi.php +++ b/lib/Api/ProductWebsocketsApi.php @@ -962,6 +962,308 @@ public function getProductWebsocketsRequest($options) } + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductWebsockets + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\WebsocketsResponseBodyGetAllServices + */ + public function getServicesProductWebsockets($options) + { + list($response) = $this->getServicesProductWebsocketsWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductWebsocketsWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\WebsocketsResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductWebsocketsWithHttpInfo($options) + { + $request = $this->getServicesProductWebsocketsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\WebsocketsResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\WebsocketsResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\WebsocketsResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\WebsocketsResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductWebsocketsAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductWebsocketsAsync($options) + { + return $this->getServicesProductWebsocketsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductWebsocketsAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductWebsocketsAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\WebsocketsResponseBodyGetAllServices'; + $request = $this->getServicesProductWebsocketsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductWebsockets' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductWebsocketsRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/websockets/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] diff --git a/lib/Api/RateLimiterApi.php b/lib/Api/RateLimiterApi.php index f667a744..208a8b6b 100644 --- a/lib/Api/RateLimiterApi.php +++ b/lib/Api/RateLimiterApi.php @@ -122,7 +122,7 @@ public function getConfig() * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -156,7 +156,7 @@ public function createRateLimiter($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -278,7 +278,7 @@ public function createRateLimiterWithHttpInfo($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -315,7 +315,7 @@ function ($response) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -378,7 +378,7 @@ function ($exception) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -1606,7 +1606,7 @@ public function listRateLimitersRequest($options) * * @param string $rate_limiter_id Alphanumeric string identifying the rate limiter. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -1639,7 +1639,7 @@ public function updateRateLimiter($options) * * @param string $rate_limiter_id Alphanumeric string identifying the rate limiter. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -1760,7 +1760,7 @@ public function updateRateLimiterWithHttpInfo($options) * * @param string $rate_limiter_id Alphanumeric string identifying the rate limiter. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -1796,7 +1796,7 @@ function ($response) { * * @param string $rate_limiter_id Alphanumeric string identifying the rate limiter. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) @@ -1858,7 +1858,7 @@ function ($exception) { * * @param string $rate_limiter_id Alphanumeric string identifying the rate limiter. (required) * @param string $name A human readable name for the rate limiting rule. (optional) - * @param string $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) + * @param string $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. (optional) * @param string[] $http_methods Array of HTTP methods to apply rate limiting to. (optional) * @param int $rps_limit Upper limit of requests per second allowed by the rate limiter. (optional) * @param int $window_size Number of seconds during which the RPS limit must be exceeded in order to trigger a violation. (optional) diff --git a/lib/Api/ResourceApi.php b/lib/Api/ResourceApi.php index fa5b016c..69d1967e 100644 --- a/lib/Api/ResourceApi.php +++ b/lib/Api/ResourceApi.php @@ -122,7 +122,7 @@ public function getConfig() * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -147,7 +147,7 @@ public function createResource($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -260,7 +260,7 @@ public function createResourceWithHttpInfo($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -288,7 +288,7 @@ function ($response) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -342,7 +342,7 @@ function ($exception) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1551,7 +1551,7 @@ public function listResourcesRequest($options) * @param int $version_id Integer identifying a service version. (required) * @param string $id An alphanumeric string identifying the resource link. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1577,7 +1577,7 @@ public function updateResource($options) * @param int $version_id Integer identifying a service version. (required) * @param string $id An alphanumeric string identifying the resource link. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1691,7 +1691,7 @@ public function updateResourceWithHttpInfo($options) * @param int $version_id Integer identifying a service version. (required) * @param string $id An alphanumeric string identifying the resource link. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1720,7 +1720,7 @@ function ($response) { * @param int $version_id Integer identifying a service version. (required) * @param string $id An alphanumeric string identifying the resource link. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1775,7 +1775,7 @@ function ($exception) { * @param int $version_id Integer identifying a service version. (required) * @param string $id An alphanumeric string identifying the resource link. (required) * @param string $resource_id The ID of the underlying linked resource. (optional) - * @param string $name The name of the resource link. (optional) + * @param string $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/SecretStoreApi.php b/lib/Api/SecretStoreApi.php index 29469fbf..6b9af2da 100644 --- a/lib/Api/SecretStoreApi.php +++ b/lib/Api/SecretStoreApi.php @@ -1340,7 +1340,7 @@ public function getSecretStoreRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2005 + * @return \Fastly\Model\InlineResponse2007 */ public function getSecretStores($options) { @@ -1364,7 +1364,7 @@ public function getSecretStores($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) */ public function getSecretStoresWithHttpInfo($options) { @@ -1419,20 +1419,20 @@ public function getSecretStoresWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2005' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2007' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2005', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2007', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2005'; + $returnType = '\Fastly\Model\InlineResponse2007'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1450,7 +1450,7 @@ public function getSecretStoresWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2005', + '\Fastly\Model\InlineResponse2007', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1506,7 +1506,7 @@ function ($response) { */ public function getSecretStoresAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2005'; + $returnType = '\Fastly\Model\InlineResponse2007'; $request = $this->getSecretStoresRequest($options); return $this->client diff --git a/lib/Api/SecretStoreItemApi.php b/lib/Api/SecretStoreItemApi.php index 762a8c54..bdd7549c 100644 --- a/lib/Api/SecretStoreItemApi.php +++ b/lib/Api/SecretStoreItemApi.php @@ -1098,7 +1098,7 @@ public function getSecretRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2006 + * @return \Fastly\Model\InlineResponse2008 */ public function getSecrets($options) { @@ -1122,7 +1122,7 @@ public function getSecrets($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) */ public function getSecretsWithHttpInfo($options) { @@ -1177,20 +1177,20 @@ public function getSecretsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2006' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2008' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2006', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2008', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2006'; + $returnType = '\Fastly\Model\InlineResponse2008'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1208,7 +1208,7 @@ public function getSecretsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2006', + '\Fastly\Model\InlineResponse2008', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1264,7 +1264,7 @@ function ($response) { */ public function getSecretsAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2006'; + $returnType = '\Fastly\Model\InlineResponse2008'; $request = $this->getSecretsRequest($options); return $this->client diff --git a/lib/Api/ServiceAuthorizationsApi.php b/lib/Api/ServiceAuthorizationsApi.php index e70bc9e8..eefd0a69 100644 --- a/lib/Api/ServiceAuthorizationsApi.php +++ b/lib/Api/ServiceAuthorizationsApi.php @@ -714,7 +714,7 @@ public function deleteServiceAuthorizationRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2007 + * @return \Fastly\Model\InlineResponse2009 */ public function deleteServiceAuthorization2($options) { @@ -736,7 +736,7 @@ public function deleteServiceAuthorization2($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ public function deleteServiceAuthorization2WithHttpInfo($options) { @@ -791,20 +791,20 @@ public function deleteServiceAuthorization2WithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2007' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2009' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2007'; + $returnType = '\Fastly\Model\InlineResponse2009'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -822,7 +822,7 @@ public function deleteServiceAuthorization2WithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2007', + '\Fastly\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -874,7 +874,7 @@ function ($response) { */ public function deleteServiceAuthorization2AsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2007'; + $returnType = '\Fastly\Model\InlineResponse2009'; $request = $this->deleteServiceAuthorization2Request($options); return $this->client diff --git a/lib/Api/UserApi.php b/lib/Api/UserApi.php index 4e47c8c4..1c7f36a0 100644 --- a/lib/Api/UserApi.php +++ b/lib/Api/UserApi.php @@ -131,6 +131,7 @@ public function getConfig() * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Fastly\Model\UserResponse + * @deprecated */ public function createUser($options) { @@ -160,6 +161,7 @@ public function createUser($options) * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Fastly\Model\UserResponse, HTTP status code, HTTP response headers (array of strings) + * @deprecated */ public function createUserWithHttpInfo($options) { @@ -276,6 +278,7 @@ public function createUserWithHttpInfo($options) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function createUserAsync($options) { @@ -308,6 +311,7 @@ function ($response) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface + * @deprecated */ public function createUserAsyncWithHttpInfo($options) { @@ -366,6 +370,7 @@ function ($exception) { * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request + * @deprecated */ public function createUserRequest($options) { diff --git a/lib/Api/WafActiveRulesApi.php b/lib/Api/WafActiveRulesApi.php deleted file mode 100644 index b4741ad7..00000000 --- a/lib/Api/WafActiveRulesApi.php +++ /dev/null @@ -1,3009 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation bulkDeleteWafActiveRules - * - * Delete multiple active rules from a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - * @deprecated - */ - public function bulkDeleteWafActiveRules($options) - { - $this->bulkDeleteWafActiveRulesWithHttpInfo($options); - } - - /** - * Operation bulkDeleteWafActiveRulesWithHttpInfo - * - * Delete multiple active rules from a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function bulkDeleteWafActiveRulesWithHttpInfo($options) - { - $request = $this->bulkDeleteWafActiveRulesRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation bulkDeleteWafActiveRulesAsync - * - * Delete multiple active rules from a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function bulkDeleteWafActiveRulesAsync($options) - { - return $this->bulkDeleteWafActiveRulesAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation bulkDeleteWafActiveRulesAsyncWithHttpInfo - * - * Delete multiple active rules from a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function bulkDeleteWafActiveRulesAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->bulkDeleteWafActiveRulesRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'bulkDeleteWafActiveRules' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function bulkDeleteWafActiveRulesRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling bulkDeleteWafActiveRules' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling bulkDeleteWafActiveRules' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - ['application/vnd.api+json; ext=bulk'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation bulkUpdateWafActiveRules - * - * Update multiple active rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRuleData $body body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - * @deprecated - */ - public function bulkUpdateWafActiveRules($options) - { - $this->bulkUpdateWafActiveRulesWithHttpInfo($options); - } - - /** - * Operation bulkUpdateWafActiveRulesWithHttpInfo - * - * Update multiple active rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRuleData $body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function bulkUpdateWafActiveRulesWithHttpInfo($options) - { - $request = $this->bulkUpdateWafActiveRulesRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation bulkUpdateWafActiveRulesAsync - * - * Update multiple active rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRuleData $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function bulkUpdateWafActiveRulesAsync($options) - { - return $this->bulkUpdateWafActiveRulesAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation bulkUpdateWafActiveRulesAsyncWithHttpInfo - * - * Update multiple active rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRuleData $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function bulkUpdateWafActiveRulesAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->bulkUpdateWafActiveRulesRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'bulkUpdateWafActiveRules' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRuleData $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function bulkUpdateWafActiveRulesRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $body = array_key_exists('body', $options) ? $options['body'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling bulkUpdateWafActiveRules' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling bulkUpdateWafActiveRules' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/bulk'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation createWafActiveRule - * - * Add a rule to a WAF as an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule waf_active_rule (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafActiveRuleCreationResponse - * @deprecated - */ - public function createWafActiveRule($options) - { - list($response) = $this->createWafActiveRuleWithHttpInfo($options); - return $response; - } - - /** - * Operation createWafActiveRuleWithHttpInfo - * - * Add a rule to a WAF as an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafActiveRuleCreationResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function createWafActiveRuleWithHttpInfo($options) - { - $request = $this->createWafActiveRuleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('POST' != 'GET' && 'POST' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('\Fastly\Model\WafActiveRuleCreationResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafActiveRuleCreationResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafActiveRuleCreationResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafActiveRuleCreationResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createWafActiveRuleAsync - * - * Add a rule to a WAF as an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafActiveRuleAsync($options) - { - return $this->createWafActiveRuleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createWafActiveRuleAsyncWithHttpInfo - * - * Add a rule to a WAF as an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafActiveRuleAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafActiveRuleCreationResponse'; - $request = $this->createWafActiveRuleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createWafActiveRule' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function createWafActiveRuleRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $waf_active_rule = array_key_exists('waf_active_rule', $options) ? $options['waf_active_rule'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling createWafActiveRule' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling createWafActiveRule' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json', 'application/vnd.api+json; ext=bulk'] - ); - } - - // for model (json/xml) - if (isset($waf_active_rule)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_active_rule)); - } else { - $httpBody = $waf_active_rule; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation createWafActiveRulesTag - * - * Create active rules by tag - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_tag_name Name of the tag. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule waf_active_rule (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - * @deprecated - */ - public function createWafActiveRulesTag($options) - { - $this->createWafActiveRulesTagWithHttpInfo($options); - } - - /** - * Operation createWafActiveRulesTagWithHttpInfo - * - * Create active rules by tag - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_tag_name Name of the tag. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function createWafActiveRulesTagWithHttpInfo($options) - { - $request = $this->createWafActiveRulesTagRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('POST' != 'GET' && 'POST' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation createWafActiveRulesTagAsync - * - * Create active rules by tag - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_tag_name Name of the tag. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafActiveRulesTagAsync($options) - { - return $this->createWafActiveRulesTagAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createWafActiveRulesTagAsyncWithHttpInfo - * - * Create active rules by tag - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_tag_name Name of the tag. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafActiveRulesTagAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->createWafActiveRulesTagRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createWafActiveRulesTag' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_tag_name Name of the tag. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function createWafActiveRulesTagRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $waf_tag_name = array_key_exists('waf_tag_name', $options) ? $options['waf_tag_name'] : null; - $waf_active_rule = array_key_exists('waf_active_rule', $options) ? $options['waf_active_rule'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling createWafActiveRulesTag' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling createWafActiveRulesTag' - ); - } - // verify the required parameter 'waf_tag_name' is set - if ($waf_tag_name === null || (is_array($waf_tag_name) && count($waf_tag_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_tag_name when calling createWafActiveRulesTag' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/tags/{waf_tag_name}/active-rules'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - // path params - if ($waf_tag_name !== null) { - $resourcePath = str_replace( - '{' . 'waf_tag_name' . '}', - ObjectSerializer::toPathValue($waf_tag_name), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($waf_active_rule)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_active_rule)); - } else { - $httpBody = $waf_active_rule; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteWafActiveRule - * - * Delete an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - * @deprecated - */ - public function deleteWafActiveRule($options) - { - $this->deleteWafActiveRuleWithHttpInfo($options); - } - - /** - * Operation deleteWafActiveRuleWithHttpInfo - * - * Delete an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function deleteWafActiveRuleWithHttpInfo($options) - { - $request = $this->deleteWafActiveRuleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation deleteWafActiveRuleAsync - * - * Delete an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function deleteWafActiveRuleAsync($options) - { - return $this->deleteWafActiveRuleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteWafActiveRuleAsyncWithHttpInfo - * - * Delete an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function deleteWafActiveRuleAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->deleteWafActiveRuleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteWafActiveRule' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function deleteWafActiveRuleRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling deleteWafActiveRule' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling deleteWafActiveRule' - ); - } - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling deleteWafActiveRule' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/{waf_rule_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getWafActiveRule - * - * Get an active WAF rule object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafActiveRuleResponse - * @deprecated - */ - public function getWafActiveRule($options) - { - list($response) = $this->getWafActiveRuleWithHttpInfo($options); - return $response; - } - - /** - * Operation getWafActiveRuleWithHttpInfo - * - * Get an active WAF rule object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafActiveRuleResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getWafActiveRuleWithHttpInfo($options) - { - $request = $this->getWafActiveRuleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafActiveRuleResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafActiveRuleResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafActiveRuleResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafActiveRuleResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getWafActiveRuleAsync - * - * Get an active WAF rule object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafActiveRuleAsync($options) - { - return $this->getWafActiveRuleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getWafActiveRuleAsyncWithHttpInfo - * - * Get an active WAF rule object - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafActiveRuleAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafActiveRuleResponse'; - $request = $this->getWafActiveRuleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getWafActiveRule' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getWafActiveRuleRequest($options) - { - // unbox the parameters from the associative array - $include = array_key_exists('include', $options) ? $options['include'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafActiveRule' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling getWafActiveRule' - ); - } - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getWafActiveRule' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/{waf_rule_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listWafActiveRules - * - * List active rules on a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_status Limit results to active rules with the specified status. (optional) - * @param string $filter_waf_rule_revision_message Limit results to active rules with the specified message. (optional) - * @param string $filter_waf_rule_revision_modsec_rule_id Limit results to active rules that represent the specified ModSecurity modsec_rule_id. (optional) - * @param string $filter_outdated Limit results to active rules referencing an outdated rule revision. (optional) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafActiveRulesResponse - * @deprecated - */ - public function listWafActiveRules($options) - { - list($response) = $this->listWafActiveRulesWithHttpInfo($options); - return $response; - } - - /** - * Operation listWafActiveRulesWithHttpInfo - * - * List active rules on a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_status Limit results to active rules with the specified status. (optional) - * @param string $filter_waf_rule_revision_message Limit results to active rules with the specified message. (optional) - * @param string $filter_waf_rule_revision_modsec_rule_id Limit results to active rules that represent the specified ModSecurity modsec_rule_id. (optional) - * @param string $filter_outdated Limit results to active rules referencing an outdated rule revision. (optional) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafActiveRulesResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listWafActiveRulesWithHttpInfo($options) - { - $request = $this->listWafActiveRulesRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafActiveRulesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafActiveRulesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafActiveRulesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafActiveRulesResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listWafActiveRulesAsync - * - * List active rules on a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_status Limit results to active rules with the specified status. (optional) - * @param string $filter_waf_rule_revision_message Limit results to active rules with the specified message. (optional) - * @param string $filter_waf_rule_revision_modsec_rule_id Limit results to active rules that represent the specified ModSecurity modsec_rule_id. (optional) - * @param string $filter_outdated Limit results to active rules referencing an outdated rule revision. (optional) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafActiveRulesAsync($options) - { - return $this->listWafActiveRulesAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listWafActiveRulesAsyncWithHttpInfo - * - * List active rules on a WAF - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_status Limit results to active rules with the specified status. (optional) - * @param string $filter_waf_rule_revision_message Limit results to active rules with the specified message. (optional) - * @param string $filter_waf_rule_revision_modsec_rule_id Limit results to active rules that represent the specified ModSecurity modsec_rule_id. (optional) - * @param string $filter_outdated Limit results to active rules referencing an outdated rule revision. (optional) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafActiveRulesAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafActiveRulesResponse'; - $request = $this->listWafActiveRulesRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listWafActiveRules' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_status Limit results to active rules with the specified status. (optional) - * @param string $filter_waf_rule_revision_message Limit results to active rules with the specified message. (optional) - * @param string $filter_waf_rule_revision_modsec_rule_id Limit results to active rules that represent the specified ModSecurity modsec_rule_id. (optional) - * @param string $filter_outdated Limit results to active rules referencing an outdated rule revision. (optional) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule_revision` and `waf_firewall_version`. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listWafActiveRulesRequest($options) - { - // unbox the parameters from the associative array - $filter_status = array_key_exists('filter_status', $options) ? $options['filter_status'] : null; - $filter_waf_rule_revision_message = array_key_exists('filter_waf_rule_revision_message', $options) ? $options['filter_waf_rule_revision_message'] : null; - $filter_waf_rule_revision_modsec_rule_id = array_key_exists('filter_waf_rule_revision_modsec_rule_id', $options) ? $options['filter_waf_rule_revision_modsec_rule_id'] : null; - $filter_outdated = array_key_exists('filter_outdated', $options) ? $options['filter_outdated'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafActiveRulesApi.listWafActiveRules, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafActiveRulesApi.listWafActiveRules, must be bigger than or equal to 1.'); - } - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling listWafActiveRules' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling listWafActiveRules' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter_status !== null) { - if('form' === 'form' && is_array($filter_status)) { - foreach($filter_status as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[status]'] = ObjectSerializer::toString($filter_status); - } - } - // query params - if ($filter_waf_rule_revision_message !== null) { - if('form' === 'form' && is_array($filter_waf_rule_revision_message)) { - foreach($filter_waf_rule_revision_message as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[waf_rule_revision][message]'] = ObjectSerializer::toString($filter_waf_rule_revision_message); - } - } - // query params - if ($filter_waf_rule_revision_modsec_rule_id !== null) { - if('form' === 'form' && is_array($filter_waf_rule_revision_modsec_rule_id)) { - foreach($filter_waf_rule_revision_modsec_rule_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[waf_rule_revision][modsec_rule_id]'] = ObjectSerializer::toString($filter_waf_rule_revision_modsec_rule_id); - } - } - // query params - if ($filter_outdated !== null) { - if('form' === 'form' && is_array($filter_outdated)) { - foreach($filter_outdated as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[outdated]'] = ObjectSerializer::toString($filter_outdated); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateWafActiveRule - * - * Update an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule waf_active_rule (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafActiveRuleResponse - * @deprecated - */ - public function updateWafActiveRule($options) - { - list($response) = $this->updateWafActiveRuleWithHttpInfo($options); - return $response; - } - - /** - * Operation updateWafActiveRuleWithHttpInfo - * - * Update an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafActiveRuleResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function updateWafActiveRuleWithHttpInfo($options) - { - $request = $this->updateWafActiveRuleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafActiveRuleResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafActiveRuleResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafActiveRuleResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafActiveRuleResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateWafActiveRuleAsync - * - * Update an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafActiveRuleAsync($options) - { - return $this->updateWafActiveRuleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateWafActiveRuleAsyncWithHttpInfo - * - * Update an active rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafActiveRuleAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafActiveRuleResponse'; - $request = $this->updateWafActiveRuleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateWafActiveRule' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $version_id Integer identifying a service version. (required) - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param \Fastly\Model\WafActiveRule $waf_active_rule (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function updateWafActiveRuleRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $version_id = array_key_exists('version_id', $options) ? $options['version_id'] : null; - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - $waf_active_rule = array_key_exists('waf_active_rule', $options) ? $options['waf_active_rule'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafActiveRule' - ); - } - // verify the required parameter 'version_id' is set - if ($version_id === null || (is_array($version_id) && count($version_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $version_id when calling updateWafActiveRule' - ); - } - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling updateWafActiveRule' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{version_id}/active-rules/{waf_rule_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($version_id !== null) { - $resourcePath = str_replace( - '{' . 'version_id' . '}', - ObjectSerializer::toPathValue($version_id), - $resourcePath - ); - } - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($waf_active_rule)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_active_rule)); - } else { - $httpBody = $waf_active_rule; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/WafFirewallVersionsApi.php b/lib/Api/WafFirewallVersionsApi.php deleted file mode 100644 index ba5b69d2..00000000 --- a/lib/Api/WafFirewallVersionsApi.php +++ /dev/null @@ -1,2271 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation cloneWafFirewallVersion - * - * Clone a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallVersionResponse - * @deprecated - */ - public function cloneWafFirewallVersion($options) - { - list($response) = $this->cloneWafFirewallVersionWithHttpInfo($options); - return $response; - } - - /** - * Operation cloneWafFirewallVersionWithHttpInfo - * - * Clone a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallVersionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function cloneWafFirewallVersionWithHttpInfo($options) - { - $request = $this->cloneWafFirewallVersionRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PUT' != 'GET' && 'PUT' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallVersionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallVersionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallVersionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation cloneWafFirewallVersionAsync - * - * Clone a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function cloneWafFirewallVersionAsync($options) - { - return $this->cloneWafFirewallVersionAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation cloneWafFirewallVersionAsyncWithHttpInfo - * - * Clone a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function cloneWafFirewallVersionAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - $request = $this->cloneWafFirewallVersionRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'cloneWafFirewallVersion' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function cloneWafFirewallVersionRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling cloneWafFirewallVersion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling cloneWafFirewallVersion' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/clone'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PUT', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation createWafFirewallVersion - * - * Create a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version waf_firewall_version (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallVersionResponse - * @deprecated - */ - public function createWafFirewallVersion($options) - { - list($response) = $this->createWafFirewallVersionWithHttpInfo($options); - return $response; - } - - /** - * Operation createWafFirewallVersionWithHttpInfo - * - * Create a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallVersionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function createWafFirewallVersionWithHttpInfo($options) - { - $request = $this->createWafFirewallVersionRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('POST' != 'GET' && 'POST' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('\Fastly\Model\WafFirewallVersionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallVersionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallVersionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createWafFirewallVersionAsync - * - * Create a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafFirewallVersionAsync($options) - { - return $this->createWafFirewallVersionAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createWafFirewallVersionAsyncWithHttpInfo - * - * Create a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafFirewallVersionAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - $request = $this->createWafFirewallVersionRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createWafFirewallVersion' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function createWafFirewallVersionRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $waf_firewall_version = array_key_exists('waf_firewall_version', $options) ? $options['waf_firewall_version'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling createWafFirewallVersion' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($waf_firewall_version)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_firewall_version)); - } else { - $httpBody = $waf_firewall_version; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deployActivateWafFirewallVersion - * - * Deploy or activate a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - * @deprecated - */ - public function deployActivateWafFirewallVersion($options) - { - list($response) = $this->deployActivateWafFirewallVersionWithHttpInfo($options); - return $response; - } - - /** - * Operation deployActivateWafFirewallVersionWithHttpInfo - * - * Deploy or activate a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function deployActivateWafFirewallVersionWithHttpInfo($options) - { - $request = $this->deployActivateWafFirewallVersionRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PUT' != 'GET' && 'PUT' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 202: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 202: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deployActivateWafFirewallVersionAsync - * - * Deploy or activate a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function deployActivateWafFirewallVersionAsync($options) - { - return $this->deployActivateWafFirewallVersionAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deployActivateWafFirewallVersionAsyncWithHttpInfo - * - * Deploy or activate a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function deployActivateWafFirewallVersionAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->deployActivateWafFirewallVersionRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deployActivateWafFirewallVersion' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function deployActivateWafFirewallVersionRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling deployActivateWafFirewallVersion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling deployActivateWafFirewallVersion' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/activate'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PUT', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getWafFirewallVersion - * - * Get a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallVersionResponse - * @deprecated - */ - public function getWafFirewallVersion($options) - { - list($response) = $this->getWafFirewallVersionWithHttpInfo($options); - return $response; - } - - /** - * Operation getWafFirewallVersionWithHttpInfo - * - * Get a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallVersionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getWafFirewallVersionWithHttpInfo($options) - { - $request = $this->getWafFirewallVersionRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallVersionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallVersionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallVersionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getWafFirewallVersionAsync - * - * Get a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafFirewallVersionAsync($options) - { - return $this->getWafFirewallVersionAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getWafFirewallVersionAsyncWithHttpInfo - * - * Get a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafFirewallVersionAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - $request = $this->getWafFirewallVersionRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getWafFirewallVersion' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_firewall` and `waf_active_rules`. (optional) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getWafFirewallVersionRequest($options) - { - // unbox the parameters from the associative array - $include = array_key_exists('include', $options) ? $options['include'] : null; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafFirewallVersion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling getWafFirewallVersion' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listWafFirewallVersions - * - * List firewall versions - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallVersionsResponse - * @deprecated - */ - public function listWafFirewallVersions($options) - { - list($response) = $this->listWafFirewallVersionsWithHttpInfo($options); - return $response; - } - - /** - * Operation listWafFirewallVersionsWithHttpInfo - * - * List firewall versions - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallVersionsResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listWafFirewallVersionsWithHttpInfo($options) - { - $request = $this->listWafFirewallVersionsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallVersionsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallVersionsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallVersionsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallVersionsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listWafFirewallVersionsAsync - * - * List firewall versions - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafFirewallVersionsAsync($options) - { - return $this->listWafFirewallVersionsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listWafFirewallVersionsAsyncWithHttpInfo - * - * List firewall versions - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafFirewallVersionsAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallVersionsResponse'; - $request = $this->listWafFirewallVersionsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listWafFirewallVersions' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $include Include relationships. Optional. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listWafFirewallVersionsRequest($options) - { - // unbox the parameters from the associative array - $include = array_key_exists('include', $options) ? $options['include'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafFirewallVersionsApi.listWafFirewallVersions, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafFirewallVersionsApi.listWafFirewallVersions, must be bigger than or equal to 1.'); - } - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling listWafFirewallVersions' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateWafFirewallVersion - * - * Update a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version waf_firewall_version (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallVersionResponse - * @deprecated - */ - public function updateWafFirewallVersion($options) - { - list($response) = $this->updateWafFirewallVersionWithHttpInfo($options); - return $response; - } - - /** - * Operation updateWafFirewallVersionWithHttpInfo - * - * Update a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallVersionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function updateWafFirewallVersionWithHttpInfo($options) - { - $request = $this->updateWafFirewallVersionRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallVersionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallVersionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallVersionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateWafFirewallVersionAsync - * - * Update a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallVersionAsync($options) - { - return $this->updateWafFirewallVersionAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateWafFirewallVersionAsyncWithHttpInfo - * - * Update a firewall version - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallVersionAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallVersionResponse'; - $request = $this->updateWafFirewallVersionRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateWafFirewallVersion' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param int $firewall_version_number Integer identifying a WAF firewall version. (required) - * @param \Fastly\Model\WafFirewallVersion $waf_firewall_version (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function updateWafFirewallVersionRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $firewall_version_number = array_key_exists('firewall_version_number', $options) ? $options['firewall_version_number'] : null; - $waf_firewall_version = array_key_exists('waf_firewall_version', $options) ? $options['waf_firewall_version'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafFirewallVersion' - ); - } - // verify the required parameter 'firewall_version_number' is set - if ($firewall_version_number === null || (is_array($firewall_version_number) && count($firewall_version_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_version_number when calling updateWafFirewallVersion' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - // path params - if ($firewall_version_number !== null) { - $resourcePath = str_replace( - '{' . 'firewall_version_number' . '}', - ObjectSerializer::toPathValue($firewall_version_number), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($waf_firewall_version)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_firewall_version)); - } else { - $httpBody = $waf_firewall_version; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/WafFirewallsApi.php b/lib/Api/WafFirewallsApi.php deleted file mode 100644 index d744ac03..00000000 --- a/lib/Api/WafFirewallsApi.php +++ /dev/null @@ -1,1842 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation createWafFirewall - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param \Fastly\Model\WafFirewall $waf_firewall waf_firewall (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallResponse - * @deprecated - */ - public function createWafFirewall($options) - { - list($response) = $this->createWafFirewallWithHttpInfo($options); - return $response; - } - - /** - * Operation createWafFirewallWithHttpInfo - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function createWafFirewallWithHttpInfo($options) - { - $request = $this->createWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('POST' != 'GET' && 'POST' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('\Fastly\Model\WafFirewallResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createWafFirewallAsync - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafFirewallAsync($options) - { - return $this->createWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createWafFirewallAsyncWithHttpInfo - * - * Create a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function createWafFirewallAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallResponse'; - $request = $this->createWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function createWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $waf_firewall = array_key_exists('waf_firewall', $options) ? $options['waf_firewall'] : null; - - - $resourcePath = '/waf/firewalls'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($waf_firewall)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_firewall)); - } else { - $httpBody = $waf_firewall; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteWafFirewall - * - * Delete a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall waf_firewall (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - * @deprecated - */ - public function deleteWafFirewall($options) - { - $this->deleteWafFirewallWithHttpInfo($options); - } - - /** - * Operation deleteWafFirewallWithHttpInfo - * - * Delete a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function deleteWafFirewallWithHttpInfo($options) - { - $request = $this->deleteWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation deleteWafFirewallAsync - * - * Delete a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function deleteWafFirewallAsync($options) - { - return $this->deleteWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteWafFirewallAsyncWithHttpInfo - * - * Delete a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function deleteWafFirewallAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->deleteWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function deleteWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $waf_firewall = array_key_exists('waf_firewall', $options) ? $options['waf_firewall'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling deleteWafFirewall' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($waf_firewall)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_firewall)); - } else { - $httpBody = $waf_firewall; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getWafFirewall - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallResponse - * @deprecated - */ - public function getWafFirewall($options) - { - list($response) = $this->getWafFirewallWithHttpInfo($options); - return $response; - } - - /** - * Operation getWafFirewallWithHttpInfo - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getWafFirewallWithHttpInfo($options) - { - $request = $this->getWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getWafFirewallAsync - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafFirewallAsync($options) - { - return $this->getWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getWafFirewallAsyncWithHttpInfo - * - * Get a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafFirewallAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallResponse'; - $request = $this->getWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $filter_service_version_number = array_key_exists('filter_service_version_number', $options) ? $options['filter_service_version_number'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : 'waf_firewall_versions'; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling getWafFirewall' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter_service_version_number !== null) { - if('form' === 'form' && is_array($filter_service_version_number)) { - foreach($filter_service_version_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[service_version_number]'] = ObjectSerializer::toString($filter_service_version_number); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listWafFirewalls - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $filter_service_id Limit the results returned to a specific service. (optional) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallsResponse - * @deprecated - */ - public function listWafFirewalls($options) - { - list($response) = $this->listWafFirewallsWithHttpInfo($options); - return $response; - } - - /** - * Operation listWafFirewallsWithHttpInfo - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $filter_service_id Limit the results returned to a specific service. (optional) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallsResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listWafFirewallsWithHttpInfo($options) - { - $request = $this->listWafFirewallsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listWafFirewallsAsync - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $filter_service_id Limit the results returned to a specific service. (optional) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafFirewallsAsync($options) - { - return $this->listWafFirewallsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listWafFirewallsAsyncWithHttpInfo - * - * List firewalls - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $filter_service_id Limit the results returned to a specific service. (optional) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafFirewallsAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallsResponse'; - $request = $this->listWafFirewallsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listWafFirewalls' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $filter_service_id Limit the results returned to a specific service. (optional) - * @param string $filter_service_version_number Limit the results returned to a specific service version. (optional) - * @param string $include Include related objects. Optional. (optional, default to 'waf_firewall_versions') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listWafFirewallsRequest($options) - { - // unbox the parameters from the associative array - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $filter_service_id = array_key_exists('filter_service_id', $options) ? $options['filter_service_id'] : null; - $filter_service_version_number = array_key_exists('filter_service_version_number', $options) ? $options['filter_service_version_number'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : 'waf_firewall_versions'; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafFirewallsApi.listWafFirewalls, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafFirewallsApi.listWafFirewalls, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/waf/firewalls'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($filter_service_id !== null) { - if('form' === 'form' && is_array($filter_service_id)) { - foreach($filter_service_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[service_id]'] = ObjectSerializer::toString($filter_service_id); - } - } - // query params - if ($filter_service_version_number !== null) { - if('form' === 'form' && is_array($filter_service_version_number)) { - foreach($filter_service_version_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[service_version_number]'] = ObjectSerializer::toString($filter_service_version_number); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateWafFirewall - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall waf_firewall (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafFirewallResponse - * @deprecated - */ - public function updateWafFirewall($options) - { - list($response) = $this->updateWafFirewallWithHttpInfo($options); - return $response; - } - - /** - * Operation updateWafFirewallWithHttpInfo - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafFirewallResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function updateWafFirewallWithHttpInfo($options) - { - $request = $this->updateWafFirewallRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafFirewallResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafFirewallResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafFirewallResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafFirewallResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateWafFirewallAsync - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallAsync($options) - { - return $this->updateWafFirewallAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateWafFirewallAsyncWithHttpInfo - * - * Update a firewall - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function updateWafFirewallAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafFirewallResponse'; - $request = $this->updateWafFirewallRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateWafFirewall' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $firewall_id Alphanumeric string identifying a WAF Firewall. (required) - * @param \Fastly\Model\WafFirewall $waf_firewall (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function updateWafFirewallRequest($options) - { - // unbox the parameters from the associative array - $firewall_id = array_key_exists('firewall_id', $options) ? $options['firewall_id'] : null; - $waf_firewall = array_key_exists('waf_firewall', $options) ? $options['waf_firewall'] : null; - - // verify the required parameter 'firewall_id' is set - if ($firewall_id === null || (is_array($firewall_id) && count($firewall_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $firewall_id when calling updateWafFirewall' - ); - } - - $resourcePath = '/waf/firewalls/{firewall_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($firewall_id !== null) { - $resourcePath = str_replace( - '{' . 'firewall_id' . '}', - ObjectSerializer::toPathValue($firewall_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - ['application/vnd.api+json'] - ); - } - - // for model (json/xml) - if (isset($waf_firewall)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($waf_firewall)); - } else { - $httpBody = $waf_firewall; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/WafRuleRevisionsApi.php b/lib/Api/WafRuleRevisionsApi.php deleted file mode 100644 index 8595b8e2..00000000 --- a/lib/Api/WafRuleRevisionsApi.php +++ /dev/null @@ -1,879 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getWafRuleRevision - * - * Get a revision of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $waf_rule_revision_number Revision number. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafRuleRevisionResponse - * @deprecated - */ - public function getWafRuleRevision($options) - { - list($response) = $this->getWafRuleRevisionWithHttpInfo($options); - return $response; - } - - /** - * Operation getWafRuleRevisionWithHttpInfo - * - * Get a revision of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $waf_rule_revision_number Revision number. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafRuleRevisionResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getWafRuleRevisionWithHttpInfo($options) - { - $request = $this->getWafRuleRevisionRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafRuleRevisionResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafRuleRevisionResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafRuleRevisionResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafRuleRevisionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getWafRuleRevisionAsync - * - * Get a revision of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $waf_rule_revision_number Revision number. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafRuleRevisionAsync($options) - { - return $this->getWafRuleRevisionAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getWafRuleRevisionAsyncWithHttpInfo - * - * Get a revision of a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $waf_rule_revision_number Revision number. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafRuleRevisionAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafRuleRevisionResponse'; - $request = $this->getWafRuleRevisionRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getWafRuleRevision' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $waf_rule_revision_number Revision number. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_rule`, `vcl`, and `source`. The `vcl` and `source` relationships show the WAF VCL and corresponding ModSecurity source. These fields are blank unless the relationship is included. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getWafRuleRevisionRequest($options) - { - // unbox the parameters from the associative array - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - $waf_rule_revision_number = array_key_exists('waf_rule_revision_number', $options) ? $options['waf_rule_revision_number'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getWafRuleRevision' - ); - } - // verify the required parameter 'waf_rule_revision_number' is set - if ($waf_rule_revision_number === null || (is_array($waf_rule_revision_number) && count($waf_rule_revision_number) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_revision_number when calling getWafRuleRevision' - ); - } - - $resourcePath = '/waf/rules/{waf_rule_id}/revisions/{waf_rule_revision_number}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - // path params - if ($waf_rule_revision_number !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_revision_number' . '}', - ObjectSerializer::toPathValue($waf_rule_revision_number), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listWafRuleRevisions - * - * List revisions for a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rule') - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafRuleRevisionsResponse - * @deprecated - */ - public function listWafRuleRevisions($options) - { - list($response) = $this->listWafRuleRevisionsWithHttpInfo($options); - return $response; - } - - /** - * Operation listWafRuleRevisionsWithHttpInfo - * - * List revisions for a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rule') - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafRuleRevisionsResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listWafRuleRevisionsWithHttpInfo($options) - { - $request = $this->listWafRuleRevisionsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafRuleRevisionsResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafRuleRevisionsResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafRuleRevisionsResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafRuleRevisionsResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listWafRuleRevisionsAsync - * - * List revisions for a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rule') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafRuleRevisionsAsync($options) - { - return $this->listWafRuleRevisionsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listWafRuleRevisionsAsyncWithHttpInfo - * - * List revisions for a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rule') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafRuleRevisionsAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafRuleRevisionsResponse'; - $request = $this->listWafRuleRevisionsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listWafRuleRevisions' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional. (optional, default to 'waf_rule') - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listWafRuleRevisionsRequest($options) - { - // unbox the parameters from the associative array - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : 'waf_rule'; - - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling listWafRuleRevisions' - ); - } - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafRuleRevisionsApi.listWafRuleRevisions, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafRuleRevisionsApi.listWafRuleRevisions, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/waf/rules/{waf_rule_id}/revisions'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/WafRulesApi.php b/lib/Api/WafRulesApi.php deleted file mode 100644 index f4059d29..00000000 --- a/lib/Api/WafRulesApi.php +++ /dev/null @@ -1,907 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation getWafRule - * - * Get a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafRuleResponse - * @deprecated - */ - public function getWafRule($options) - { - list($response) = $this->getWafRuleWithHttpInfo($options); - return $response; - } - - /** - * Operation getWafRuleWithHttpInfo - * - * Get a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafRuleResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function getWafRuleWithHttpInfo($options) - { - $request = $this->getWafRuleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafRuleResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafRuleResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafRuleResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafRuleResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getWafRuleAsync - * - * Get a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafRuleAsync($options) - { - return $this->getWafRuleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getWafRuleAsyncWithHttpInfo - * - * Get a rule - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function getWafRuleAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafRuleResponse'; - $request = $this->getWafRuleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getWafRule' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $waf_rule_id Alphanumeric string identifying a WAF rule. (required) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function getWafRuleRequest($options) - { - // unbox the parameters from the associative array - $waf_rule_id = array_key_exists('waf_rule_id', $options) ? $options['waf_rule_id'] : null; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - // verify the required parameter 'waf_rule_id' is set - if ($waf_rule_id === null || (is_array($waf_rule_id) && count($waf_rule_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $waf_rule_id when calling getWafRule' - ); - } - - $resourcePath = '/waf/rules/{waf_rule_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - // path params - if ($waf_rule_id !== null) { - $resourcePath = str_replace( - '{' . 'waf_rule_id' . '}', - ObjectSerializer::toPathValue($waf_rule_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listWafRules - * - * List available WAF rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_modsec_rule_id Limit the returned rules to a specific ModSecurity rule ID. (optional) - * @param string $filter_waf_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_waf_rule_revisions_source Limit the returned rules to a set linked to a source. (optional) - * @param string $filter_waf_firewall_id_not_match Limit the returned rules to a set not included in the active firewall version for a firewall. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Fastly\Model\WafRulesResponse - * @deprecated - */ - public function listWafRules($options) - { - list($response) = $this->listWafRulesWithHttpInfo($options); - return $response; - } - - /** - * Operation listWafRulesWithHttpInfo - * - * List available WAF rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_modsec_rule_id Limit the returned rules to a specific ModSecurity rule ID. (optional) - * @param string $filter_waf_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_waf_rule_revisions_source Limit the returned rules to a set linked to a source. (optional) - * @param string $filter_waf_firewall_id_not_match Limit the returned rules to a set not included in the active firewall version for a firewall. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Fastly\Model\WafRulesResponse, HTTP status code, HTTP response headers (array of strings) - * @deprecated - */ - public function listWafRulesWithHttpInfo($options) - { - $request = $this->listWafRulesRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Fastly\Model\WafRulesResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\WafRulesResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Fastly\Model\WafRulesResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Fastly\Model\WafRulesResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listWafRulesAsync - * - * List available WAF rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_modsec_rule_id Limit the returned rules to a specific ModSecurity rule ID. (optional) - * @param string $filter_waf_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_waf_rule_revisions_source Limit the returned rules to a set linked to a source. (optional) - * @param string $filter_waf_firewall_id_not_match Limit the returned rules to a set not included in the active firewall version for a firewall. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafRulesAsync($options) - { - return $this->listWafRulesAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listWafRulesAsyncWithHttpInfo - * - * List available WAF rules - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_modsec_rule_id Limit the returned rules to a specific ModSecurity rule ID. (optional) - * @param string $filter_waf_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_waf_rule_revisions_source Limit the returned rules to a set linked to a source. (optional) - * @param string $filter_waf_firewall_id_not_match Limit the returned rules to a set not included in the active firewall version for a firewall. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - * @deprecated - */ - public function listWafRulesAsyncWithHttpInfo($options) - { - $returnType = '\Fastly\Model\WafRulesResponse'; - $request = $this->listWafRulesRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listWafRules' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $filter_modsec_rule_id Limit the returned rules to a specific ModSecurity rule ID. (optional) - * @param string $filter_waf_tags_name Limit the returned rules to a set linked to a tag by name. (optional) - * @param string $filter_waf_rule_revisions_source Limit the returned rules to a set linked to a source. (optional) - * @param string $filter_waf_firewall_id_not_match Limit the returned rules to a set not included in the active firewall version for a firewall. (optional) - * @param int $page_number Current page. (optional) - * @param int $page_size Number of records per page. (optional, default to 20) - * @param string $include Include relationships. Optional, comma-separated values. Permitted values: `waf_tags` and `waf_rule_revisions`. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - * @deprecated - */ - public function listWafRulesRequest($options) - { - // unbox the parameters from the associative array - $filter_modsec_rule_id = array_key_exists('filter_modsec_rule_id', $options) ? $options['filter_modsec_rule_id'] : null; - $filter_waf_tags_name = array_key_exists('filter_waf_tags_name', $options) ? $options['filter_waf_tags_name'] : null; - $filter_waf_rule_revisions_source = array_key_exists('filter_waf_rule_revisions_source', $options) ? $options['filter_waf_rule_revisions_source'] : null; - $filter_waf_firewall_id_not_match = array_key_exists('filter_waf_firewall_id_not_match', $options) ? $options['filter_waf_firewall_id_not_match'] : null; - $page_number = array_key_exists('page_number', $options) ? $options['page_number'] : null; - $page_size = array_key_exists('page_size', $options) ? $options['page_size'] : 20; - $include = array_key_exists('include', $options) ? $options['include'] : null; - - if ($page_size !== null && $page_size > 100) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafRulesApi.listWafRules, must be smaller than or equal to 100.'); - } - if ($page_size !== null && $page_size < 1) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling WafRulesApi.listWafRules, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/waf/rules'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($filter_modsec_rule_id !== null) { - if('form' === 'form' && is_array($filter_modsec_rule_id)) { - foreach($filter_modsec_rule_id as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[modsec_rule_id]'] = ObjectSerializer::toString($filter_modsec_rule_id); - } - } - // query params - if ($filter_waf_tags_name !== null) { - if('form' === 'form' && is_array($filter_waf_tags_name)) { - foreach($filter_waf_tags_name as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[waf_tags][name]'] = ObjectSerializer::toString($filter_waf_tags_name); - } - } - // query params - if ($filter_waf_rule_revisions_source !== null) { - if('form' === 'form' && is_array($filter_waf_rule_revisions_source)) { - foreach($filter_waf_rule_revisions_source as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[waf_rule_revisions][source]'] = ObjectSerializer::toString($filter_waf_rule_revisions_source); - } - } - // query params - if ($filter_waf_firewall_id_not_match !== null) { - if('form' === 'form' && is_array($filter_waf_firewall_id_not_match)) { - foreach($filter_waf_firewall_id_not_match as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['filter[waf_firewall.id][not][match]'] = ObjectSerializer::toString($filter_waf_firewall_id_not_match); - } - } - // query params - if ($page_number !== null) { - if('form' === 'form' && is_array($page_number)) { - foreach($page_number as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[number]'] = ObjectSerializer::toString($page_number); - } - } - // query params - if ($page_size !== null) { - if('form' === 'form' && is_array($page_size)) { - foreach($page_size as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page[size]'] = ObjectSerializer::toString($page_size); - } - } - // query params - if ($include !== null) { - if('form' === 'form' && is_array($include)) { - foreach($include as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['include'] = ObjectSerializer::toString($include); - } - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/vnd.api+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/vnd.api+json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Configuration.php b/lib/Configuration.php index f767af6e..adb6ba27 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/8.0.0'; + protected $userAgent = 'fastly-php/9.0.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 8.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 9.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/Backend.php b/lib/Model/Backend.php index d65a7ed8..d4c03ed8 100644 --- a/lib/Model/Backend.php +++ b/lib/Model/Backend.php @@ -71,6 +71,7 @@ class Backend implements ModelInterface, ArrayAccess, \JsonSerializable 'name' => 'string', 'override_host' => 'string', 'port' => 'int', + 'prefer_ipv6' => 'bool', 'request_condition' => 'string', 'share_key' => 'string', 'shield' => 'string', @@ -116,6 +117,7 @@ class Backend implements ModelInterface, ArrayAccess, \JsonSerializable 'name' => null, 'override_host' => null, 'port' => null, + 'prefer_ipv6' => null, 'request_condition' => null, 'share_key' => null, 'shield' => null, @@ -180,6 +182,7 @@ public static function fastlyFormats() 'name' => 'name', 'override_host' => 'override_host', 'port' => 'port', + 'prefer_ipv6' => 'prefer_ipv6', 'request_condition' => 'request_condition', 'share_key' => 'share_key', 'shield' => 'shield', @@ -223,6 +226,7 @@ public static function fastlyFormats() 'name' => 'setName', 'override_host' => 'setOverrideHost', 'port' => 'setPort', + 'prefer_ipv6' => 'setPreferIpv6', 'request_condition' => 'setRequestCondition', 'share_key' => 'setShareKey', 'shield' => 'setShield', @@ -266,6 +270,7 @@ public static function fastlyFormats() 'name' => 'getName', 'override_host' => 'getOverrideHost', 'port' => 'getPort', + 'prefer_ipv6' => 'getPreferIpv6', 'request_condition' => 'getRequestCondition', 'share_key' => 'getShareKey', 'shield' => 'getShield', @@ -360,6 +365,7 @@ public function __construct(array $data = null) $this->container['name'] = $data['name'] ?? null; $this->container['override_host'] = $data['override_host'] ?? null; $this->container['port'] = $data['port'] ?? null; + $this->container['prefer_ipv6'] = $data['prefer_ipv6'] ?? null; $this->container['request_condition'] = $data['request_condition'] ?? null; $this->container['share_key'] = $data['share_key'] ?? null; $this->container['shield'] = $data['shield'] ?? null; @@ -839,6 +845,30 @@ public function setPort($port) return $this; } + /** + * Gets prefer_ipv6 + * + * @return bool|null + */ + public function getPreferIpv6() + { + return $this->container['prefer_ipv6']; + } + + /** + * Sets prefer_ipv6 + * + * @param bool|null $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. + * + * @return self + */ + public function setPreferIpv6($prefer_ipv6) + { + $this->container['prefer_ipv6'] = $prefer_ipv6; + + return $this; + } + /** * Gets request_condition * diff --git a/lib/Model/BackendResponse.php b/lib/Model/BackendResponse.php index 6a969730..b53d75d6 100644 --- a/lib/Model/BackendResponse.php +++ b/lib/Model/BackendResponse.php @@ -71,6 +71,7 @@ class BackendResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'name' => 'string', 'override_host' => 'string', 'port' => 'int', + 'prefer_ipv6' => 'bool', 'request_condition' => 'string', 'share_key' => 'string', 'shield' => 'string', @@ -122,6 +123,7 @@ class BackendResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'name' => null, 'override_host' => null, 'port' => null, + 'prefer_ipv6' => null, 'request_condition' => null, 'share_key' => null, 'shield' => null, @@ -192,6 +194,7 @@ public static function fastlyFormats() 'name' => 'name', 'override_host' => 'override_host', 'port' => 'port', + 'prefer_ipv6' => 'prefer_ipv6', 'request_condition' => 'request_condition', 'share_key' => 'share_key', 'shield' => 'shield', @@ -241,6 +244,7 @@ public static function fastlyFormats() 'name' => 'setName', 'override_host' => 'setOverrideHost', 'port' => 'setPort', + 'prefer_ipv6' => 'setPreferIpv6', 'request_condition' => 'setRequestCondition', 'share_key' => 'setShareKey', 'shield' => 'setShield', @@ -290,6 +294,7 @@ public static function fastlyFormats() 'name' => 'getName', 'override_host' => 'getOverrideHost', 'port' => 'getPort', + 'prefer_ipv6' => 'getPreferIpv6', 'request_condition' => 'getRequestCondition', 'share_key' => 'getShareKey', 'shield' => 'getShield', @@ -390,6 +395,7 @@ public function __construct(array $data = null) $this->container['name'] = $data['name'] ?? null; $this->container['override_host'] = $data['override_host'] ?? null; $this->container['port'] = $data['port'] ?? null; + $this->container['prefer_ipv6'] = $data['prefer_ipv6'] ?? null; $this->container['request_condition'] = $data['request_condition'] ?? null; $this->container['share_key'] = $data['share_key'] ?? null; $this->container['shield'] = $data['shield'] ?? null; @@ -875,6 +881,30 @@ public function setPort($port) return $this; } + /** + * Gets prefer_ipv6 + * + * @return bool|null + */ + public function getPreferIpv6() + { + return $this->container['prefer_ipv6']; + } + + /** + * Sets prefer_ipv6 + * + * @param bool|null $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. + * + * @return self + */ + public function setPreferIpv6($prefer_ipv6) + { + $this->container['prefer_ipv6'] = $prefer_ipv6; + + return $this; + } + /** * Gets request_condition * diff --git a/lib/Model/WafTagsResponse.php b/lib/Model/BotManagementResponseBodyGetAllServices.php similarity index 69% rename from lib/Model/WafTagsResponse.php rename to lib/Model/BotManagementResponseBodyGetAllServices.php index adf26a22..415a6dba 100644 --- a/lib/Model/WafTagsResponse.php +++ b/lib/Model/BotManagementResponseBodyGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafTagsResponseDataItem[]', - 'included' => '\Fastly\Model\WafRule[]' + 'product' => '\Fastly\Model\BotManagementResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\BotManagementResponseLinksGetAllServicesLinks' ]; /** @@ -67,10 +67,10 @@ class WafTagsResponse implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null ]; /** @@ -100,10 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' ]; /** @@ -112,10 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' ]; /** @@ -124,10 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' ]; /** @@ -187,10 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -218,97 +218,97 @@ public function valid() /** - * Gets links + * Gets product * - * @return \Fastly\Model\PaginationLinks|null + * @return \Fastly\Model\BotManagementResponseProductProduct|null */ - public function getLinks() + public function getProduct() { - return $this->container['links']; + return $this->container['product']; } /** - * Sets links + * Sets product * - * @param \Fastly\Model\PaginationLinks|null $links links + * @param \Fastly\Model\BotManagementResponseProductProduct|null $product product * * @return self */ - public function setLinks($links) + public function setProduct($product) { - $this->container['links'] = $links; + $this->container['product'] = $product; return $this; } /** - * Gets meta + * Gets customer * - * @return \Fastly\Model\PaginationMeta|null + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null */ - public function getMeta() + public function getCustomer() { - return $this->container['meta']; + return $this->container['customer']; } /** - * Sets meta + * Sets customer * - * @param \Fastly\Model\PaginationMeta|null $meta meta + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer * * @return self */ - public function setMeta($meta) + public function setCustomer($customer) { - $this->container['meta'] = $meta; + $this->container['customer'] = $customer; return $this; } /** - * Gets data + * Gets services * - * @return \Fastly\Model\WafTagsResponseDataItem[]|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\WafTagsResponseDataItem[]|null $data data + * @param string[]|null $services A list of services with Bot Management enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } /** - * Gets included + * Gets _links * - * @return \Fastly\Model\WafRule[]|null + * @return \Fastly\Model\BotManagementResponseLinksGetAllServicesLinks|null */ - public function getIncluded() + public function getLinks() { - return $this->container['included']; + return $this->container['_links']; } /** - * Sets included + * Sets _links * - * @param \Fastly\Model\WafRule[]|null $included included + * @param \Fastly\Model\BotManagementResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setIncluded($included) + public function setLinks($_links) { - $this->container['included'] = $included; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/BotManagementResponseCustomer.php b/lib/Model/BotManagementResponseCustomer.php new file mode 100644 index 00000000..76b3f080 --- /dev/null +++ b/lib/Model/BotManagementResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipMemberWafRule.php b/lib/Model/BotManagementResponseCustomerCustomer.php similarity index 86% rename from lib/Model/RelationshipMemberWafRule.php rename to lib/Model/BotManagementResponseCustomerCustomer.php index e53ad26b..9034fc3e 100644 --- a/lib/Model/RelationshipMemberWafRule.php +++ b/lib/Model/BotManagementResponseCustomerCustomer.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeWafRule', - 'id' => 'string' + 'id' => 'string', + 'object' => 'string' ]; /** @@ -65,8 +65,8 @@ class RelationshipMemberWafRule implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, - 'id' => null + 'id' => null, + 'object' => null ]; /** @@ -96,8 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id' + 'id' => 'id', + 'object' => 'object' ]; /** @@ -106,8 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId' + 'id' => 'setId', + 'object' => 'setObject' ]; /** @@ -116,8 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId' + 'id' => 'getId', + 'object' => 'getObject' ]; /** @@ -177,8 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; } /** @@ -206,49 +206,49 @@ public function valid() /** - * Gets type + * Gets id * - * @return \Fastly\Model\TypeWafRule|null + * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param \Fastly\Model\TypeWafRule|null $type type + * @param string|null $id Customer identifier * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets object * * @return string|null */ - public function getId() + public function getObject() { - return $this->container['id']; + return $this->container['object']; } /** - * Sets id + * Sets object * - * @param string|null $id id + * @param string|null $object Name of the object * * @return self */ - public function setId($id) + public function setObject($object) { - $this->container['id'] = $id; + $this->container['object'] = $object; return $this; } diff --git a/lib/Model/RelationshipWafRule.php b/lib/Model/BotManagementResponseEnabledServices.php similarity index 87% rename from lib/Model/RelationshipWafRule.php rename to lib/Model/BotManagementResponseEnabledServices.php index a99e9a2a..53da678e 100644 --- a/lib/Model/RelationshipWafRule.php +++ b/lib/Model/BotManagementResponseEnabledServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipWafRuleWafRule' + 'services' => 'string[]' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafRule implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $fastlyFormats = [ - 'waf_rule' => null + 'services' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'waf_rule' => 'waf_rule' + 'services' => 'services' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'waf_rule' => 'setWafRule' + 'services' => 'setServices' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'waf_rule' => 'getWafRule' + 'services' => 'getServices' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['waf_rule'] = $data['waf_rule'] ?? null; + $this->container['services'] = $data['services'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets waf_rule + * Gets services * - * @return \Fastly\Model\RelationshipWafRuleWafRule|null + * @return string[]|null */ - public function getWafRule() + public function getServices() { - return $this->container['waf_rule']; + return $this->container['services']; } /** - * Sets waf_rule + * Sets services * - * @param \Fastly\Model\RelationshipWafRuleWafRule|null $waf_rule waf_rule + * @param string[]|null $services A list of services with Bot Management enabled. * * @return self */ - public function setWafRule($waf_rule) + public function setServices($services) { - $this->container['waf_rule'] = $waf_rule; + $this->container['services'] = $services; return $this; } diff --git a/lib/Model/BotManagementResponseLinksGetAllServices.php b/lib/Model/BotManagementResponseLinksGetAllServices.php new file mode 100644 index 00000000..edcd87b2 --- /dev/null +++ b/lib/Model/BotManagementResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\BotManagementResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\BotManagementResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\BotManagementResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseLinksGetAllServicesLinks.php b/lib/Model/BotManagementResponseLinksGetAllServicesLinks.php new file mode 100644 index 00000000..a51af9e4 --- /dev/null +++ b/lib/Model/BotManagementResponseLinksGetAllServicesLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BotManagementResponseLinksGetAllServicesLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'bot_management_response_links_get_all_services__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of the resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WafExclusionsResponse.php b/lib/Model/BrotliCompressionResponseBodyGetAllServices.php similarity index 69% rename from lib/Model/WafExclusionsResponse.php rename to lib/Model/BrotliCompressionResponseBodyGetAllServices.php index 6a0c977d..86fb9de9 100644 --- a/lib/Model/WafExclusionsResponse.php +++ b/lib/Model/BrotliCompressionResponseBodyGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafExclusionResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafExclusionItem[]' + 'product' => '\Fastly\Model\BrotliCompressionResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks' ]; /** @@ -67,10 +67,10 @@ class WafExclusionsResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null ]; /** @@ -100,10 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' ]; /** @@ -112,10 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' ]; /** @@ -124,10 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' ]; /** @@ -187,10 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -218,97 +218,97 @@ public function valid() /** - * Gets links + * Gets product * - * @return \Fastly\Model\PaginationLinks|null + * @return \Fastly\Model\BrotliCompressionResponseProductProduct|null */ - public function getLinks() + public function getProduct() { - return $this->container['links']; + return $this->container['product']; } /** - * Sets links + * Sets product * - * @param \Fastly\Model\PaginationLinks|null $links links + * @param \Fastly\Model\BrotliCompressionResponseProductProduct|null $product product * * @return self */ - public function setLinks($links) + public function setProduct($product) { - $this->container['links'] = $links; + $this->container['product'] = $product; return $this; } /** - * Gets meta + * Gets customer * - * @return \Fastly\Model\PaginationMeta|null + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null */ - public function getMeta() + public function getCustomer() { - return $this->container['meta']; + return $this->container['customer']; } /** - * Sets meta + * Sets customer * - * @param \Fastly\Model\PaginationMeta|null $meta meta + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer * * @return self */ - public function setMeta($meta) + public function setCustomer($customer) { - $this->container['meta'] = $meta; + $this->container['customer'] = $customer; return $this; } /** - * Gets data + * Gets services * - * @return \Fastly\Model\WafExclusionResponseData[]|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\WafExclusionResponseData[]|null $data data + * @param string[]|null $services A list of services with Brotli Compression enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } /** - * Gets included + * Gets _links * - * @return \Fastly\Model\IncludedWithWafExclusionItem[]|null + * @return \Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks|null */ - public function getIncluded() + public function getLinks() { - return $this->container['included']; + return $this->container['_links']; } /** - * Sets included + * Sets _links * - * @param \Fastly\Model\IncludedWithWafExclusionItem[]|null $included included + * @param \Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setIncluded($included) + public function setLinks($_links) { - $this->container['included'] = $included; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/BrotliCompressionResponseCustomer.php b/lib/Model/BrotliCompressionResponseCustomer.php new file mode 100644 index 00000000..2a0b57b1 --- /dev/null +++ b/lib/Model/BrotliCompressionResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class BrotliCompressionResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'brotli_compression_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipWafActiveRulesWafActiveRules.php b/lib/Model/BrotliCompressionResponseEnabledServices.php similarity index 87% rename from lib/Model/RelationshipWafActiveRulesWafActiveRules.php rename to lib/Model/BrotliCompressionResponseEnabledServices.php index a4392fa6..c82532d7 100644 --- a/lib/Model/RelationshipWafActiveRulesWafActiveRules.php +++ b/lib/Model/BrotliCompressionResponseEnabledServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipMemberWafActiveRule[]' + 'services' => 'string[]' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafActiveRulesWafActiveRules implements ModelInterface, ArrayA * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'services' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'services' => 'services' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'services' => 'setServices' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'services' => 'getServices' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['services'] = $data['services'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets services * - * @return \Fastly\Model\RelationshipMemberWafActiveRule[]|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\RelationshipMemberWafActiveRule[]|null $data data + * @param string[]|null $services A list of services with Brotli Compression enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } diff --git a/lib/Model/RelationshipWafFirewall.php b/lib/Model/BrotliCompressionResponseLinksGetAllServices.php similarity index 85% rename from lib/Model/RelationshipWafFirewall.php rename to lib/Model/BrotliCompressionResponseLinksGetAllServices.php index 7bbb2604..b1252588 100644 --- a/lib/Model/RelationshipWafFirewall.php +++ b/lib/Model/BrotliCompressionResponseLinksGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipWafFirewallWafFirewall' + '_links' => '\Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafFirewall implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $fastlyFormats = [ - 'waf_firewall' => null + '_links' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'waf_firewall' => 'waf_firewall' + '_links' => '_links' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'waf_firewall' => 'setWafFirewall' + '_links' => 'setLinks' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'waf_firewall' => 'getWafFirewall' + '_links' => 'getLinks' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['waf_firewall'] = $data['waf_firewall'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets waf_firewall + * Gets _links * - * @return \Fastly\Model\RelationshipWafFirewallWafFirewall|null + * @return \Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks|null */ - public function getWafFirewall() + public function getLinks() { - return $this->container['waf_firewall']; + return $this->container['_links']; } /** - * Sets waf_firewall + * Sets _links * - * @param \Fastly\Model\RelationshipWafFirewallWafFirewall|null $waf_firewall waf_firewall + * @param \Fastly\Model\BrotliCompressionResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setWafFirewall($waf_firewall) + public function setLinks($_links) { - $this->container['waf_firewall'] = $waf_firewall; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/IncludedWithWafFirewallVersionItem.php b/lib/Model/BrotliCompressionResponseLinksGetAllServicesLinks.php similarity index 88% rename from lib/Model/IncludedWithWafFirewallVersionItem.php rename to lib/Model/BrotliCompressionResponseLinksGetAllServicesLinks.php index c63d9c85..7d762377 100644 --- a/lib/Model/IncludedWithWafFirewallVersionItem.php +++ b/lib/Model/BrotliCompressionResponseLinksGetAllServicesLinks.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafActiveRuleData' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class IncludedWithWafFirewallVersionItem implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets self * - * @return \Fastly\Model\WafActiveRuleData|null + * @return string|null */ - public function getData() + public function getSelf() { - return $this->container['data']; + return $this->container['self']; } /** - * Sets data + * Sets self * - * @param \Fastly\Model\WafActiveRuleData|null $data data + * @param string|null $self Location of resource * * @return self */ - public function setData($data) + public function setSelf($self) { - $this->container['data'] = $data; + $this->container['self'] = $self; return $this; } diff --git a/lib/Model/ComputeAclUpdateEntry.php b/lib/Model/ComputeAclUpdateEntry.php index 0c85147d..5cd78783 100644 --- a/lib/Model/ComputeAclUpdateEntry.php +++ b/lib/Model/ComputeAclUpdateEntry.php @@ -225,7 +225,7 @@ public function getOp() /** * Sets op * - * @param string|null $op One of \"create\" or \"update\", indicating that the rest of this entry is to be added to/updated in the ACL. + * @param string|null $op One of \"create\", \"update\", or \"delete\" indicating the operation to perform on the update. * * @return self */ @@ -273,7 +273,7 @@ public function getAction() /** * Sets action * - * @param string|null $action The action taken on the IP address, either \"block\" or \"allow\". + * @param string|null $action The action taken on the IP address, one of \"BLOCK\" or \"ALLOW\". If using the \"delete\" operation, no action should be specified. * * @return self */ diff --git a/lib/Model/TypeWafFirewallVersion.php b/lib/Model/DdosProtectionAction.php similarity index 65% rename from lib/Model/TypeWafFirewallVersion.php rename to lib/Model/DdosProtectionAction.php index 50cd913d..25f350d4 100644 --- a/lib/Model/TypeWafFirewallVersion.php +++ b/lib/Model/DdosProtectionAction.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafRuleRevisionResponseData[]', - 'included' => '\Fastly\Model\WafRule[]' + 'name' => '\Fastly\Model\DdosProtectionTrafficAttribute', + 'values' => '\Fastly\Model\DdosProtectionAttributeValue[]' ]; /** @@ -65,8 +65,8 @@ class WafRuleRevisionsResponseAllOf implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'included' => null + 'name' => null, + 'values' => null ]; /** @@ -96,8 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' + 'name' => 'name', + 'values' => 'values' ]; /** @@ -106,8 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' + 'name' => 'setName', + 'values' => 'setValues' ]; /** @@ -116,8 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' + 'name' => 'getName', + 'values' => 'getValues' ]; /** @@ -177,8 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['values'] = $data['values'] ?? null; } /** @@ -206,49 +206,49 @@ public function valid() /** - * Gets data + * Gets name * - * @return \Fastly\Model\WafRuleRevisionResponseData[]|null + * @return \Fastly\Model\DdosProtectionTrafficAttribute|null */ - public function getData() + public function getName() { - return $this->container['data']; + return $this->container['name']; } /** - * Sets data + * Sets name * - * @param \Fastly\Model\WafRuleRevisionResponseData[]|null $data data + * @param \Fastly\Model\DdosProtectionTrafficAttribute|null $name name * * @return self */ - public function setData($data) + public function setName($name) { - $this->container['data'] = $data; + $this->container['name'] = $name; return $this; } /** - * Gets included + * Gets values * - * @return \Fastly\Model\WafRule[]|null + * @return \Fastly\Model\DdosProtectionAttributeValue[]|null */ - public function getIncluded() + public function getValues() { - return $this->container['included']; + return $this->container['values']; } /** - * Sets included + * Sets values * - * @param \Fastly\Model\WafRule[]|null $included included + * @param \Fastly\Model\DdosProtectionAttributeValue[]|null $values Values for traffic attribute. * * @return self */ - public function setIncluded($included) + public function setValues($values) { - $this->container['included'] = $included; + $this->container['values'] = $values; return $this; } diff --git a/lib/Model/RelationshipMemberWafFirewallVersion.php b/lib/Model/DdosProtectionAttributeValue.php similarity index 82% rename from lib/Model/RelationshipMemberWafFirewallVersion.php rename to lib/Model/DdosProtectionAttributeValue.php index 1c2716ef..af32ce59 100644 --- a/lib/Model/RelationshipMemberWafFirewallVersion.php +++ b/lib/Model/DdosProtectionAttributeValue.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeWafFirewallVersion', - 'id' => 'string' + 'value' => 'string', + 'percentage' => 'int' ]; /** @@ -65,8 +65,8 @@ class RelationshipMemberWafFirewallVersion implements ModelInterface, ArrayAcces * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, - 'id' => null + 'value' => null, + 'percentage' => null ]; /** @@ -96,8 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id' + 'value' => 'value', + 'percentage' => 'percentage' ]; /** @@ -106,8 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId' + 'value' => 'setValue', + 'percentage' => 'setPercentage' ]; /** @@ -116,8 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId' + 'value' => 'getValue', + 'percentage' => 'getPercentage' ]; /** @@ -177,8 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['percentage'] = $data['percentage'] ?? null; } /** @@ -206,49 +206,49 @@ public function valid() /** - * Gets type + * Gets value * - * @return \Fastly\Model\TypeWafFirewallVersion|null + * @return string|null */ - public function getType() + public function getValue() { - return $this->container['type']; + return $this->container['value']; } /** - * Sets type + * Sets value * - * @param \Fastly\Model\TypeWafFirewallVersion|null $type type + * @param string|null $value value * * @return self */ - public function setType($type) + public function setValue($value) { - $this->container['type'] = $type; + $this->container['value'] = $value; return $this; } /** - * Gets id + * Gets percentage * - * @return string|null + * @return int|null */ - public function getId() + public function getPercentage() { - return $this->container['id']; + return $this->container['percentage']; } /** - * Sets id + * Sets percentage * - * @param string|null $id Alphanumeric string identifying a Firewall version. + * @param int|null $percentage Percentage of traffic containing a value. * * @return self */ - public function setId($id) + public function setPercentage($percentage) { - $this->container['id'] = $id; + $this->container['percentage'] = $percentage; return $this; } diff --git a/lib/Model/WafExclusionResponseDataAllOf.php b/lib/Model/DdosProtectionError.php similarity index 72% rename from lib/Model/WafExclusionResponseDataAllOf.php rename to lib/Model/DdosProtectionError.php index b8712a2a..ffbd49fc 100644 --- a/lib/Model/WafExclusionResponseDataAllOf.php +++ b/lib/Model/DdosProtectionError.php @@ -1,6 +1,6 @@ 'string', - 'attributes' => '\Fastly\Model\WafExclusionResponseDataAttributes', - 'relationships' => '\Fastly\Model\WafExclusionResponseDataRelationships' + 'title' => 'string', + 'status' => 'int', + 'detail' => 'string', + 'errors' => '\Fastly\Model\DdosProtectionErrorErrors[]' ]; /** @@ -66,9 +67,10 @@ class WafExclusionResponseDataAllOf implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $fastlyFormats = [ - 'id' => null, - 'attributes' => null, - 'relationships' => null + 'title' => null, + 'status' => null, + 'detail' => null, + 'errors' => null ]; /** @@ -98,9 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' + 'title' => 'title', + 'status' => 'status', + 'detail' => 'detail', + 'errors' => 'errors' ]; /** @@ -109,9 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' + 'title' => 'setTitle', + 'status' => 'setStatus', + 'detail' => 'setDetail', + 'errors' => 'setErrors' ]; /** @@ -120,9 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' + 'title' => 'getTitle', + 'status' => 'getStatus', + 'detail' => 'getDetail', + 'errors' => 'getErrors' ]; /** @@ -182,9 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['title'] = $data['title'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['detail'] = $data['detail'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -212,73 +218,97 @@ public function valid() /** - * Gets id + * Gets title * * @return string|null */ - public function getId() + public function getTitle() { - return $this->container['id']; + return $this->container['title']; } /** - * Sets id + * Sets title * - * @param string|null $id Alphanumeric string identifying a WAF exclusion. + * @param string|null $title title * * @return self */ - public function setId($id) + public function setTitle($title) { - $this->container['id'] = $id; + $this->container['title'] = $title; return $this; } /** - * Gets attributes + * Gets status * - * @return \Fastly\Model\WafExclusionResponseDataAttributes|null + * @return int|null */ - public function getAttributes() + public function getStatus() { - return $this->container['attributes']; + return $this->container['status']; } /** - * Sets attributes + * Sets status * - * @param \Fastly\Model\WafExclusionResponseDataAttributes|null $attributes attributes + * @param int|null $status status * * @return self */ - public function setAttributes($attributes) + public function setStatus($status) { - $this->container['attributes'] = $attributes; + $this->container['status'] = $status; return $this; } /** - * Gets relationships + * Gets detail * - * @return \Fastly\Model\WafExclusionResponseDataRelationships|null + * @return string|null + */ + public function getDetail() + { + return $this->container['detail']; + } + + /** + * Sets detail + * + * @param string|null $detail detail + * + * @return self + */ + public function setDetail($detail) + { + $this->container['detail'] = $detail; + + return $this; + } + + /** + * Gets errors + * + * @return \Fastly\Model\DdosProtectionErrorErrors[]|null */ - public function getRelationships() + public function getErrors() { - return $this->container['relationships']; + return $this->container['errors']; } /** - * Sets relationships + * Sets errors * - * @param \Fastly\Model\WafExclusionResponseDataRelationships|null $relationships relationships + * @param \Fastly\Model\DdosProtectionErrorErrors[]|null $errors errors * * @return self */ - public function setRelationships($relationships) + public function setErrors($errors) { - $this->container['relationships'] = $relationships; + $this->container['errors'] = $errors; return $this; } diff --git a/lib/Model/RelationshipMemberWafFirewall.php b/lib/Model/DdosProtectionErrorErrors.php similarity index 84% rename from lib/Model/RelationshipMemberWafFirewall.php rename to lib/Model/DdosProtectionErrorErrors.php index 6fd13eaa..5469f114 100644 --- a/lib/Model/RelationshipMemberWafFirewall.php +++ b/lib/Model/DdosProtectionErrorErrors.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeWafFirewall', - 'id' => 'string' + 'field' => 'string', + 'error' => 'string' ]; /** @@ -65,8 +65,8 @@ class RelationshipMemberWafFirewall implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, - 'id' => null + 'field' => null, + 'error' => null ]; /** @@ -96,8 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id' + 'field' => 'field', + 'error' => 'error' ]; /** @@ -106,8 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId' + 'field' => 'setField', + 'error' => 'setError' ]; /** @@ -116,8 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId' + 'field' => 'getField', + 'error' => 'getError' ]; /** @@ -177,8 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; + $this->container['field'] = $data['field'] ?? null; + $this->container['error'] = $data['error'] ?? null; } /** @@ -206,49 +206,49 @@ public function valid() /** - * Gets type + * Gets field * - * @return \Fastly\Model\TypeWafFirewall|null + * @return string|null */ - public function getType() + public function getField() { - return $this->container['type']; + return $this->container['field']; } /** - * Sets type + * Sets field * - * @param \Fastly\Model\TypeWafFirewall|null $type type + * @param string|null $field field * * @return self */ - public function setType($type) + public function setField($field) { - $this->container['type'] = $type; + $this->container['field'] = $field; return $this; } /** - * Gets id + * Gets error * * @return string|null */ - public function getId() + public function getError() { - return $this->container['id']; + return $this->container['error']; } /** - * Sets id + * Sets error * - * @param string|null $id id + * @param string|null $error error * * @return self */ - public function setId($id) + public function setError($error) { - $this->container['id'] = $id; + $this->container['error'] = $error; return $this; } diff --git a/lib/Model/DdosProtectionEvent.php b/lib/Model/DdosProtectionEvent.php new file mode 100644 index 00000000..75e9f427 --- /dev/null +++ b/lib/Model/DdosProtectionEvent.php @@ -0,0 +1,524 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionEvent implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_event'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'id' => 'string', + 'name' => 'string', + 'customer_id' => 'string', + 'service_id' => 'string', + 'started_at' => '\DateTime', + 'ended_at' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'id' => null, + 'name' => null, + 'customer_id' => null, + 'service_id' => null, + 'started_at' => 'date-time', + 'ended_at' => 'date-time' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'created_at' => 'created_at', + 'updated_at' => 'updated_at', + 'id' => 'id', + 'name' => 'name', + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', + 'started_at' => 'started_at', + 'ended_at' => 'ended_at' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'id' => 'setId', + 'name' => 'setName', + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', + 'started_at' => 'setStartedAt', + 'ended_at' => 'setEndedAt' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'id' => 'getId', + 'name' => 'getName', + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', + 'started_at' => 'getStartedAt', + 'ended_at' => 'getEndedAt' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['started_at'] = $data['started_at'] ?? null; + $this->container['ended_at'] = $data['ended_at'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Date and time in ISO 8601 format. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at Date and time in ISO 8601 format. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique ID of the event. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name A human-readable name for the event. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets customer_id + * + * @return string|null + */ + public function getCustomerId() + { + return $this->container['customer_id']; + } + + /** + * Sets customer_id + * + * @param string|null $customer_id Alphanumeric string identifying the customer. + * + * @return self + */ + public function setCustomerId($customer_id) + { + $this->container['customer_id'] = $customer_id; + + return $this; + } + + /** + * Gets service_id + * + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id Alphanumeric string identifying the service. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; + + return $this; + } + + /** + * Gets started_at + * + * @return \DateTime|null + */ + public function getStartedAt() + { + return $this->container['started_at']; + } + + /** + * Sets started_at + * + * @param \DateTime|null $started_at Date and time in ISO 8601 format. + * + * @return self + */ + public function setStartedAt($started_at) + { + $this->container['started_at'] = $started_at; + + return $this; + } + + /** + * Gets ended_at + * + * @return \DateTime|null + */ + public function getEndedAt() + { + return $this->container['ended_at']; + } + + /** + * Sets ended_at + * + * @param \DateTime|null $ended_at Date and time in ISO 8601 format. + * + * @return self + */ + public function setEndedAt($ended_at) + { + $this->container['ended_at'] = $ended_at; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WafRuleResponseData.php b/lib/Model/DdosProtectionEventAllOf.php similarity index 66% rename from lib/Model/WafRuleResponseData.php rename to lib/Model/DdosProtectionEventAllOf.php index e8cd75a1..6f66f203 100644 --- a/lib/Model/WafRuleResponseData.php +++ b/lib/Model/DdosProtectionEventAllOf.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeWafRule', 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleAttributes', - 'relationships' => '\Fastly\Model\RelationshipsForWafRule' + 'name' => 'string', + 'customer_id' => 'string', + 'service_id' => 'string', + 'started_at' => '\DateTime', + 'ended_at' => '\DateTime' ]; /** @@ -67,10 +69,12 @@ class WafRuleResponseData implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, 'id' => null, - 'attributes' => null, - 'relationships' => null + 'name' => null, + 'customer_id' => null, + 'service_id' => null, + 'started_at' => 'date-time', + 'ended_at' => 'date-time' ]; /** @@ -100,10 +104,12 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' + 'name' => 'name', + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', + 'started_at' => 'started_at', + 'ended_at' => 'ended_at' ]; /** @@ -112,10 +118,12 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' + 'name' => 'setName', + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', + 'started_at' => 'setStartedAt', + 'ended_at' => 'setEndedAt' ]; /** @@ -124,10 +132,12 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' + 'name' => 'getName', + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', + 'started_at' => 'getStartedAt', + 'ended_at' => 'getEndedAt' ]; /** @@ -187,10 +197,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['started_at'] = $data['started_at'] ?? null; + $this->container['ended_at'] = $data['ended_at'] ?? null; } /** @@ -218,97 +230,145 @@ public function valid() /** - * Gets type + * Gets id * - * @return \Fastly\Model\TypeWafRule|null + * @return string|null */ - public function getType() + public function getId() { - return $this->container['type']; + return $this->container['id']; } /** - * Sets type + * Sets id * - * @param \Fastly\Model\TypeWafRule|null $type type + * @param string|null $id Unique ID of the event. * * @return self */ - public function setType($type) + public function setId($id) { - $this->container['type'] = $type; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets name * * @return string|null */ - public function getId() + public function getName() { - return $this->container['id']; + return $this->container['name']; } /** - * Sets id + * Sets name * - * @param string|null $id id + * @param string|null $name A human-readable name for the event. * * @return self */ - public function setId($id) + public function setName($name) { - $this->container['id'] = $id; + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets customer_id + * + * @return string|null + */ + public function getCustomerId() + { + return $this->container['customer_id']; + } + + /** + * Sets customer_id + * + * @param string|null $customer_id Alphanumeric string identifying the customer. + * + * @return self + */ + public function setCustomerId($customer_id) + { + $this->container['customer_id'] = $customer_id; + + return $this; + } + + /** + * Gets service_id + * + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id Alphanumeric string identifying the service. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; return $this; } /** - * Gets attributes + * Gets started_at * - * @return \Fastly\Model\WafRuleAttributes|null + * @return \DateTime|null */ - public function getAttributes() + public function getStartedAt() { - return $this->container['attributes']; + return $this->container['started_at']; } /** - * Sets attributes + * Sets started_at * - * @param \Fastly\Model\WafRuleAttributes|null $attributes attributes + * @param \DateTime|null $started_at Date and time in ISO 8601 format. * * @return self */ - public function setAttributes($attributes) + public function setStartedAt($started_at) { - $this->container['attributes'] = $attributes; + $this->container['started_at'] = $started_at; return $this; } /** - * Gets relationships + * Gets ended_at * - * @return \Fastly\Model\RelationshipsForWafRule|null + * @return \DateTime|null */ - public function getRelationships() + public function getEndedAt() { - return $this->container['relationships']; + return $this->container['ended_at']; } /** - * Sets relationships + * Sets ended_at * - * @param \Fastly\Model\RelationshipsForWafRule|null $relationships relationships + * @param \DateTime|null $ended_at Date and time in ISO 8601 format. * * @return self */ - public function setRelationships($relationships) + public function setEndedAt($ended_at) { - $this->container['relationships'] = $relationships; + $this->container['ended_at'] = $ended_at; return $this; } diff --git a/lib/Model/WafActiveRuleDataAttributes.php b/lib/Model/DdosProtectionNotAuthenticated.php similarity index 79% rename from lib/Model/WafActiveRuleDataAttributes.php rename to lib/Model/DdosProtectionNotAuthenticated.php index 25060e92..515a4cd0 100644 --- a/lib/Model/WafActiveRuleDataAttributes.php +++ b/lib/Model/DdosProtectionNotAuthenticated.php @@ -1,6 +1,6 @@ 'int', - 'revision' => '\Fastly\Model\WafRuleRevisionOrLatest', - 'status' => 'string' + 'title' => 'string', + 'status' => 'int' ]; /** @@ -66,8 +65,7 @@ class WafActiveRuleDataAttributes implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $fastlyFormats = [ - 'modsec_rule_id' => null, - 'revision' => null, + 'title' => null, 'status' => null ]; @@ -98,8 +96,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'modsec_rule_id' => 'modsec_rule_id', - 'revision' => 'revision', + 'title' => 'title', 'status' => 'status' ]; @@ -109,8 +106,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'modsec_rule_id' => 'setModsecRuleId', - 'revision' => 'setRevision', + 'title' => 'setTitle', 'status' => 'setStatus' ]; @@ -120,8 +116,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'modsec_rule_id' => 'getModsecRuleId', - 'revision' => 'getRevision', + 'title' => 'getTitle', 'status' => 'getStatus' ]; @@ -166,9 +161,7 @@ public function getModelName() return self::$fastlyModelName; } - const STATUS_LOG = 'log'; - const STATUS_BLOCK = 'block'; - const STATUS_SCORE = 'score'; + const STATUS_401 = 401; /** * Gets allowable values of the enum @@ -178,9 +171,7 @@ public function getModelName() public function getStatusAllowableValues() { return [ - self::STATUS_LOG, - self::STATUS_BLOCK, - self::STATUS_SCORE, + self::STATUS_401, ]; } @@ -199,8 +190,7 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['modsec_rule_id'] = $data['modsec_rule_id'] ?? null; - $this->container['revision'] = $data['revision'] ?? null; + $this->container['title'] = $data['title'] ?? null; $this->container['status'] = $data['status'] ?? null; } @@ -238,49 +228,25 @@ public function valid() /** - * Gets modsec_rule_id + * Gets title * - * @return int|null - */ - public function getModsecRuleId() - { - return $this->container['modsec_rule_id']; - } - - /** - * Sets modsec_rule_id - * - * @param int|null $modsec_rule_id The ModSecurity rule ID of the associated rule revision. - * - * @return self - */ - public function setModsecRuleId($modsec_rule_id) - { - $this->container['modsec_rule_id'] = $modsec_rule_id; - - return $this; - } - - /** - * Gets revision - * - * @return \Fastly\Model\WafRuleRevisionOrLatest|null + * @return string|null */ - public function getRevision() + public function getTitle() { - return $this->container['revision']; + return $this->container['title']; } /** - * Sets revision + * Sets title * - * @param \Fastly\Model\WafRuleRevisionOrLatest|null $revision revision + * @param string|null $title title * * @return self */ - public function setRevision($revision) + public function setTitle($title) { - $this->container['revision'] = $revision; + $this->container['title'] = $title; return $this; } @@ -288,7 +254,7 @@ public function setRevision($revision) /** * Gets status * - * @return string|null + * @return int|null */ public function getStatus() { @@ -298,7 +264,7 @@ public function getStatus() /** * Sets status * - * @param string|null $status Describes the behavior for the particular rule revision within this firewall version. + * @param int|null $status status * * @return self */ diff --git a/lib/Model/IncludedWithWafRuleItem.php b/lib/Model/DdosProtectionNotFound.php similarity index 73% rename from lib/Model/IncludedWithWafRuleItem.php rename to lib/Model/DdosProtectionNotFound.php index 2ee43653..1e43b9a6 100644 --- a/lib/Model/IncludedWithWafRuleItem.php +++ b/lib/Model/DdosProtectionNotFound.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeWafRuleRevision', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleRevisionAttributes' + 'title' => 'string', + 'status' => 'int' ]; /** @@ -66,9 +65,8 @@ class IncludedWithWafRuleItem implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, - 'attributes' => null + 'title' => null, + 'status' => null ]; /** @@ -98,9 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes' + 'title' => 'title', + 'status' => 'status' ]; /** @@ -109,9 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes' + 'title' => 'setTitle', + 'status' => 'setStatus' ]; /** @@ -120,9 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes' + 'title' => 'getTitle', + 'status' => 'getStatus' ]; /** @@ -166,6 +161,19 @@ public function getModelName() return self::$fastlyModelName; } + const STATUS_404 = 404; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_404, + ]; + } /** * Associative array for storing property values @@ -182,9 +190,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['title'] = $data['title'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -196,6 +203,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -212,73 +228,59 @@ public function valid() /** - * Gets type - * - * @return \Fastly\Model\TypeWafRuleRevision|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafRuleRevision|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id + * Gets title * * @return string|null */ - public function getId() + public function getTitle() { - return $this->container['id']; + return $this->container['title']; } /** - * Sets id + * Sets title * - * @param string|null $id Alphanumeric string identifying a WAF rule revision. + * @param string|null $title title * * @return self */ - public function setId($id) + public function setTitle($title) { - $this->container['id'] = $id; + $this->container['title'] = $title; return $this; } /** - * Gets attributes + * Gets status * - * @return \Fastly\Model\WafRuleRevisionAttributes|null + * @return int|null */ - public function getAttributes() + public function getStatus() { - return $this->container['attributes']; + return $this->container['status']; } /** - * Sets attributes + * Sets status * - * @param \Fastly\Model\WafRuleRevisionAttributes|null $attributes attributes + * @param int|null $status status * * @return self */ - public function setAttributes($attributes) + public function setStatus($status) { - $this->container['attributes'] = $attributes; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/lib/Model/WafActiveRuleCreationResponse.php b/lib/Model/DdosProtectionResponseBodyGetAllServices.php similarity index 69% rename from lib/Model/WafActiveRuleCreationResponse.php rename to lib/Model/DdosProtectionResponseBodyGetAllServices.php index 96d22063..0a228d95 100644 --- a/lib/Model/WafActiveRuleCreationResponse.php +++ b/lib/Model/DdosProtectionResponseBodyGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafActiveRuleResponseData[]', - 'links' => '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'included' => '\Fastly\Model\IncludedWithWafActiveRuleItem[]' + 'product' => '\Fastly\Model\DdosProtectionResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks' ]; /** @@ -67,10 +67,10 @@ class WafActiveRuleCreationResponse implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'links' => null, - 'meta' => null, - 'included' => null + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null ]; /** @@ -100,10 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'links' => 'links', - 'meta' => 'meta', - 'included' => 'included' + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' ]; /** @@ -112,10 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'included' => 'setIncluded' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' ]; /** @@ -124,10 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'included' => 'getIncluded' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' ]; /** @@ -187,10 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -218,97 +218,97 @@ public function valid() /** - * Gets data + * Gets product * - * @return \Fastly\Model\WafActiveRuleResponseData[]|null + * @return \Fastly\Model\DdosProtectionResponseProductProduct|null */ - public function getData() + public function getProduct() { - return $this->container['data']; + return $this->container['product']; } /** - * Sets data + * Sets product * - * @param \Fastly\Model\WafActiveRuleResponseData[]|null $data data + * @param \Fastly\Model\DdosProtectionResponseProductProduct|null $product product * * @return self */ - public function setData($data) + public function setProduct($product) { - $this->container['data'] = $data; + $this->container['product'] = $product; return $this; } /** - * Gets links + * Gets customer * - * @return \Fastly\Model\PaginationLinks|null + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null */ - public function getLinks() + public function getCustomer() { - return $this->container['links']; + return $this->container['customer']; } /** - * Sets links + * Sets customer * - * @param \Fastly\Model\PaginationLinks|null $links links + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer * * @return self */ - public function setLinks($links) + public function setCustomer($customer) { - $this->container['links'] = $links; + $this->container['customer'] = $customer; return $this; } /** - * Gets meta + * Gets services * - * @return \Fastly\Model\PaginationMeta|null + * @return string[]|null */ - public function getMeta() + public function getServices() { - return $this->container['meta']; + return $this->container['services']; } /** - * Sets meta + * Sets services * - * @param \Fastly\Model\PaginationMeta|null $meta meta + * @param string[]|null $services A list of services with DDoS Protection enabled. * * @return self */ - public function setMeta($meta) + public function setServices($services) { - $this->container['meta'] = $meta; + $this->container['services'] = $services; return $this; } /** - * Gets included + * Gets _links * - * @return \Fastly\Model\IncludedWithWafActiveRuleItem[]|null + * @return \Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks|null */ - public function getIncluded() + public function getLinks() { - return $this->container['included']; + return $this->container['_links']; } /** - * Sets included + * Sets _links * - * @param \Fastly\Model\IncludedWithWafActiveRuleItem[]|null $included included + * @param \Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setIncluded($included) + public function setLinks($_links) { - $this->container['included'] = $included; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/DdosProtectionResponseCustomer.php b/lib/Model/DdosProtectionResponseCustomer.php new file mode 100644 index 00000000..26f58f04 --- /dev/null +++ b/lib/Model/DdosProtectionResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipWafRules.php b/lib/Model/DdosProtectionResponseEnabledServices.php similarity index 87% rename from lib/Model/RelationshipWafRules.php rename to lib/Model/DdosProtectionResponseEnabledServices.php index 9ea1aef5..ac09af08 100644 --- a/lib/Model/RelationshipWafRules.php +++ b/lib/Model/DdosProtectionResponseEnabledServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipWafRuleWafRule' + 'services' => 'string[]' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafRules implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $fastlyFormats = [ - 'waf_rules' => null + 'services' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'waf_rules' => 'waf_rules' + 'services' => 'services' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'waf_rules' => 'setWafRules' + 'services' => 'setServices' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'waf_rules' => 'getWafRules' + 'services' => 'getServices' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['waf_rules'] = $data['waf_rules'] ?? null; + $this->container['services'] = $data['services'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets waf_rules + * Gets services * - * @return \Fastly\Model\RelationshipWafRuleWafRule|null + * @return string[]|null */ - public function getWafRules() + public function getServices() { - return $this->container['waf_rules']; + return $this->container['services']; } /** - * Sets waf_rules + * Sets services * - * @param \Fastly\Model\RelationshipWafRuleWafRule|null $waf_rules waf_rules + * @param string[]|null $services A list of services with DDoS Protection enabled. * * @return self */ - public function setWafRules($waf_rules) + public function setServices($services) { - $this->container['waf_rules'] = $waf_rules; + $this->container['services'] = $services; return $this; } diff --git a/lib/Model/DdosProtectionResponseLinksGetAllServices.php b/lib/Model/DdosProtectionResponseLinksGetAllServices.php new file mode 100644 index 00000000..306e39f4 --- /dev/null +++ b/lib/Model/DdosProtectionResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DdosProtectionResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionResponseLinksGetAllServicesLinks.php b/lib/Model/DdosProtectionResponseLinksGetAllServicesLinks.php new file mode 100644 index 00000000..a842c22b --- /dev/null +++ b/lib/Model/DdosProtectionResponseLinksGetAllServicesLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionResponseLinksGetAllServicesLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_response_links_get_all_services__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WafExclusionResponseDataAttributes.php b/lib/Model/DdosProtectionRule.php similarity index 56% rename from lib/Model/WafExclusionResponseDataAttributes.php rename to lib/Model/DdosProtectionRule.php index 4c317d99..261bb740 100644 --- a/lib/Model/WafExclusionResponseDataAttributes.php +++ b/lib/Model/DdosProtectionRule.php @@ -1,6 +1,6 @@ '\DateTime', - 'deleted_at' => '\DateTime', 'updated_at' => '\DateTime', - 'condition' => 'string', - 'exclusion_type' => 'string', - 'logging' => 'bool', + 'id' => 'string', 'name' => 'string', - 'number' => 'int', - 'variable' => 'string' + 'action' => '\Fastly\Model\DdosProtectionAction', + 'customer_id' => 'string', + 'service_id' => 'string', + 'source_ip' => 'string', + 'country_code' => 'string', + 'host' => 'string', + 'asn' => 'string', + 'source_ip_prefix' => 'string', + 'additional_attributes' => 'string[]' ]; /** @@ -73,14 +77,18 @@ class WafExclusionResponseDataAttributes implements ModelInterface, ArrayAccess, */ protected static $fastlyFormats = [ 'created_at' => 'date-time', - 'deleted_at' => 'date-time', 'updated_at' => 'date-time', - 'condition' => null, - 'exclusion_type' => null, - 'logging' => null, + 'id' => null, 'name' => null, - 'number' => null, - 'variable' => null + 'action' => null, + 'customer_id' => null, + 'service_id' => null, + 'source_ip' => null, + 'country_code' => null, + 'host' => null, + 'asn' => null, + 'source_ip_prefix' => null, + 'additional_attributes' => null ]; /** @@ -111,14 +119,18 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', 'updated_at' => 'updated_at', - 'condition' => 'condition', - 'exclusion_type' => 'exclusion_type', - 'logging' => 'logging', + 'id' => 'id', 'name' => 'name', - 'number' => 'number', - 'variable' => 'variable' + 'action' => 'action', + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', + 'source_ip' => 'source_ip', + 'country_code' => 'country_code', + 'host' => 'host', + 'asn' => 'asn', + 'source_ip_prefix' => 'source_ip_prefix', + 'additional_attributes' => 'additional_attributes' ]; /** @@ -128,14 +140,18 @@ public static function fastlyFormats() */ protected static $setters = [ 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', 'updated_at' => 'setUpdatedAt', - 'condition' => 'setCondition', - 'exclusion_type' => 'setExclusionType', - 'logging' => 'setLogging', + 'id' => 'setId', 'name' => 'setName', - 'number' => 'setNumber', - 'variable' => 'setVariable' + 'action' => 'setAction', + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', + 'source_ip' => 'setSourceIp', + 'country_code' => 'setCountryCode', + 'host' => 'setHost', + 'asn' => 'setAsn', + 'source_ip_prefix' => 'setSourceIpPrefix', + 'additional_attributes' => 'setAdditionalAttributes' ]; /** @@ -145,14 +161,18 @@ public static function fastlyFormats() */ protected static $getters = [ 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', 'updated_at' => 'getUpdatedAt', - 'condition' => 'getCondition', - 'exclusion_type' => 'getExclusionType', - 'logging' => 'getLogging', + 'id' => 'getId', 'name' => 'getName', - 'number' => 'getNumber', - 'variable' => 'getVariable' + 'action' => 'getAction', + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', + 'source_ip' => 'getSourceIp', + 'country_code' => 'getCountryCode', + 'host' => 'getHost', + 'asn' => 'getAsn', + 'source_ip_prefix' => 'getSourceIpPrefix', + 'additional_attributes' => 'getAdditionalAttributes' ]; /** @@ -196,46 +216,6 @@ public function getModelName() return self::$fastlyModelName; } - const EXCLUSION_TYPE_RULE = 'rule'; - const EXCLUSION_TYPE_VARIABLE = 'variable'; - const EXCLUSION_TYPE_WAF = 'waf'; - const VARIABLE_REQ_COOKIES = 'req.cookies'; - const VARIABLE_REQ_HEADERS = 'req.headers'; - const VARIABLE_REQ_POST = 'req.post'; - const VARIABLE_REQ_POST_FILENAME = 'req.post_filename'; - const VARIABLE_REQ_QS = 'req.qs'; - const VARIABLE_NULL = 'null'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExclusionTypeAllowableValues() - { - return [ - self::EXCLUSION_TYPE_RULE, - self::EXCLUSION_TYPE_VARIABLE, - self::EXCLUSION_TYPE_WAF, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getVariableAllowableValues() - { - return [ - self::VARIABLE_REQ_COOKIES, - self::VARIABLE_REQ_HEADERS, - self::VARIABLE_REQ_POST, - self::VARIABLE_REQ_POST_FILENAME, - self::VARIABLE_REQ_QS, - self::VARIABLE_NULL, - ]; - } /** * Associative array for storing property values @@ -253,14 +233,18 @@ public function getVariableAllowableValues() public function __construct(array $data = null) { $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['condition'] = $data['condition'] ?? null; - $this->container['exclusion_type'] = $data['exclusion_type'] ?? null; - $this->container['logging'] = $data['logging'] ?? true; + $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['number'] = $data['number'] ?? null; - $this->container['variable'] = $data['variable'] ?? null; + $this->container['action'] = $data['action'] ?? null; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['source_ip'] = $data['source_ip'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['host'] = $data['host'] ?? null; + $this->container['asn'] = $data['asn'] ?? null; + $this->container['source_ip_prefix'] = $data['source_ip_prefix'] ?? null; + $this->container['additional_attributes'] = $data['additional_attributes'] ?? null; } /** @@ -272,24 +256,6 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getExclusionTypeAllowableValues(); - if (!is_null($this->container['exclusion_type']) && !in_array($this->container['exclusion_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'exclusion_type', must be one of '%s'", - $this->container['exclusion_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getVariableAllowableValues(); - if (!is_null($this->container['variable']) && !in_array($this->container['variable'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'variable', must be one of '%s'", - $this->container['variable'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -330,213 +296,289 @@ public function setCreatedAt($created_at) } /** - * Gets deleted_at + * Gets updated_at * * @return \DateTime|null */ - public function getDeletedAt() + public function getUpdatedAt() { - return $this->container['deleted_at']; + return $this->container['updated_at']; } /** - * Sets deleted_at + * Sets updated_at * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. + * @param \DateTime|null $updated_at Date and time in ISO 8601 format. * * @return self */ - public function setDeletedAt($deleted_at) + public function setUpdatedAt($updated_at) { - $this->container['deleted_at'] = $deleted_at; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime|null + * @return string|null */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. + * @param string|null $id Unique ID of the rule. * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets condition + * Gets name * * @return string|null */ - public function getCondition() + public function getName() { - return $this->container['condition']; + return $this->container['name']; } /** - * Sets condition + * Sets name * - * @param string|null $condition A conditional expression in VCL used to determine if the condition is met. + * @param string|null $name A human-readable name for the rule. * * @return self */ - public function setCondition($condition) + public function setName($name) { - $this->container['condition'] = $condition; + $this->container['name'] = $name; return $this; } /** - * Gets exclusion_type + * Gets action + * + * @return \Fastly\Model\DdosProtectionAction|null + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param \Fastly\Model\DdosProtectionAction|null $action action + * + * @return self + */ + public function setAction($action) + { + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets customer_id * * @return string|null */ - public function getExclusionType() + public function getCustomerId() { - return $this->container['exclusion_type']; + return $this->container['customer_id']; } /** - * Sets exclusion_type + * Sets customer_id * - * @param string|null $exclusion_type The type of exclusion. + * @param string|null $customer_id Alphanumeric string identifying the customer. * * @return self */ - public function setExclusionType($exclusion_type) - { - $allowedValues = $this->getExclusionTypeAllowableValues(); - if (!is_null($exclusion_type) && !in_array($exclusion_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'exclusion_type', must be one of '%s'", - $exclusion_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['exclusion_type'] = $exclusion_type; + public function setCustomerId($customer_id) + { + $this->container['customer_id'] = $customer_id; return $this; } /** - * Gets logging + * Gets service_id * - * @return bool|null + * @return string|null */ - public function getLogging() + public function getServiceId() { - return $this->container['logging']; + return $this->container['service_id']; } /** - * Sets logging + * Sets service_id * - * @param bool|null $logging Whether to generate a log upon matching. + * @param string|null $service_id Alphanumeric string identifying the service. * * @return self */ - public function setLogging($logging) + public function setServiceId($service_id) { - $this->container['logging'] = $logging; + $this->container['service_id'] = $service_id; return $this; } /** - * Gets name + * Gets source_ip * * @return string|null */ - public function getName() + public function getSourceIp() { - return $this->container['name']; + return $this->container['source_ip']; } /** - * Sets name + * Sets source_ip * - * @param string|null $name Name of the exclusion. + * @param string|null $source_ip Source IP address attribute. * * @return self */ - public function setName($name) + public function setSourceIp($source_ip) { - $this->container['name'] = $name; + $this->container['source_ip'] = $source_ip; return $this; } /** - * Gets number + * Gets country_code * - * @return int|null + * @return string|null */ - public function getNumber() + public function getCountryCode() { - return $this->container['number']; + return $this->container['country_code']; } /** - * Sets number + * Sets country_code * - * @param int|null $number A numeric ID identifying a WAF exclusion. + * @param string|null $country_code Country code attribute. * * @return self */ - public function setNumber($number) + public function setCountryCode($country_code) { - $this->container['number'] = $number; + $this->container['country_code'] = $country_code; return $this; } /** - * Gets variable + * Gets host * * @return string|null */ - public function getVariable() + public function getHost() { - return $this->container['variable']; + return $this->container['host']; } /** - * Sets variable + * Sets host * - * @param string|null $variable The variable to exclude. An optional selector can be specified after the variable separated by a colon (`:`) to restrict the variable to a particular parameter. Required for `exclusion_type=variable`. + * @param string|null $host Host attribute. * * @return self */ - public function setVariable($variable) - { - $allowedValues = $this->getVariableAllowableValues(); - if (!is_null($variable) && !in_array($variable, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'variable', must be one of '%s'", - $variable, - implode("', '", $allowedValues) - ) - ); - } - $this->container['variable'] = $variable; + public function setHost($host) + { + $this->container['host'] = $host; + + return $this; + } + + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN attribute. + * + * @return self + */ + public function setAsn($asn) + { + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets source_ip_prefix + * + * @return string|null + */ + public function getSourceIpPrefix() + { + return $this->container['source_ip_prefix']; + } + + /** + * Sets source_ip_prefix + * + * @param string|null $source_ip_prefix Source IP prefix attribute. + * + * @return self + */ + public function setSourceIpPrefix($source_ip_prefix) + { + $this->container['source_ip_prefix'] = $source_ip_prefix; + + return $this; + } + + /** + * Gets additional_attributes + * + * @return string[]|null + */ + public function getAdditionalAttributes() + { + return $this->container['additional_attributes']; + } + + /** + * Sets additional_attributes + * + * @param string[]|null $additional_attributes Attribute category for additional, unlisted attributes used in a rule. + * + * @return self + */ + public function setAdditionalAttributes($additional_attributes) + { + $this->container['additional_attributes'] = $additional_attributes; return $this; } diff --git a/lib/Model/WafExclusionDataAttributes.php b/lib/Model/DdosProtectionRuleAllOf.php similarity index 52% rename from lib/Model/WafExclusionDataAttributes.php rename to lib/Model/DdosProtectionRuleAllOf.php index f8ffc499..3ed12cf4 100644 --- a/lib/Model/WafExclusionDataAttributes.php +++ b/lib/Model/DdosProtectionRuleAllOf.php @@ -1,6 +1,6 @@ 'string', - 'exclusion_type' => 'string', - 'logging' => 'bool', + 'id' => 'string', 'name' => 'string', - 'number' => 'int', - 'variable' => 'string' + 'action' => '\Fastly\Model\DdosProtectionAction', + 'customer_id' => 'string', + 'service_id' => 'string', + 'source_ip' => 'string', + 'country_code' => 'string', + 'host' => 'string', + 'asn' => 'string', + 'source_ip_prefix' => 'string', + 'additional_attributes' => 'string[]' ]; /** @@ -69,12 +74,17 @@ class WafExclusionDataAttributes implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $fastlyFormats = [ - 'condition' => null, - 'exclusion_type' => null, - 'logging' => null, + 'id' => null, 'name' => null, - 'number' => null, - 'variable' => null + 'action' => null, + 'customer_id' => null, + 'service_id' => null, + 'source_ip' => null, + 'country_code' => null, + 'host' => null, + 'asn' => null, + 'source_ip_prefix' => null, + 'additional_attributes' => null ]; /** @@ -104,12 +114,17 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'condition' => 'condition', - 'exclusion_type' => 'exclusion_type', - 'logging' => 'logging', + 'id' => 'id', 'name' => 'name', - 'number' => 'number', - 'variable' => 'variable' + 'action' => 'action', + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', + 'source_ip' => 'source_ip', + 'country_code' => 'country_code', + 'host' => 'host', + 'asn' => 'asn', + 'source_ip_prefix' => 'source_ip_prefix', + 'additional_attributes' => 'additional_attributes' ]; /** @@ -118,12 +133,17 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'condition' => 'setCondition', - 'exclusion_type' => 'setExclusionType', - 'logging' => 'setLogging', + 'id' => 'setId', 'name' => 'setName', - 'number' => 'setNumber', - 'variable' => 'setVariable' + 'action' => 'setAction', + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', + 'source_ip' => 'setSourceIp', + 'country_code' => 'setCountryCode', + 'host' => 'setHost', + 'asn' => 'setAsn', + 'source_ip_prefix' => 'setSourceIpPrefix', + 'additional_attributes' => 'setAdditionalAttributes' ]; /** @@ -132,12 +152,17 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'condition' => 'getCondition', - 'exclusion_type' => 'getExclusionType', - 'logging' => 'getLogging', + 'id' => 'getId', 'name' => 'getName', - 'number' => 'getNumber', - 'variable' => 'getVariable' + 'action' => 'getAction', + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', + 'source_ip' => 'getSourceIp', + 'country_code' => 'getCountryCode', + 'host' => 'getHost', + 'asn' => 'getAsn', + 'source_ip_prefix' => 'getSourceIpPrefix', + 'additional_attributes' => 'getAdditionalAttributes' ]; /** @@ -181,46 +206,6 @@ public function getModelName() return self::$fastlyModelName; } - const EXCLUSION_TYPE_RULE = 'rule'; - const EXCLUSION_TYPE_VARIABLE = 'variable'; - const EXCLUSION_TYPE_WAF = 'waf'; - const VARIABLE_REQ_COOKIES = 'req.cookies'; - const VARIABLE_REQ_HEADERS = 'req.headers'; - const VARIABLE_REQ_POST = 'req.post'; - const VARIABLE_REQ_POST_FILENAME = 'req.post_filename'; - const VARIABLE_REQ_QS = 'req.qs'; - const VARIABLE_NULL = 'null'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExclusionTypeAllowableValues() - { - return [ - self::EXCLUSION_TYPE_RULE, - self::EXCLUSION_TYPE_VARIABLE, - self::EXCLUSION_TYPE_WAF, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getVariableAllowableValues() - { - return [ - self::VARIABLE_REQ_COOKIES, - self::VARIABLE_REQ_HEADERS, - self::VARIABLE_REQ_POST, - self::VARIABLE_REQ_POST_FILENAME, - self::VARIABLE_REQ_QS, - self::VARIABLE_NULL, - ]; - } /** * Associative array for storing property values @@ -237,12 +222,17 @@ public function getVariableAllowableValues() */ public function __construct(array $data = null) { - $this->container['condition'] = $data['condition'] ?? null; - $this->container['exclusion_type'] = $data['exclusion_type'] ?? null; - $this->container['logging'] = $data['logging'] ?? true; + $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['number'] = $data['number'] ?? null; - $this->container['variable'] = $data['variable'] ?? null; + $this->container['action'] = $data['action'] ?? null; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['source_ip'] = $data['source_ip'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['host'] = $data['host'] ?? null; + $this->container['asn'] = $data['asn'] ?? null; + $this->container['source_ip_prefix'] = $data['source_ip_prefix'] ?? null; + $this->container['additional_attributes'] = $data['additional_attributes'] ?? null; } /** @@ -254,24 +244,6 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getExclusionTypeAllowableValues(); - if (!is_null($this->container['exclusion_type']) && !in_array($this->container['exclusion_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'exclusion_type', must be one of '%s'", - $this->container['exclusion_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getVariableAllowableValues(); - if (!is_null($this->container['variable']) && !in_array($this->container['variable'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'variable', must be one of '%s'", - $this->container['variable'], - implode("', '", $allowedValues) - ); - } - return $invalidProperties; } @@ -288,165 +260,265 @@ public function valid() /** - * Gets condition + * Gets id * * @return string|null */ - public function getCondition() + public function getId() { - return $this->container['condition']; + return $this->container['id']; } /** - * Sets condition + * Sets id * - * @param string|null $condition A conditional expression in VCL used to determine if the condition is met. + * @param string|null $id Unique ID of the rule. * * @return self */ - public function setCondition($condition) + public function setId($id) { - $this->container['condition'] = $condition; + $this->container['id'] = $id; return $this; } /** - * Gets exclusion_type + * Gets name * * @return string|null */ - public function getExclusionType() + public function getName() { - return $this->container['exclusion_type']; + return $this->container['name']; } /** - * Sets exclusion_type + * Sets name * - * @param string|null $exclusion_type The type of exclusion. + * @param string|null $name A human-readable name for the rule. * * @return self */ - public function setExclusionType($exclusion_type) - { - $allowedValues = $this->getExclusionTypeAllowableValues(); - if (!is_null($exclusion_type) && !in_array($exclusion_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'exclusion_type', must be one of '%s'", - $exclusion_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['exclusion_type'] = $exclusion_type; + public function setName($name) + { + $this->container['name'] = $name; return $this; } /** - * Gets logging + * Gets action * - * @return bool|null + * @return \Fastly\Model\DdosProtectionAction|null */ - public function getLogging() + public function getAction() { - return $this->container['logging']; + return $this->container['action']; } /** - * Sets logging + * Sets action * - * @param bool|null $logging Whether to generate a log upon matching. + * @param \Fastly\Model\DdosProtectionAction|null $action action * * @return self */ - public function setLogging($logging) + public function setAction($action) { - $this->container['logging'] = $logging; + $this->container['action'] = $action; return $this; } /** - * Gets name + * Gets customer_id * * @return string|null */ - public function getName() + public function getCustomerId() { - return $this->container['name']; + return $this->container['customer_id']; } /** - * Sets name + * Sets customer_id * - * @param string|null $name Name of the exclusion. + * @param string|null $customer_id Alphanumeric string identifying the customer. * * @return self */ - public function setName($name) + public function setCustomerId($customer_id) { - $this->container['name'] = $name; + $this->container['customer_id'] = $customer_id; return $this; } /** - * Gets number + * Gets service_id * - * @return int|null + * @return string|null */ - public function getNumber() + public function getServiceId() { - return $this->container['number']; + return $this->container['service_id']; } /** - * Sets number + * Sets service_id * - * @param int|null $number A numeric ID identifying a WAF exclusion. + * @param string|null $service_id Alphanumeric string identifying the service. * * @return self */ - public function setNumber($number) + public function setServiceId($service_id) { - $this->container['number'] = $number; + $this->container['service_id'] = $service_id; return $this; } /** - * Gets variable + * Gets source_ip * * @return string|null */ - public function getVariable() + public function getSourceIp() { - return $this->container['variable']; + return $this->container['source_ip']; } /** - * Sets variable + * Sets source_ip * - * @param string|null $variable The variable to exclude. An optional selector can be specified after the variable separated by a colon (`:`) to restrict the variable to a particular parameter. Required for `exclusion_type=variable`. + * @param string|null $source_ip Source IP address attribute. * * @return self */ - public function setVariable($variable) - { - $allowedValues = $this->getVariableAllowableValues(); - if (!is_null($variable) && !in_array($variable, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'variable', must be one of '%s'", - $variable, - implode("', '", $allowedValues) - ) - ); - } - $this->container['variable'] = $variable; + public function setSourceIp($source_ip) + { + $this->container['source_ip'] = $source_ip; + + return $this; + } + + /** + * Gets country_code + * + * @return string|null + */ + public function getCountryCode() + { + return $this->container['country_code']; + } + + /** + * Sets country_code + * + * @param string|null $country_code Country code attribute. + * + * @return self + */ + public function setCountryCode($country_code) + { + $this->container['country_code'] = $country_code; + + return $this; + } + + /** + * Gets host + * + * @return string|null + */ + public function getHost() + { + return $this->container['host']; + } + + /** + * Sets host + * + * @param string|null $host Host attribute. + * + * @return self + */ + public function setHost($host) + { + $this->container['host'] = $host; + + return $this; + } + + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN attribute. + * + * @return self + */ + public function setAsn($asn) + { + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets source_ip_prefix + * + * @return string|null + */ + public function getSourceIpPrefix() + { + return $this->container['source_ip_prefix']; + } + + /** + * Sets source_ip_prefix + * + * @param string|null $source_ip_prefix Source IP prefix attribute. + * + * @return self + */ + public function setSourceIpPrefix($source_ip_prefix) + { + $this->container['source_ip_prefix'] = $source_ip_prefix; + + return $this; + } + + /** + * Gets additional_attributes + * + * @return string[]|null + */ + public function getAdditionalAttributes() + { + return $this->container['additional_attributes']; + } + + /** + * Sets additional_attributes + * + * @param string[]|null $additional_attributes Attribute category for additional, unlisted attributes used in a rule. + * + * @return self + */ + public function setAdditionalAttributes($additional_attributes) + { + $this->container['additional_attributes'] = $additional_attributes; return $this; } diff --git a/lib/Model/TypeWafFirewall.php b/lib/Model/DdosProtectionTrafficAttribute.php similarity index 50% rename from lib/Model/TypeWafFirewall.php rename to lib/Model/DdosProtectionTrafficAttribute.php index 63949171..00301d84 100644 --- a/lib/Model/TypeWafFirewall.php +++ b/lib/Model/DdosProtectionTrafficAttribute.php @@ -1,6 +1,6 @@ '\DateTime', - 'deleted_at' => '\DateTime', 'updated_at' => '\DateTime', - 'latest_revision' => 'int', - 'outdated' => 'bool' + 'customer_id' => 'string', + 'service_id' => 'string', + 'attributes' => '\Fastly\Model\DdosProtectionAttributeStats[]' ]; /** @@ -69,10 +69,10 @@ class WafActiveRuleResponseDataAttributes implements ModelInterface, ArrayAccess */ protected static $fastlyFormats = [ 'created_at' => 'date-time', - 'deleted_at' => 'date-time', 'updated_at' => 'date-time', - 'latest_revision' => null, - 'outdated' => null + 'customer_id' => null, + 'service_id' => null, + 'attributes' => null ]; /** @@ -103,10 +103,10 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', 'updated_at' => 'updated_at', - 'latest_revision' => 'latest_revision', - 'outdated' => 'outdated' + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', + 'attributes' => 'attributes' ]; /** @@ -116,10 +116,10 @@ public static function fastlyFormats() */ protected static $setters = [ 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', 'updated_at' => 'setUpdatedAt', - 'latest_revision' => 'setLatestRevision', - 'outdated' => 'setOutdated' + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', + 'attributes' => 'setAttributes' ]; /** @@ -129,10 +129,10 @@ public static function fastlyFormats() */ protected static $getters = [ 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', 'updated_at' => 'getUpdatedAt', - 'latest_revision' => 'getLatestRevision', - 'outdated' => 'getOutdated' + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', + 'attributes' => 'getAttributes' ]; /** @@ -193,10 +193,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['latest_revision'] = $data['latest_revision'] ?? null; - $this->container['outdated'] = $data['outdated'] ?? null; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; } /** @@ -248,97 +248,97 @@ public function setCreatedAt($created_at) } /** - * Gets deleted_at + * Gets updated_at * * @return \DateTime|null */ - public function getDeletedAt() + public function getUpdatedAt() { - return $this->container['deleted_at']; + return $this->container['updated_at']; } /** - * Sets deleted_at + * Sets updated_at * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. + * @param \DateTime|null $updated_at Date and time in ISO 8601 format. * * @return self */ - public function setDeletedAt($deleted_at) + public function setUpdatedAt($updated_at) { - $this->container['deleted_at'] = $deleted_at; + $this->container['updated_at'] = $updated_at; return $this; } /** - * Gets updated_at + * Gets customer_id * - * @return \DateTime|null + * @return string|null */ - public function getUpdatedAt() + public function getCustomerId() { - return $this->container['updated_at']; + return $this->container['customer_id']; } /** - * Sets updated_at + * Sets customer_id * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. + * @param string|null $customer_id Alphanumeric string identifying the customer. * * @return self */ - public function setUpdatedAt($updated_at) + public function setCustomerId($customer_id) { - $this->container['updated_at'] = $updated_at; + $this->container['customer_id'] = $customer_id; return $this; } /** - * Gets latest_revision + * Gets service_id * - * @return int|null + * @return string|null */ - public function getLatestRevision() + public function getServiceId() { - return $this->container['latest_revision']; + return $this->container['service_id']; } /** - * Sets latest_revision + * Sets service_id * - * @param int|null $latest_revision The latest rule revision number that is available for the associated rule revision. + * @param string|null $service_id Alphanumeric string identifying the service. * * @return self */ - public function setLatestRevision($latest_revision) + public function setServiceId($service_id) { - $this->container['latest_revision'] = $latest_revision; + $this->container['service_id'] = $service_id; return $this; } /** - * Gets outdated + * Gets attributes * - * @return bool|null + * @return \Fastly\Model\DdosProtectionAttributeStats[]|null */ - public function getOutdated() + public function getAttributes() { - return $this->container['outdated']; + return $this->container['attributes']; } /** - * Sets outdated + * Sets attributes * - * @param bool|null $outdated Indicates if the associated rule revision is up to date or not. + * @param \Fastly\Model\DdosProtectionAttributeStats[]|null $attributes attributes * * @return self */ - public function setOutdated($outdated) + public function setAttributes($attributes) { - $this->container['outdated'] = $outdated; + $this->container['attributes'] = $attributes; return $this; } diff --git a/lib/Model/WafRule.php b/lib/Model/DdosProtectionTrafficStatsAllOf.php similarity index 79% rename from lib/Model/WafRule.php rename to lib/Model/DdosProtectionTrafficStatsAllOf.php index 40069a1c..36f3bb7f 100644 --- a/lib/Model/WafRule.php +++ b/lib/Model/DdosProtectionTrafficStatsAllOf.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeWafRule', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleAttributes' + 'customer_id' => 'string', + 'service_id' => 'string', + 'attributes' => '\Fastly\Model\DdosProtectionAttributeStats[]' ]; /** @@ -66,8 +66,8 @@ class WafRule implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, + 'customer_id' => null, + 'service_id' => null, 'attributes' => null ]; @@ -98,8 +98,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', 'attributes' => 'attributes' ]; @@ -109,8 +109,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', 'attributes' => 'setAttributes' ]; @@ -120,8 +120,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', 'attributes' => 'getAttributes' ]; @@ -182,8 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; } @@ -212,49 +212,49 @@ public function valid() /** - * Gets type + * Gets customer_id * - * @return \Fastly\Model\TypeWafRule|null + * @return string|null */ - public function getType() + public function getCustomerId() { - return $this->container['type']; + return $this->container['customer_id']; } /** - * Sets type + * Sets customer_id * - * @param \Fastly\Model\TypeWafRule|null $type type + * @param string|null $customer_id Alphanumeric string identifying the customer. * * @return self */ - public function setType($type) + public function setCustomerId($customer_id) { - $this->container['type'] = $type; + $this->container['customer_id'] = $customer_id; return $this; } /** - * Gets id + * Gets service_id * * @return string|null */ - public function getId() + public function getServiceId() { - return $this->container['id']; + return $this->container['service_id']; } /** - * Sets id + * Sets service_id * - * @param string|null $id id + * @param string|null $service_id Alphanumeric string identifying the service. * * @return self */ - public function setId($id) + public function setServiceId($service_id) { - $this->container['id'] = $id; + $this->container['service_id'] = $service_id; return $this; } @@ -262,7 +262,7 @@ public function setId($id) /** * Gets attributes * - * @return \Fastly\Model\WafRuleAttributes|null + * @return \Fastly\Model\DdosProtectionAttributeStats[]|null */ public function getAttributes() { @@ -272,7 +272,7 @@ public function getAttributes() /** * Sets attributes * - * @param \Fastly\Model\WafRuleAttributes|null $attributes attributes + * @param \Fastly\Model\DdosProtectionAttributeStats[]|null $attributes attributes * * @return self */ diff --git a/lib/Model/DomainInspectorResponseBodyGetAllServices.php b/lib/Model/DomainInspectorResponseBodyGetAllServices.php new file mode 100644 index 00000000..2bbc968e --- /dev/null +++ b/lib/Model/DomainInspectorResponseBodyGetAllServices.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseBodyGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_body_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DomainInspectorResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DomainInspectorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DomainInspectorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with Domain Inspector enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseCustomer.php b/lib/Model/DomainInspectorResponseCustomer.php new file mode 100644 index 00000000..c1435496 --- /dev/null +++ b/lib/Model/DomainInspectorResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseEnabledServices.php b/lib/Model/DomainInspectorResponseEnabledServices.php new file mode 100644 index 00000000..8d2de8e4 --- /dev/null +++ b/lib/Model/DomainInspectorResponseEnabledServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseEnabledServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_enabled_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'services' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'services' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'services' => 'services' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['services'] = $data['services'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with Domain Inspector enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainInspectorResponseLinksGetAllServices.php b/lib/Model/DomainInspectorResponseLinksGetAllServices.php new file mode 100644 index 00000000..c1fe1699 --- /dev/null +++ b/lib/Model/DomainInspectorResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainInspectorResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_inspector_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DomainInspectorResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipWafTagsWafTags.php b/lib/Model/DomainInspectorResponseLinksGetAllServicesLinks.php similarity index 88% rename from lib/Model/RelationshipWafTagsWafTags.php rename to lib/Model/DomainInspectorResponseLinksGetAllServicesLinks.php index 6ec14440..ab0e35ae 100644 --- a/lib/Model/RelationshipWafTagsWafTags.php +++ b/lib/Model/DomainInspectorResponseLinksGetAllServicesLinks.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipMemberWafTag[]' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafTagsWafTags implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets self * - * @return \Fastly\Model\RelationshipMemberWafTag[]|null + * @return string|null */ - public function getData() + public function getSelf() { - return $this->container['data']; + return $this->container['self']; } /** - * Sets data + * Sets self * - * @param \Fastly\Model\RelationshipMemberWafTag[]|null $data data + * @param string|null $self Location of resource * * @return self */ - public function setData($data) + public function setSelf($self) { - $this->container['data'] = $data; + $this->container['self'] = $self; return $this; } diff --git a/lib/Model/WafFirewallsResponse.php b/lib/Model/FanoutResponseBodyGetAllServices.php similarity index 70% rename from lib/Model/WafFirewallsResponse.php rename to lib/Model/FanoutResponseBodyGetAllServices.php index dfb9ff4c..03a3edd9 100644 --- a/lib/Model/WafFirewallsResponse.php +++ b/lib/Model/FanoutResponseBodyGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafFirewallResponseData[]', - 'included' => '\Fastly\Model\SchemasWafFirewallVersion[]' + 'product' => '\Fastly\Model\FanoutResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\FanoutResponseLinksGetAllServicesLinks' ]; /** @@ -67,10 +67,10 @@ class WafFirewallsResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null ]; /** @@ -100,10 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' ]; /** @@ -112,10 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' ]; /** @@ -124,10 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' ]; /** @@ -187,10 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -218,97 +218,97 @@ public function valid() /** - * Gets links + * Gets product * - * @return \Fastly\Model\PaginationLinks|null + * @return \Fastly\Model\FanoutResponseProductProduct|null */ - public function getLinks() + public function getProduct() { - return $this->container['links']; + return $this->container['product']; } /** - * Sets links + * Sets product * - * @param \Fastly\Model\PaginationLinks|null $links links + * @param \Fastly\Model\FanoutResponseProductProduct|null $product product * * @return self */ - public function setLinks($links) + public function setProduct($product) { - $this->container['links'] = $links; + $this->container['product'] = $product; return $this; } /** - * Gets meta + * Gets customer * - * @return \Fastly\Model\PaginationMeta|null + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null */ - public function getMeta() + public function getCustomer() { - return $this->container['meta']; + return $this->container['customer']; } /** - * Sets meta + * Sets customer * - * @param \Fastly\Model\PaginationMeta|null $meta meta + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer * * @return self */ - public function setMeta($meta) + public function setCustomer($customer) { - $this->container['meta'] = $meta; + $this->container['customer'] = $customer; return $this; } /** - * Gets data + * Gets services * - * @return \Fastly\Model\WafFirewallResponseData[]|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\WafFirewallResponseData[]|null $data data + * @param string[]|null $services A list of services with Fanout enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } /** - * Gets included + * Gets _links * - * @return \Fastly\Model\SchemasWafFirewallVersion[]|null + * @return \Fastly\Model\FanoutResponseLinksGetAllServicesLinks|null */ - public function getIncluded() + public function getLinks() { - return $this->container['included']; + return $this->container['_links']; } /** - * Sets included + * Sets _links * - * @param \Fastly\Model\SchemasWafFirewallVersion[]|null $included included + * @param \Fastly\Model\FanoutResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setIncluded($included) + public function setLinks($_links) { - $this->container['included'] = $included; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/FanoutResponseCustomer.php b/lib/Model/FanoutResponseCustomer.php new file mode 100644 index 00000000..0ab5c64e --- /dev/null +++ b/lib/Model/FanoutResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FanoutResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'fanout_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WafExclusionResponse.php b/lib/Model/FanoutResponseEnabledServices.php similarity index 87% rename from lib/Model/WafExclusionResponse.php rename to lib/Model/FanoutResponseEnabledServices.php index 6c2fef16..94f12bd8 100644 --- a/lib/Model/WafExclusionResponse.php +++ b/lib/Model/FanoutResponseEnabledServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafExclusionResponseData' + 'services' => 'string[]' ]; /** @@ -64,7 +64,7 @@ class WafExclusionResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'services' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'services' => 'services' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'services' => 'setServices' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'services' => 'getServices' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['services'] = $data['services'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets services * - * @return \Fastly\Model\WafExclusionResponseData|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\WafExclusionResponseData|null $data data + * @param string[]|null $services A list of services with Fanout enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } diff --git a/lib/Model/FanoutResponseLinksGetAllServices.php b/lib/Model/FanoutResponseLinksGetAllServices.php new file mode 100644 index 00000000..1bcccddb --- /dev/null +++ b/lib/Model/FanoutResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class FanoutResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'fanout_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\FanoutResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\FanoutResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\FanoutResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/WafExclusion.php b/lib/Model/FanoutResponseLinksGetAllServicesLinks.php similarity index 88% rename from lib/Model/WafExclusion.php rename to lib/Model/FanoutResponseLinksGetAllServicesLinks.php index 4bdeed45..a0666038 100644 --- a/lib/Model/WafExclusion.php +++ b/lib/Model/FanoutResponseLinksGetAllServicesLinks.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafExclusionData' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class WafExclusion implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets self * - * @return \Fastly\Model\WafExclusionData|null + * @return string|null */ - public function getData() + public function getSelf() { - return $this->container['data']; + return $this->container['self']; } /** - * Sets data + * Sets self * - * @param \Fastly\Model\WafExclusionData|null $data data + * @param string|null $self Location of resource * * @return self */ - public function setData($data) + public function setSelf($self) { - $this->container['data'] = $data; + $this->container['self'] = $self; return $this; } diff --git a/lib/Model/ImageOptimizerResponseBodyGetAllServices.php b/lib/Model/ImageOptimizerResponseBodyGetAllServices.php new file mode 100644 index 00000000..a0f3fd23 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseBodyGetAllServices.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseBodyGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_body_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ImageOptimizerResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ImageOptimizerResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ImageOptimizerResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with Image Optimizer enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseCustomer.php b/lib/Model/ImageOptimizerResponseCustomer.php new file mode 100644 index 00000000..ac336e93 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseEnabledServices.php b/lib/Model/ImageOptimizerResponseEnabledServices.php new file mode 100644 index 00000000..f5996a97 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseEnabledServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseEnabledServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_enabled_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'services' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'services' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'services' => 'services' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['services'] = $data['services'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with Image Optimizer enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseLinksGetAllServices.php b/lib/Model/ImageOptimizerResponseLinksGetAllServices.php new file mode 100644 index 00000000..3aa7e374 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ImageOptimizerResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ImageOptimizerResponseLinksGetAllServicesLinks.php b/lib/Model/ImageOptimizerResponseLinksGetAllServicesLinks.php new file mode 100644 index 00000000..f0737bd6 --- /dev/null +++ b/lib/Model/ImageOptimizerResponseLinksGetAllServicesLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ImageOptimizerResponseLinksGetAllServicesLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'image_optimizer_response_links_get_all_services__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/IncludedWithWafExclusionItem.php b/lib/Model/IncludedWithWafExclusionItem.php deleted file mode 100644 index 91ead809..00000000 --- a/lib/Model/IncludedWithWafExclusionItem.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class IncludedWithWafExclusionItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'included_with_waf_exclusion_item'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafRuleRevision', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleRevisionAttributes' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, - 'attributes' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafRuleRevision|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafRuleRevision|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF rule revision. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafRuleRevisionAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafRuleRevisionAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/InlineResponse2002.php b/lib/Model/InlineResponse2002.php index fd6afea2..53fd4425 100644 --- a/lib/Model/InlineResponse2002.php +++ b/lib/Model/InlineResponse2002.php @@ -53,7 +53,8 @@ class InlineResponse2002 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'expires_at' => 'string' + 'data' => '\Fastly\Model\DdosProtectionEvent[]', + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -64,7 +65,8 @@ class InlineResponse2002 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'expires_at' => null + 'data' => null, + 'meta' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'expires_at' => 'expires_at' + 'data' => 'data', + 'meta' => 'meta' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'expires_at' => 'setExpiresAt' + 'data' => 'setData', + 'meta' => 'setMeta' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'expires_at' => 'getExpiresAt' + 'data' => 'getData', + 'meta' => 'getMeta' ]; /** @@ -172,7 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['expires_at'] = $data['expires_at'] ?? null; + $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -200,25 +206,49 @@ public function valid() /** - * Gets expires_at + * Gets data * - * @return string|null + * @return \Fastly\Model\DdosProtectionEvent[]|null */ - public function getExpiresAt() + public function getData() { - return $this->container['expires_at']; + return $this->container['data']; } /** - * Sets expires_at + * Sets data * - * @param string|null $expires_at Time-stamp (GMT) when the domain_ownership validation will expire. + * @param \Fastly\Model\DdosProtectionEvent[]|null $data data * * @return self */ - public function setExpiresAt($expires_at) + public function setData($data) { - $this->container['expires_at'] = $expires_at; + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \Fastly\Model\PaginationCursorMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; return $this; } diff --git a/lib/Model/InlineResponse2003.php b/lib/Model/InlineResponse2003.php index 945b25a3..cc128e0d 100644 --- a/lib/Model/InlineResponse2003.php +++ b/lib/Model/InlineResponse2003.php @@ -53,7 +53,7 @@ class InlineResponse2003 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\KvStoreDetails[]', + 'data' => '\Fastly\Model\DdosProtectionRule[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\KvStoreDetails[]|null + * @return \Fastly\Model\DdosProtectionRule[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\KvStoreDetails[]|null $data data + * @param \Fastly\Model\DdosProtectionRule[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2004.php b/lib/Model/InlineResponse2004.php index 640420b9..9ede2ead 100644 --- a/lib/Model/InlineResponse2004.php +++ b/lib/Model/InlineResponse2004.php @@ -53,8 +53,7 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => 'string[]', - 'meta' => '\Fastly\Model\PaginationCursorMeta' + 'expires_at' => 'string' ]; /** @@ -65,8 +64,7 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'meta' => null + 'expires_at' => null ]; /** @@ -96,8 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'meta' => 'meta' + 'expires_at' => 'expires_at' ]; /** @@ -106,8 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'meta' => 'setMeta' + 'expires_at' => 'setExpiresAt' ]; /** @@ -116,8 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'meta' => 'getMeta' + 'expires_at' => 'getExpiresAt' ]; /** @@ -177,8 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; + $this->container['expires_at'] = $data['expires_at'] ?? null; } /** @@ -206,49 +200,25 @@ public function valid() /** - * Gets data + * Gets expires_at * - * @return string[]|null + * @return string|null */ - public function getData() + public function getExpiresAt() { - return $this->container['data']; + return $this->container['expires_at']; } /** - * Sets data + * Sets expires_at * - * @param string[]|null $data data + * @param string|null $expires_at Time-stamp (GMT) when the domain_ownership validation will expire. * * @return self */ - public function setData($data) + public function setExpiresAt($expires_at) { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets meta - * - * @return \Fastly\Model\PaginationCursorMeta|null - */ - public function getMeta() - { - return $this->container['meta']; - } - - /** - * Sets meta - * - * @param \Fastly\Model\PaginationCursorMeta|null $meta meta - * - * @return self - */ - public function setMeta($meta) - { - $this->container['meta'] = $meta; + $this->container['expires_at'] = $expires_at; return $this; } diff --git a/lib/Model/InlineResponse2005.php b/lib/Model/InlineResponse2005.php index 8c2d509e..fd3a7226 100644 --- a/lib/Model/InlineResponse2005.php +++ b/lib/Model/InlineResponse2005.php @@ -53,7 +53,7 @@ class InlineResponse2005 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SecretStoreResponse[]', + 'data' => '\Fastly\Model\KvStoreDetails[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\SecretStoreResponse[]|null + * @return \Fastly\Model\KvStoreDetails[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\SecretStoreResponse[]|null $data data + * @param \Fastly\Model\KvStoreDetails[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2006.php b/lib/Model/InlineResponse2006.php index 5e48f43c..fc72ad8a 100644 --- a/lib/Model/InlineResponse2006.php +++ b/lib/Model/InlineResponse2006.php @@ -53,7 +53,7 @@ class InlineResponse2006 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SecretResponse[]', + 'data' => 'string[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\SecretResponse[]|null + * @return string[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\SecretResponse[]|null $data data + * @param string[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2007.php b/lib/Model/InlineResponse2007.php index 0ce858dc..3c116233 100644 --- a/lib/Model/InlineResponse2007.php +++ b/lib/Model/InlineResponse2007.php @@ -53,7 +53,8 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\ServiceAuthorizationResponseData[]' + 'data' => '\Fastly\Model\SecretStoreResponse[]', + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -64,7 +65,8 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'data' => null, + 'meta' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'data' => 'data', + 'meta' => 'meta' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'data' => 'setData', + 'meta' => 'setMeta' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'data' => 'getData', + 'meta' => 'getMeta' ]; /** @@ -173,6 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -202,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\ServiceAuthorizationResponseData[]|null + * @return \Fastly\Model\SecretStoreResponse[]|null */ public function getData() { @@ -212,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\ServiceAuthorizationResponseData[]|null $data data + * @param \Fastly\Model\SecretStoreResponse[]|null $data data * * @return self */ @@ -222,6 +228,30 @@ public function setData($data) return $this; } + + /** + * Gets meta + * + * @return \Fastly\Model\PaginationCursorMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/WafTagsResponseAllOf.php b/lib/Model/InlineResponse2008.php similarity index 86% rename from lib/Model/WafTagsResponseAllOf.php rename to lib/Model/InlineResponse2008.php index f6c1a747..3819e3b7 100644 --- a/lib/Model/WafTagsResponseAllOf.php +++ b/lib/Model/InlineResponse2008.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafTagsResponseDataItem[]', - 'included' => '\Fastly\Model\WafRule[]' + 'data' => '\Fastly\Model\SecretResponse[]', + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -66,7 +66,7 @@ class WafTagsResponseAllOf implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $fastlyFormats = [ 'data' => null, - 'included' => null + 'meta' => null ]; /** @@ -97,7 +97,7 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'data' => 'data', - 'included' => 'included' + 'meta' => 'meta' ]; /** @@ -107,7 +107,7 @@ public static function fastlyFormats() */ protected static $setters = [ 'data' => 'setData', - 'included' => 'setIncluded' + 'meta' => 'setMeta' ]; /** @@ -117,7 +117,7 @@ public static function fastlyFormats() */ protected static $getters = [ 'data' => 'getData', - 'included' => 'getIncluded' + 'meta' => 'getMeta' ]; /** @@ -178,7 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\WafTagsResponseDataItem[]|null + * @return \Fastly\Model\SecretResponse[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\WafTagsResponseDataItem[]|null $data data + * @param \Fastly\Model\SecretResponse[]|null $data data * * @return self */ @@ -230,25 +230,25 @@ public function setData($data) } /** - * Gets included + * Gets meta * - * @return \Fastly\Model\WafRule[]|null + * @return \Fastly\Model\PaginationCursorMeta|null */ - public function getIncluded() + public function getMeta() { - return $this->container['included']; + return $this->container['meta']; } /** - * Sets included + * Sets meta * - * @param \Fastly\Model\WafRule[]|null $included included + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta * * @return self */ - public function setIncluded($included) + public function setMeta($meta) { - $this->container['included'] = $included; + $this->container['meta'] = $meta; return $this; } diff --git a/lib/Model/BulkWafActiveRules.php b/lib/Model/InlineResponse2009.php similarity index 93% rename from lib/Model/BulkWafActiveRules.php rename to lib/Model/InlineResponse2009.php index 03d708ad..ec740a9d 100644 --- a/lib/Model/BulkWafActiveRules.php +++ b/lib/Model/InlineResponse2009.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafActiveRuleData[]' + 'data' => '\Fastly\Model\ServiceAuthorizationResponseData[]' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\WafActiveRuleData[]|null + * @return \Fastly\Model\ServiceAuthorizationResponseData[]|null */ public function getData() { @@ -212,7 +212,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\WafActiveRuleData[]|null $data data + * @param \Fastly\Model\ServiceAuthorizationResponseData[]|null $data data * * @return self */ diff --git a/lib/Model/KvStoreRequestCreate.php b/lib/Model/KvStoreRequestCreate.php index 31aa94d2..9f0980dd 100644 --- a/lib/Model/KvStoreRequestCreate.php +++ b/lib/Model/KvStoreRequestCreate.php @@ -215,7 +215,7 @@ public function getName() /** * Sets name * - * @param string $name A human-readable name for the store. Refer to https://www.fastly.com/documentation/guides/concepts/edge-state/data-stores/#limitations-and-constraints for constraints on the KV store name. + * @param string $name A human-readable name for the store. Refer to https://docs.fastly.com/products/compute-resource-limits#kv-store for limitations on the KV store name. * * @return self */ diff --git a/lib/Model/WafFirewallVersionResponseData.php b/lib/Model/LogAggregationsFilterFieldItem.php similarity index 64% rename from lib/Model/WafFirewallVersionResponseData.php rename to lib/Model/LogAggregationsFilterFieldItem.php index c7c378a2..db4ad2dc 100644 --- a/lib/Model/WafFirewallVersionResponseData.php +++ b/lib/Model/LogAggregationsFilterFieldItem.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class WafFirewallVersionResponseData implements ModelInterface, ArrayAccess, \JsonSerializable +class LogAggregationsFilterFieldItem implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class WafFirewallVersionResponseData implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $fastlyModelName = 'waf_firewall_version_response_data'; + protected static $fastlyModelName = 'log-aggregations-filter-field-item'; /** * Array of property to type mappings. Used for (de)serialization @@ -53,10 +54,9 @@ class WafFirewallVersionResponseData implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafFirewallVersion', - 'attributes' => '\Fastly\Model\WafFirewallVersionResponseDataAttributes', - 'id' => 'string', - 'relationships' => '\Fastly\Model\RelationshipsForWafFirewallVersion' + 'field' => 'string', + 'operator' => 'string', + 'value' => '\Fastly\Model\LogAggregationsValueField' ]; /** @@ -67,10 +67,9 @@ class WafFirewallVersionResponseData implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null, - 'id' => null, - 'relationships' => null + 'field' => null, + 'operator' => null, + 'value' => null ]; /** @@ -100,10 +99,9 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes', - 'id' => 'id', - 'relationships' => 'relationships' + 'field' => 'field', + 'operator' => 'operator', + 'value' => 'value' ]; /** @@ -112,10 +110,9 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes', - 'id' => 'setId', - 'relationships' => 'setRelationships' + 'field' => 'setField', + 'operator' => 'setOperator', + 'value' => 'setValue' ]; /** @@ -124,10 +121,9 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes', - 'id' => 'getId', - 'relationships' => 'getRelationships' + 'field' => 'getField', + 'operator' => 'getOperator', + 'value' => 'getValue' ]; /** @@ -171,6 +167,33 @@ public function getModelName() return self::$fastlyModelName; } + const OPERATOR_EQ = 'eq'; + const OPERATOR_ENDS_WITH = 'ends-with'; + const OPERATOR_IN = 'in'; + const OPERATOR_NOT_IN = 'not_in'; + const OPERATOR_GT = 'gt'; + const OPERATOR_GTE = 'gte'; + const OPERATOR_LT = 'lt'; + const OPERATOR_LTE = 'lte'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOperatorAllowableValues() + { + return [ + self::OPERATOR_EQ, + self::OPERATOR_ENDS_WITH, + self::OPERATOR_IN, + self::OPERATOR_NOT_IN, + self::OPERATOR_GT, + self::OPERATOR_GTE, + self::OPERATOR_LT, + self::OPERATOR_LTE, + ]; + } /** * Associative array for storing property values @@ -187,10 +210,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['field'] = $data['field'] ?? null; + $this->container['operator'] = $data['operator'] ?? null; + $this->container['value'] = $data['value'] ?? null; } /** @@ -202,6 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getOperatorAllowableValues(); + if (!is_null($this->container['operator']) && !in_array($this->container['operator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'operator', must be one of '%s'", + $this->container['operator'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -218,97 +249,83 @@ public function valid() /** - * Gets type - * - * @return \Fastly\Model\TypeWafFirewallVersion|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafFirewallVersion|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes + * Gets field * - * @return \Fastly\Model\WafFirewallVersionResponseDataAttributes|null + * @return string|null */ - public function getAttributes() + public function getField() { - return $this->container['attributes']; + return $this->container['field']; } /** - * Sets attributes + * Sets field * - * @param \Fastly\Model\WafFirewallVersionResponseDataAttributes|null $attributes attributes + * @param string|null $field The log field to which this filter should be applied. * * @return self */ - public function setAttributes($attributes) + public function setField($field) { - $this->container['attributes'] = $attributes; + $this->container['field'] = $field; return $this; } /** - * Gets id + * Gets operator * * @return string|null */ - public function getId() + public function getOperator() { - return $this->container['id']; + return $this->container['operator']; } /** - * Sets id + * Sets operator * - * @param string|null $id Alphanumeric string identifying a Firewall version. + * @param string|null $operator The comparison operator used for this filter. * * @return self */ - public function setId($id) + public function setOperator($operator) { - $this->container['id'] = $id; + $allowedValues = $this->getOperatorAllowableValues(); + if (!is_null($operator) && !in_array($operator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'operator', must be one of '%s'", + $operator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['operator'] = $operator; return $this; } /** - * Gets relationships + * Gets value * - * @return \Fastly\Model\RelationshipsForWafFirewallVersion|null + * @return \Fastly\Model\LogAggregationsValueField|null */ - public function getRelationships() + public function getValue() { - return $this->container['relationships']; + return $this->container['value']; } /** - * Sets relationships + * Sets value * - * @param \Fastly\Model\RelationshipsForWafFirewallVersion|null $relationships relationships + * @param \Fastly\Model\LogAggregationsValueField|null $value value * * @return self */ - public function setRelationships($relationships) + public function setValue($value) { - $this->container['relationships'] = $relationships; + $this->container['value'] = $value; return $this; } diff --git a/lib/Model/WafRuleResponse.php b/lib/Model/LogAggregationsGetResponse.php similarity index 86% rename from lib/Model/WafRuleResponse.php rename to lib/Model/LogAggregationsGetResponse.php index 77317cd7..f13669dd 100644 --- a/lib/Model/WafRuleResponse.php +++ b/lib/Model/LogAggregationsGetResponse.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafRuleResponseData', - 'included' => '\Fastly\Model\IncludedWithWafRuleItem[]' + 'data' => '\Fastly\Model\LogAggregationsResult[]', + 'meta' => '\Fastly\Model\LogAggregationsGetResponseMeta' ]; /** @@ -66,7 +66,7 @@ class WafRuleResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'data' => null, - 'included' => null + 'meta' => null ]; /** @@ -97,7 +97,7 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'data' => 'data', - 'included' => 'included' + 'meta' => 'meta' ]; /** @@ -107,7 +107,7 @@ public static function fastlyFormats() */ protected static $setters = [ 'data' => 'setData', - 'included' => 'setIncluded' + 'meta' => 'setMeta' ]; /** @@ -117,7 +117,7 @@ public static function fastlyFormats() */ protected static $getters = [ 'data' => 'getData', - 'included' => 'getIncluded' + 'meta' => 'getMeta' ]; /** @@ -178,7 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\WafRuleResponseData|null + * @return \Fastly\Model\LogAggregationsResult[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\WafRuleResponseData|null $data data + * @param \Fastly\Model\LogAggregationsResult[]|null $data data * * @return self */ @@ -230,25 +230,25 @@ public function setData($data) } /** - * Gets included + * Gets meta * - * @return \Fastly\Model\IncludedWithWafRuleItem[]|null + * @return \Fastly\Model\LogAggregationsGetResponseMeta|null */ - public function getIncluded() + public function getMeta() { - return $this->container['included']; + return $this->container['meta']; } /** - * Sets included + * Sets meta * - * @param \Fastly\Model\IncludedWithWafRuleItem[]|null $included included + * @param \Fastly\Model\LogAggregationsGetResponseMeta|null $meta meta * * @return self */ - public function setIncluded($included) + public function setMeta($meta) { - $this->container['included'] = $included; + $this->container['meta'] = $meta; return $this; } diff --git a/lib/Model/WafRuleAttributes.php b/lib/Model/LogAggregationsGetResponseMeta.php similarity index 58% rename from lib/Model/WafRuleAttributes.php rename to lib/Model/LogAggregationsGetResponseMeta.php index 3b8923af..438147f1 100644 --- a/lib/Model/WafRuleAttributes.php +++ b/lib/Model/LogAggregationsGetResponseMeta.php @@ -1,6 +1,6 @@ 'int', - 'publisher' => 'string', - 'type' => 'string' + 'service_id' => 'string', + 'start' => 'string', + 'end' => 'string', + 'limit' => 'int', + 'sort' => 'string', + 'filters' => '\Fastly\Model\LogAggregationsGetResponseMetaFilters' ]; /** @@ -66,9 +69,12 @@ class WafRuleAttributes implements ModelInterface, ArrayAccess, \JsonSerializabl * @psalm-var array */ protected static $fastlyFormats = [ - 'modsec_rule_id' => null, - 'publisher' => null, - 'type' => null + 'service_id' => null, + 'start' => null, + 'end' => null, + 'limit' => null, + 'sort' => null, + 'filters' => null ]; /** @@ -98,9 +104,12 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'modsec_rule_id' => 'modsec_rule_id', - 'publisher' => 'publisher', - 'type' => 'type' + 'service_id' => 'service_id', + 'start' => 'start', + 'end' => 'end', + 'limit' => 'limit', + 'sort' => 'sort', + 'filters' => 'filters' ]; /** @@ -109,9 +118,12 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'modsec_rule_id' => 'setModsecRuleId', - 'publisher' => 'setPublisher', - 'type' => 'setType' + 'service_id' => 'setServiceId', + 'start' => 'setStart', + 'end' => 'setEnd', + 'limit' => 'setLimit', + 'sort' => 'setSort', + 'filters' => 'setFilters' ]; /** @@ -120,9 +132,12 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'modsec_rule_id' => 'getModsecRuleId', - 'publisher' => 'getPublisher', - 'type' => 'getType' + 'service_id' => 'getServiceId', + 'start' => 'getStart', + 'end' => 'getEnd', + 'limit' => 'getLimit', + 'sort' => 'getSort', + 'filters' => 'getFilters' ]; /** @@ -166,40 +181,6 @@ public function getModelName() return self::$fastlyModelName; } - const PUBLISHER_FASTLY = 'fastly'; - const PUBLISHER_TRUSTWAVE = 'trustwave'; - const PUBLISHER_OWASP = 'owasp'; - const TYPE_STRICT = 'strict'; - const TYPE_SCORE = 'score'; - const TYPE_THRESHOLD = 'threshold'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getPublisherAllowableValues() - { - return [ - self::PUBLISHER_FASTLY, - self::PUBLISHER_TRUSTWAVE, - self::PUBLISHER_OWASP, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getTypeAllowableValues() - { - return [ - self::TYPE_STRICT, - self::TYPE_SCORE, - self::TYPE_THRESHOLD, - ]; - } /** * Associative array for storing property values @@ -216,9 +197,12 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { - $this->container['modsec_rule_id'] = $data['modsec_rule_id'] ?? null; - $this->container['publisher'] = $data['publisher'] ?? null; - $this->container['type'] = $data['type'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['start'] = $data['start'] ?? null; + $this->container['end'] = $data['end'] ?? null; + $this->container['limit'] = $data['limit'] ?? 20; + $this->container['sort'] = $data['sort'] ?? null; + $this->container['filters'] = $data['filters'] ?? null; } /** @@ -230,22 +214,12 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getPublisherAllowableValues(); - if (!is_null($this->container['publisher']) && !in_array($this->container['publisher'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'publisher', must be one of '%s'", - $this->container['publisher'], - implode("', '", $allowedValues) - ); + if (!is_null($this->container['limit']) && ($this->container['limit'] > 100)) { + $invalidProperties[] = "invalid value for 'limit', must be smaller than or equal to 100."; } - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'type', must be one of '%s'", - $this->container['type'], - implode("', '", $allowedValues) - ); + if (!is_null($this->container['limit']) && ($this->container['limit'] < 1)) { + $invalidProperties[] = "invalid value for 'limit', must be bigger than or equal to 1."; } return $invalidProperties; @@ -264,93 +238,153 @@ public function valid() /** - * Gets modsec_rule_id + * Gets service_id * - * @return int|null + * @return string|null */ - public function getModsecRuleId() + public function getServiceId() { - return $this->container['modsec_rule_id']; + return $this->container['service_id']; } /** - * Sets modsec_rule_id + * Sets service_id * - * @param int|null $modsec_rule_id Corresponding ModSecurity rule ID. + * @param string|null $service_id Specifies the ID of the service for which data should be returned. * * @return self */ - public function setModsecRuleId($modsec_rule_id) + public function setServiceId($service_id) { - $this->container['modsec_rule_id'] = $modsec_rule_id; + $this->container['service_id'] = $service_id; return $this; } /** - * Gets publisher + * Gets start * * @return string|null */ - public function getPublisher() + public function getStart() { - return $this->container['publisher']; + return $this->container['start']; } /** - * Sets publisher + * Sets start * - * @param string|null $publisher Rule publisher. + * @param string|null $start Start time for the query as supplied in the request. * * @return self */ - public function setPublisher($publisher) + public function setStart($start) { - $allowedValues = $this->getPublisherAllowableValues(); - if (!is_null($publisher) && !in_array($publisher, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'publisher', must be one of '%s'", - $publisher, - implode("', '", $allowedValues) - ) - ); - } - $this->container['publisher'] = $publisher; + $this->container['start'] = $start; return $this; } /** - * Gets type + * Gets end * * @return string|null */ - public function getType() + public function getEnd() + { + return $this->container['end']; + } + + /** + * Sets end + * + * @param string|null $end End time for the query as supplied in the request. + * + * @return self + */ + public function setEnd($end) { - return $this->container['type']; + $this->container['end'] = $end; + + return $this; } /** - * Sets type + * Gets limit * - * @param string|null $type The rule's [type](https://docs.fastly.com/en/guides/managing-rules-on-the-fastly-waf#understanding-the-types-of-rules). + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit Number of records per page. * * @return self */ - public function setType($type) + public function setLimit($limit) { - $allowedValues = $this->getTypeAllowableValues(); - if (!is_null($type) && !in_array($type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'type', must be one of '%s'", - $type, - implode("', '", $allowedValues) - ) - ); + + if (!is_null($limit) && ($limit > 100)) { + throw new \InvalidArgumentException('invalid value for $limit when calling LogAggregationsGetResponseMeta., must be smaller than or equal to 100.'); + } + if (!is_null($limit) && ($limit < 1)) { + throw new \InvalidArgumentException('invalid value for $limit when calling LogAggregationsGetResponseMeta., must be bigger than or equal to 1.'); } - $this->container['type'] = $type; + + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets sort + * + * @return string|null + */ + public function getSort() + { + return $this->container['sort']; + } + + /** + * Sets sort + * + * @param string|null $sort Comma-separated list of the series names whose values were used to sort the results. + * + * @return self + */ + public function setSort($sort) + { + $this->container['sort'] = $sort; + + return $this; + } + + /** + * Gets filters + * + * @return \Fastly\Model\LogAggregationsGetResponseMetaFilters|null + */ + public function getFilters() + { + return $this->container['filters']; + } + + /** + * Sets filters + * + * @param \Fastly\Model\LogAggregationsGetResponseMetaFilters|null $filters filters + * + * @return self + */ + public function setFilters($filters) + { + $this->container['filters'] = $filters; return $this; } diff --git a/lib/Model/WafRuleRevisionResponseDataAllOf.php b/lib/Model/LogAggregationsGetResponseMetaFilters.php similarity index 84% rename from lib/Model/WafRuleRevisionResponseDataAllOf.php rename to lib/Model/LogAggregationsGetResponseMetaFilters.php index 2c325699..1abf98e6 100644 --- a/lib/Model/WafRuleRevisionResponseDataAllOf.php +++ b/lib/Model/LogAggregationsGetResponseMetaFilters.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class WafRuleRevisionResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +class LogAggregationsGetResponseMetaFilters implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class WafRuleRevisionResponseDataAllOf implements ModelInterface, ArrayAccess, \ * * @var string */ - protected static $fastlyModelName = 'waf_rule_revision_response_data_allOf'; + protected static $fastlyModelName = 'log_aggregations_get_response_meta_filters'; /** * Array of property to type mappings. Used for (de)serialization @@ -53,7 +54,7 @@ class WafRuleRevisionResponseDataAllOf implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $fastlyTypes = [ - 'relationships' => '\Fastly\Model\RelationshipWafRule' + 'filter_fields' => '\Fastly\Model\LogAggregationsFilterFieldItem[]' ]; /** @@ -64,7 +65,7 @@ class WafRuleRevisionResponseDataAllOf implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $fastlyFormats = [ - 'relationships' => null + 'filter_fields' => null ]; /** @@ -94,7 +95,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'relationships' => 'relationships' + 'filter_fields' => 'filter_fields' ]; /** @@ -103,7 +104,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'relationships' => 'setRelationships' + 'filter_fields' => 'setFilterFields' ]; /** @@ -112,7 +113,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'relationships' => 'getRelationships' + 'filter_fields' => 'getFilterFields' ]; /** @@ -172,7 +173,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['filter_fields'] = $data['filter_fields'] ?? null; } /** @@ -200,25 +201,25 @@ public function valid() /** - * Gets relationships + * Gets filter_fields * - * @return \Fastly\Model\RelationshipWafRule|null + * @return \Fastly\Model\LogAggregationsFilterFieldItem[]|null */ - public function getRelationships() + public function getFilterFields() { - return $this->container['relationships']; + return $this->container['filter_fields']; } /** - * Sets relationships + * Sets filter_fields * - * @param \Fastly\Model\RelationshipWafRule|null $relationships relationships + * @param \Fastly\Model\LogAggregationsFilterFieldItem[]|null $filter_fields filter_fields * * @return self */ - public function setRelationships($relationships) + public function setFilterFields($filter_fields) { - $this->container['relationships'] = $relationships; + $this->container['filter_fields'] = $filter_fields; return $this; } diff --git a/lib/Model/WafRulesResponseAllOf.php b/lib/Model/LogAggregationsResult.php similarity index 81% rename from lib/Model/WafRulesResponseAllOf.php rename to lib/Model/LogAggregationsResult.php index f740c785..11703e7c 100644 --- a/lib/Model/WafRulesResponseAllOf.php +++ b/lib/Model/LogAggregationsResult.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafRuleResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafRuleItem[]' + 'dimensions' => 'array', + 'values' => 'array' ]; /** @@ -65,8 +65,8 @@ class WafRulesResponseAllOf implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'included' => null + 'dimensions' => null, + 'values' => null ]; /** @@ -96,8 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' + 'dimensions' => 'dimensions', + 'values' => 'values' ]; /** @@ -106,8 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' + 'dimensions' => 'setDimensions', + 'values' => 'setValues' ]; /** @@ -116,8 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' + 'dimensions' => 'getDimensions', + 'values' => 'getValues' ]; /** @@ -177,8 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['dimensions'] = $data['dimensions'] ?? null; + $this->container['values'] = $data['values'] ?? null; } /** @@ -206,49 +206,49 @@ public function valid() /** - * Gets data + * Gets dimensions * - * @return \Fastly\Model\WafRuleResponseData[]|null + * @return array|null */ - public function getData() + public function getDimensions() { - return $this->container['data']; + return $this->container['dimensions']; } /** - * Sets data + * Sets dimensions * - * @param \Fastly\Model\WafRuleResponseData[]|null $data data + * @param array|null $dimensions dimensions * * @return self */ - public function setData($data) + public function setDimensions($dimensions) { - $this->container['data'] = $data; + $this->container['dimensions'] = $dimensions; return $this; } /** - * Gets included + * Gets values * - * @return \Fastly\Model\IncludedWithWafRuleItem[]|null + * @return array|null */ - public function getIncluded() + public function getValues() { - return $this->container['included']; + return $this->container['values']; } /** - * Sets included + * Sets values * - * @param \Fastly\Model\IncludedWithWafRuleItem[]|null $included included + * @param array|null $values values * * @return self */ - public function setIncluded($included) + public function setValues($values) { - $this->container['included'] = $included; + $this->container['values'] = $values; return $this; } diff --git a/lib/Model/WafFirewall.php b/lib/Model/LogAggregationsValueField.php similarity index 87% rename from lib/Model/WafFirewall.php rename to lib/Model/LogAggregationsValueField.php index d4c8e23d..44e67c19 100644 --- a/lib/Model/WafFirewall.php +++ b/lib/Model/LogAggregationsValueField.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafFirewallData' + ]; /** @@ -64,7 +64,7 @@ class WafFirewall implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + ]; /** @@ -172,7 +172,6 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; } /** @@ -198,30 +197,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - - /** - * Gets data - * - * @return \Fastly\Model\WafFirewallData|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafFirewallData|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LogExplorerInsightsResponseBodyGetAllServices.php b/lib/Model/LogExplorerInsightsResponseBodyGetAllServices.php new file mode 100644 index 00000000..f43847ed --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseBodyGetAllServices.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseBodyGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_body_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\LogExplorerInsightsResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\LogExplorerInsightsResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\LogExplorerInsightsResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A ist of services with Log Explorer & Insights enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseCustomer.php b/lib/Model/LogExplorerInsightsResponseCustomer.php new file mode 100644 index 00000000..222fb243 --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseEnabledServices.php b/lib/Model/LogExplorerInsightsResponseEnabledServices.php new file mode 100644 index 00000000..cc4d3098 --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseEnabledServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseEnabledServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_enabled_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'services' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'services' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'services' => 'services' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['services'] = $data['services'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A ist of services with Log Explorer & Insights enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseLinksGetAllServices.php b/lib/Model/LogExplorerInsightsResponseLinksGetAllServices.php new file mode 100644 index 00000000..41762814 --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\LogExplorerInsightsResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.php b/lib/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.php new file mode 100644 index 00000000..bc7bf989 --- /dev/null +++ b/lib/Model/LogExplorerInsightsResponseLinksGetAllServicesLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class LogExplorerInsightsResponseLinksGetAllServicesLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'log_explorer_insights_response_links_get_all_services__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/IncludedWithWafActiveRuleItem.php b/lib/Model/LogTimeseriesFilterFieldItem.php similarity index 64% rename from lib/Model/IncludedWithWafActiveRuleItem.php rename to lib/Model/LogTimeseriesFilterFieldItem.php index 64f93e33..6e27f2e9 100644 --- a/lib/Model/IncludedWithWafActiveRuleItem.php +++ b/lib/Model/LogTimeseriesFilterFieldItem.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class IncludedWithWafActiveRuleItem implements ModelInterface, ArrayAccess, \JsonSerializable +class LogTimeseriesFilterFieldItem implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class IncludedWithWafActiveRuleItem implements ModelInterface, ArrayAccess, \Jso * * @var string */ - protected static $fastlyModelName = 'included_with_waf_active_rule_item'; + protected static $fastlyModelName = 'log-timeseries-filter-field-item'; /** * Array of property to type mappings. Used for (de)serialization @@ -53,10 +54,9 @@ class IncludedWithWafActiveRuleItem implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SchemasWafFirewallVersionData', - 'type' => '\Fastly\Model\TypeWafRuleRevision', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleRevisionAttributes' + 'field' => 'string', + 'operator' => 'string', + 'value' => '\Fastly\Model\LogTimeseriesValueField' ]; /** @@ -67,10 +67,9 @@ class IncludedWithWafActiveRuleItem implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'type' => null, - 'id' => null, - 'attributes' => null + 'field' => null, + 'operator' => null, + 'value' => null ]; /** @@ -100,10 +99,9 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes' + 'field' => 'field', + 'operator' => 'operator', + 'value' => 'value' ]; /** @@ -112,10 +110,9 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes' + 'field' => 'setField', + 'operator' => 'setOperator', + 'value' => 'setValue' ]; /** @@ -124,10 +121,9 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes' + 'field' => 'getField', + 'operator' => 'getOperator', + 'value' => 'getValue' ]; /** @@ -171,6 +167,33 @@ public function getModelName() return self::$fastlyModelName; } + const OPERATOR_EQ = 'eq'; + const OPERATOR_ENDS_WITH = 'ends-with'; + const OPERATOR_IN = 'in'; + const OPERATOR_NOT_IN = 'not_in'; + const OPERATOR_GT = 'gt'; + const OPERATOR_GTE = 'gte'; + const OPERATOR_LT = 'lt'; + const OPERATOR_LTE = 'lte'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getOperatorAllowableValues() + { + return [ + self::OPERATOR_EQ, + self::OPERATOR_ENDS_WITH, + self::OPERATOR_IN, + self::OPERATOR_NOT_IN, + self::OPERATOR_GT, + self::OPERATOR_GTE, + self::OPERATOR_LT, + self::OPERATOR_LTE, + ]; + } /** * Associative array for storing property values @@ -187,10 +210,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['field'] = $data['field'] ?? null; + $this->container['operator'] = $data['operator'] ?? null; + $this->container['value'] = $data['value'] ?? null; } /** @@ -202,6 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getOperatorAllowableValues(); + if (!is_null($this->container['operator']) && !in_array($this->container['operator'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'operator', must be one of '%s'", + $this->container['operator'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -218,97 +249,83 @@ public function valid() /** - * Gets data - * - * @return \Fastly\Model\SchemasWafFirewallVersionData|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\SchemasWafFirewallVersionData|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets type + * Gets field * - * @return \Fastly\Model\TypeWafRuleRevision|null + * @return string|null */ - public function getType() + public function getField() { - return $this->container['type']; + return $this->container['field']; } /** - * Sets type + * Sets field * - * @param \Fastly\Model\TypeWafRuleRevision|null $type type + * @param string|null $field The log field to which this filter should be applied. * * @return self */ - public function setType($type) + public function setField($field) { - $this->container['type'] = $type; + $this->container['field'] = $field; return $this; } /** - * Gets id + * Gets operator * * @return string|null */ - public function getId() + public function getOperator() { - return $this->container['id']; + return $this->container['operator']; } /** - * Sets id + * Sets operator * - * @param string|null $id Alphanumeric string identifying a WAF rule revision. + * @param string|null $operator The comparison operator used for this filter. * * @return self */ - public function setId($id) + public function setOperator($operator) { - $this->container['id'] = $id; + $allowedValues = $this->getOperatorAllowableValues(); + if (!is_null($operator) && !in_array($operator, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'operator', must be one of '%s'", + $operator, + implode("', '", $allowedValues) + ) + ); + } + $this->container['operator'] = $operator; return $this; } /** - * Gets attributes + * Gets value * - * @return \Fastly\Model\WafRuleRevisionAttributes|null + * @return \Fastly\Model\LogTimeseriesValueField|null */ - public function getAttributes() + public function getValue() { - return $this->container['attributes']; + return $this->container['value']; } /** - * Sets attributes + * Sets value * - * @param \Fastly\Model\WafRuleRevisionAttributes|null $attributes attributes + * @param \Fastly\Model\LogTimeseriesValueField|null $value value * * @return self */ - public function setAttributes($attributes) + public function setValue($value) { - $this->container['attributes'] = $attributes; + $this->container['value'] = $value; return $this; } diff --git a/lib/Model/WafRuleRevisionResponse.php b/lib/Model/LogTimeseriesGetResponse.php similarity index 86% rename from lib/Model/WafRuleRevisionResponse.php rename to lib/Model/LogTimeseriesGetResponse.php index b534cd84..fe33628a 100644 --- a/lib/Model/WafRuleRevisionResponse.php +++ b/lib/Model/LogTimeseriesGetResponse.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafRuleRevisionResponseData', - 'included' => '\Fastly\Model\WafRule[]' + 'data' => '\Fastly\Model\LogTimeseriesResult[]', + 'meta' => '\Fastly\Model\LogTimeseriesGetResponseMeta' ]; /** @@ -66,7 +66,7 @@ class WafRuleRevisionResponse implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $fastlyFormats = [ 'data' => null, - 'included' => null + 'meta' => null ]; /** @@ -97,7 +97,7 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'data' => 'data', - 'included' => 'included' + 'meta' => 'meta' ]; /** @@ -107,7 +107,7 @@ public static function fastlyFormats() */ protected static $setters = [ 'data' => 'setData', - 'included' => 'setIncluded' + 'meta' => 'setMeta' ]; /** @@ -117,7 +117,7 @@ public static function fastlyFormats() */ protected static $getters = [ 'data' => 'getData', - 'included' => 'getIncluded' + 'meta' => 'getMeta' ]; /** @@ -178,7 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\WafRuleRevisionResponseData|null + * @return \Fastly\Model\LogTimeseriesResult[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\WafRuleRevisionResponseData|null $data data + * @param \Fastly\Model\LogTimeseriesResult[]|null $data data * * @return self */ @@ -230,25 +230,25 @@ public function setData($data) } /** - * Gets included + * Gets meta * - * @return \Fastly\Model\WafRule[]|null + * @return \Fastly\Model\LogTimeseriesGetResponseMeta|null */ - public function getIncluded() + public function getMeta() { - return $this->container['included']; + return $this->container['meta']; } /** - * Sets included + * Sets meta * - * @param \Fastly\Model\WafRule[]|null $included included + * @param \Fastly\Model\LogTimeseriesGetResponseMeta|null $meta meta * * @return self */ - public function setIncluded($included) + public function setMeta($meta) { - $this->container['included'] = $included; + $this->container['meta'] = $meta; return $this; } diff --git a/lib/Model/WafFirewallDataAttributes.php b/lib/Model/LogTimeseriesGetResponseMeta.php similarity index 66% rename from lib/Model/WafFirewallDataAttributes.php rename to lib/Model/LogTimeseriesGetResponseMeta.php index 8ec60141..af947473 100644 --- a/lib/Model/WafFirewallDataAttributes.php +++ b/lib/Model/LogTimeseriesGetResponseMeta.php @@ -1,6 +1,6 @@ 'bool', - 'prefetch_condition' => 'string', - 'response' => 'string', - 'service_version_number' => 'int' + 'service_id' => 'string', + 'start' => 'string', + 'end' => 'string', + 'granularity' => 'string', + 'filters' => '\Fastly\Model\LogTimeseriesGetResponseMetaFilters' ]; /** @@ -67,10 +68,11 @@ class WafFirewallDataAttributes implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $fastlyFormats = [ - 'disabled' => null, - 'prefetch_condition' => null, - 'response' => null, - 'service_version_number' => null + 'service_id' => null, + 'start' => null, + 'end' => null, + 'granularity' => null, + 'filters' => null ]; /** @@ -100,10 +102,11 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'disabled' => 'disabled', - 'prefetch_condition' => 'prefetch_condition', - 'response' => 'response', - 'service_version_number' => 'service_version_number' + 'service_id' => 'service_id', + 'start' => 'start', + 'end' => 'end', + 'granularity' => 'granularity', + 'filters' => 'filters' ]; /** @@ -112,10 +115,11 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'disabled' => 'setDisabled', - 'prefetch_condition' => 'setPrefetchCondition', - 'response' => 'setResponse', - 'service_version_number' => 'setServiceVersionNumber' + 'service_id' => 'setServiceId', + 'start' => 'setStart', + 'end' => 'setEnd', + 'granularity' => 'setGranularity', + 'filters' => 'setFilters' ]; /** @@ -124,10 +128,11 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'disabled' => 'getDisabled', - 'prefetch_condition' => 'getPrefetchCondition', - 'response' => 'getResponse', - 'service_version_number' => 'getServiceVersionNumber' + 'service_id' => 'getServiceId', + 'start' => 'getStart', + 'end' => 'getEnd', + 'granularity' => 'getGranularity', + 'filters' => 'getFilters' ]; /** @@ -187,10 +192,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['disabled'] = $data['disabled'] ?? false; - $this->container['prefetch_condition'] = $data['prefetch_condition'] ?? null; - $this->container['response'] = $data['response'] ?? null; - $this->container['service_version_number'] = $data['service_version_number'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['start'] = $data['start'] ?? null; + $this->container['end'] = $data['end'] ?? null; + $this->container['granularity'] = $data['granularity'] ?? null; + $this->container['filters'] = $data['filters'] ?? null; } /** @@ -218,97 +224,121 @@ public function valid() /** - * Gets disabled + * Gets service_id * - * @return bool|null + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id ID of the service for which data was returned. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; + + return $this; + } + + /** + * Gets start + * + * @return string|null */ - public function getDisabled() + public function getStart() { - return $this->container['disabled']; + return $this->container['start']; } /** - * Sets disabled + * Sets start * - * @param bool|null $disabled The status of the firewall. + * @param string|null $start Start time for the query as supplied in the request. * * @return self */ - public function setDisabled($disabled) + public function setStart($start) { - $this->container['disabled'] = $disabled; + $this->container['start'] = $start; return $this; } /** - * Gets prefetch_condition + * Gets end * * @return string|null */ - public function getPrefetchCondition() + public function getEnd() { - return $this->container['prefetch_condition']; + return $this->container['end']; } /** - * Sets prefetch_condition + * Sets end * - * @param string|null $prefetch_condition Name of the corresponding condition object. + * @param string|null $end End time for the query as supplied in the request. * * @return self */ - public function setPrefetchCondition($prefetch_condition) + public function setEnd($end) { - $this->container['prefetch_condition'] = $prefetch_condition; + $this->container['end'] = $end; return $this; } /** - * Gets response + * Gets granularity * * @return string|null */ - public function getResponse() + public function getGranularity() { - return $this->container['response']; + return $this->container['granularity']; } /** - * Sets response + * Sets granularity * - * @param string|null $response Name of the corresponding response object. + * @param string|null $granularity The granularity of the time buckets in the response. * * @return self */ - public function setResponse($response) + public function setGranularity($granularity) { - $this->container['response'] = $response; + $this->container['granularity'] = $granularity; return $this; } /** - * Gets service_version_number + * Gets filters * - * @return int|null + * @return \Fastly\Model\LogTimeseriesGetResponseMetaFilters|null */ - public function getServiceVersionNumber() + public function getFilters() { - return $this->container['service_version_number']; + return $this->container['filters']; } /** - * Sets service_version_number + * Sets filters * - * @param int|null $service_version_number service_version_number + * @param \Fastly\Model\LogTimeseriesGetResponseMetaFilters|null $filters filters * * @return self */ - public function setServiceVersionNumber($service_version_number) + public function setFilters($filters) { - $this->container['service_version_number'] = $service_version_number; + $this->container['filters'] = $filters; return $this; } diff --git a/lib/Model/WafRuleResponseDataAllOf.php b/lib/Model/LogTimeseriesGetResponseMetaFilters.php similarity index 84% rename from lib/Model/WafRuleResponseDataAllOf.php rename to lib/Model/LogTimeseriesGetResponseMetaFilters.php index e634327a..d2ea22f2 100644 --- a/lib/Model/WafRuleResponseDataAllOf.php +++ b/lib/Model/LogTimeseriesGetResponseMetaFilters.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class WafRuleResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +class LogTimeseriesGetResponseMetaFilters implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class WafRuleResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSeri * * @var string */ - protected static $fastlyModelName = 'waf_rule_response_data_allOf'; + protected static $fastlyModelName = 'log_timeseries_get_response_meta_filters'; /** * Array of property to type mappings. Used for (de)serialization @@ -53,7 +54,7 @@ class WafRuleResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $fastlyTypes = [ - 'relationships' => '\Fastly\Model\RelationshipsForWafRule' + 'filter_fields' => '\Fastly\Model\LogTimeseriesFilterFieldItem[]' ]; /** @@ -64,7 +65,7 @@ class WafRuleResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $fastlyFormats = [ - 'relationships' => null + 'filter_fields' => null ]; /** @@ -94,7 +95,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'relationships' => 'relationships' + 'filter_fields' => 'filter_fields' ]; /** @@ -103,7 +104,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'relationships' => 'setRelationships' + 'filter_fields' => 'setFilterFields' ]; /** @@ -112,7 +113,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'relationships' => 'getRelationships' + 'filter_fields' => 'getFilterFields' ]; /** @@ -172,7 +173,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['filter_fields'] = $data['filter_fields'] ?? null; } /** @@ -200,25 +201,25 @@ public function valid() /** - * Gets relationships + * Gets filter_fields * - * @return \Fastly\Model\RelationshipsForWafRule|null + * @return \Fastly\Model\LogTimeseriesFilterFieldItem[]|null */ - public function getRelationships() + public function getFilterFields() { - return $this->container['relationships']; + return $this->container['filter_fields']; } /** - * Sets relationships + * Sets filter_fields * - * @param \Fastly\Model\RelationshipsForWafRule|null $relationships relationships + * @param \Fastly\Model\LogTimeseriesFilterFieldItem[]|null $filter_fields filter_fields * * @return self */ - public function setRelationships($relationships) + public function setFilterFields($filter_fields) { - $this->container['relationships'] = $relationships; + $this->container['filter_fields'] = $filter_fields; return $this; } diff --git a/lib/Model/WafFirewallResponse.php b/lib/Model/LogTimeseriesResult.php similarity index 81% rename from lib/Model/WafFirewallResponse.php rename to lib/Model/LogTimeseriesResult.php index c7a4ff08..22e6c494 100644 --- a/lib/Model/WafFirewallResponse.php +++ b/lib/Model/LogTimeseriesResult.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafFirewallResponseData', - 'included' => '\Fastly\Model\SchemasWafFirewallVersion[]' + 'dimensions' => '\Fastly\Model\LogTimeseriesResultDimensions', + 'values' => 'array' ]; /** @@ -65,8 +65,8 @@ class WafFirewallResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'included' => null + 'dimensions' => null, + 'values' => null ]; /** @@ -96,8 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' + 'dimensions' => 'dimensions', + 'values' => 'values' ]; /** @@ -106,8 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' + 'dimensions' => 'setDimensions', + 'values' => 'setValues' ]; /** @@ -116,8 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' + 'dimensions' => 'getDimensions', + 'values' => 'getValues' ]; /** @@ -177,8 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['dimensions'] = $data['dimensions'] ?? null; + $this->container['values'] = $data['values'] ?? null; } /** @@ -206,49 +206,49 @@ public function valid() /** - * Gets data + * Gets dimensions * - * @return \Fastly\Model\WafFirewallResponseData|null + * @return \Fastly\Model\LogTimeseriesResultDimensions|null */ - public function getData() + public function getDimensions() { - return $this->container['data']; + return $this->container['dimensions']; } /** - * Sets data + * Sets dimensions * - * @param \Fastly\Model\WafFirewallResponseData|null $data data + * @param \Fastly\Model\LogTimeseriesResultDimensions|null $dimensions dimensions * * @return self */ - public function setData($data) + public function setDimensions($dimensions) { - $this->container['data'] = $data; + $this->container['dimensions'] = $dimensions; return $this; } /** - * Gets included + * Gets values * - * @return \Fastly\Model\SchemasWafFirewallVersion[]|null + * @return array|null */ - public function getIncluded() + public function getValues() { - return $this->container['included']; + return $this->container['values']; } /** - * Sets included + * Sets values * - * @param \Fastly\Model\SchemasWafFirewallVersion[]|null $included included + * @param array|null $values values * * @return self */ - public function setIncluded($included) + public function setValues($values) { - $this->container['included'] = $included; + $this->container['values'] = $values; return $this; } diff --git a/lib/Model/WafTagAttributes.php b/lib/Model/LogTimeseriesResultDimensions.php similarity index 89% rename from lib/Model/WafTagAttributes.php rename to lib/Model/LogTimeseriesResultDimensions.php index c7a2c00a..f706320b 100644 --- a/lib/Model/WafTagAttributes.php +++ b/lib/Model/LogTimeseriesResultDimensions.php @@ -1,6 +1,6 @@ 'string' + 'time' => 'string' ]; /** @@ -64,7 +64,7 @@ class WafTagAttributes implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'name' => null + 'time' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'name' => 'name' + 'time' => 'time' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'name' => 'setName' + 'time' => 'setTime' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'name' => 'getName' + 'time' => 'getTime' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['name'] = $data['name'] ?? null; + $this->container['time'] = $data['time'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets name + * Gets time * * @return string|null */ - public function getName() + public function getTime() { - return $this->container['name']; + return $this->container['time']; } /** - * Sets name + * Sets time * - * @param string|null $name name + * @param string|null $time time * * @return self */ - public function setName($name) + public function setTime($time) { - $this->container['name'] = $name; + $this->container['time'] = $time; return $this; } diff --git a/lib/Model/WafRuleRevisionOrLatest.php b/lib/Model/LogTimeseriesValueField.php similarity index 96% rename from lib/Model/WafRuleRevisionOrLatest.php rename to lib/Model/LogTimeseriesValueField.php index bc658fa6..a0b53d13 100644 --- a/lib/Model/WafRuleRevisionOrLatest.php +++ b/lib/Model/LogTimeseriesValueField.php @@ -1,6 +1,6 @@ '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafFirewallVersionResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafFirewallVersionItem[]' + 'product' => '\Fastly\Model\NgwafResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\NgwafResponseLinksGetAllServicesLinks' ]; /** @@ -67,10 +67,10 @@ class WafFirewallVersionsResponse implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null ]; /** @@ -100,10 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' ]; /** @@ -112,10 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' ]; /** @@ -124,10 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' ]; /** @@ -187,10 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -218,97 +218,97 @@ public function valid() /** - * Gets links + * Gets product * - * @return \Fastly\Model\PaginationLinks|null + * @return \Fastly\Model\NgwafResponseProductProduct|null */ - public function getLinks() + public function getProduct() { - return $this->container['links']; + return $this->container['product']; } /** - * Sets links + * Sets product * - * @param \Fastly\Model\PaginationLinks|null $links links + * @param \Fastly\Model\NgwafResponseProductProduct|null $product product * * @return self */ - public function setLinks($links) + public function setProduct($product) { - $this->container['links'] = $links; + $this->container['product'] = $product; return $this; } /** - * Gets meta + * Gets customer * - * @return \Fastly\Model\PaginationMeta|null + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null */ - public function getMeta() + public function getCustomer() { - return $this->container['meta']; + return $this->container['customer']; } /** - * Sets meta + * Sets customer * - * @param \Fastly\Model\PaginationMeta|null $meta meta + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer * * @return self */ - public function setMeta($meta) + public function setCustomer($customer) { - $this->container['meta'] = $meta; + $this->container['customer'] = $customer; return $this; } /** - * Gets data + * Gets services * - * @return \Fastly\Model\WafFirewallVersionResponseData[]|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\WafFirewallVersionResponseData[]|null $data data + * @param string[]|null $services A list of services with the Next-Gen WAF enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } /** - * Gets included + * Gets _links * - * @return \Fastly\Model\IncludedWithWafFirewallVersionItem[]|null + * @return \Fastly\Model\NgwafResponseLinksGetAllServicesLinks|null */ - public function getIncluded() + public function getLinks() { - return $this->container['included']; + return $this->container['_links']; } /** - * Sets included + * Sets _links * - * @param \Fastly\Model\IncludedWithWafFirewallVersionItem[]|null $included included + * @param \Fastly\Model\NgwafResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setIncluded($included) + public function setLinks($_links) { - $this->container['included'] = $included; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/NgwafResponseCustomer.php b/lib/Model/NgwafResponseCustomer.php new file mode 100644 index 00000000..9e4a48f3 --- /dev/null +++ b/lib/Model/NgwafResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/NgwafResponseEnabledServices.php b/lib/Model/NgwafResponseEnabledServices.php new file mode 100644 index 00000000..4552483e --- /dev/null +++ b/lib/Model/NgwafResponseEnabledServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NgwafResponseEnabledServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ngwaf_response_enabled_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'services' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'services' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'services' => 'services' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['services'] = $data['services'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with the Next-Gen WAF enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipWafFirewallWafFirewall.php b/lib/Model/NgwafResponseLinksGetAllServices.php similarity index 87% rename from lib/Model/RelationshipWafFirewallWafFirewall.php rename to lib/Model/NgwafResponseLinksGetAllServices.php index 73eba728..f6a596aa 100644 --- a/lib/Model/RelationshipWafFirewallWafFirewall.php +++ b/lib/Model/NgwafResponseLinksGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipMemberWafFirewall[]' + '_links' => '\Fastly\Model\NgwafResponseLinksGetAllServicesLinks' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafFirewallWafFirewall implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + '_links' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + '_links' => '_links' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + '_links' => 'setLinks' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + '_links' => 'getLinks' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets _links * - * @return \Fastly\Model\RelationshipMemberWafFirewall[]|null + * @return \Fastly\Model\NgwafResponseLinksGetAllServicesLinks|null */ - public function getData() + public function getLinks() { - return $this->container['data']; + return $this->container['_links']; } /** - * Sets data + * Sets _links * - * @param \Fastly\Model\RelationshipMemberWafFirewall[]|null $data data + * @param \Fastly\Model\NgwafResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setData($data) + public function setLinks($_links) { - $this->container['data'] = $data; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/WafActiveRule.php b/lib/Model/NgwafResponseLinksGetAllServicesLinks.php similarity index 88% rename from lib/Model/WafActiveRule.php rename to lib/Model/NgwafResponseLinksGetAllServicesLinks.php index 6b5f859f..dde5cecc 100644 --- a/lib/Model/WafActiveRule.php +++ b/lib/Model/NgwafResponseLinksGetAllServicesLinks.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafActiveRuleData' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class WafActiveRule implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets self * - * @return \Fastly\Model\WafActiveRuleData|null + * @return string|null */ - public function getData() + public function getSelf() { - return $this->container['data']; + return $this->container['self']; } /** - * Sets data + * Sets self * - * @param \Fastly\Model\WafActiveRuleData|null $data data + * @param string|null $self Location of resource * * @return self */ - public function setData($data) + public function setSelf($self) { - $this->container['data'] = $data; + $this->container['self'] = $self; return $this; } diff --git a/lib/Model/OriginInspectorResponseBodyGetAllServices.php b/lib/Model/OriginInspectorResponseBodyGetAllServices.php new file mode 100644 index 00000000..586e5794 --- /dev/null +++ b/lib/Model/OriginInspectorResponseBodyGetAllServices.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseBodyGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_body_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\OriginInspectorResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\OriginInspectorResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\OriginInspectorResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with Origin Inspector enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseCustomer.php b/lib/Model/OriginInspectorResponseCustomer.php new file mode 100644 index 00000000..ca0c7da8 --- /dev/null +++ b/lib/Model/OriginInspectorResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseEnabledServices.php b/lib/Model/OriginInspectorResponseEnabledServices.php new file mode 100644 index 00000000..9487a3ee --- /dev/null +++ b/lib/Model/OriginInspectorResponseEnabledServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseEnabledServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_enabled_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'services' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'services' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'services' => 'services' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['services'] = $data['services'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services with Origin Inspector enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OriginInspectorResponseLinksGetAllServices.php b/lib/Model/OriginInspectorResponseLinksGetAllServices.php new file mode 100644 index 00000000..92296324 --- /dev/null +++ b/lib/Model/OriginInspectorResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OriginInspectorResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'origin_inspector_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\OriginInspectorResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipWafRuleWafRule.php b/lib/Model/OriginInspectorResponseLinksGetAllServicesLinks.php similarity index 88% rename from lib/Model/RelationshipWafRuleWafRule.php rename to lib/Model/OriginInspectorResponseLinksGetAllServicesLinks.php index d5c18658..f0b558f7 100644 --- a/lib/Model/RelationshipWafRuleWafRule.php +++ b/lib/Model/OriginInspectorResponseLinksGetAllServicesLinks.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipMemberWafRule[]' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafRuleWafRule implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets self * - * @return \Fastly\Model\RelationshipMemberWafRule[]|null + * @return string|null */ - public function getData() + public function getSelf() { - return $this->container['data']; + return $this->container['self']; } /** - * Sets data + * Sets self * - * @param \Fastly\Model\RelationshipMemberWafRule[]|null $data data + * @param string|null $self Location of resource * * @return self */ - public function setData($data) + public function setSelf($self) { - $this->container['data'] = $data; + $this->container['self'] = $self; return $this; } diff --git a/lib/Model/Pop.php b/lib/Model/Pop.php index 42db00a8..3afef0f2 100644 --- a/lib/Model/Pop.php +++ b/lib/Model/Pop.php @@ -197,6 +197,9 @@ public function getModelName() const REGION_EU_CENTRAL = 'EU-Central'; const REGION_EU_EAST = 'EU-East'; const REGION_EU_WEST = 'EU-West'; + const REGION_MX_NORTH = 'MX-North'; + const REGION_MX_CENTRAL = 'MX-Central'; + const REGION_MX_SOUTH = 'MX-South'; const REGION_MIDDLE_EAST = 'Middle-East'; const REGION_NORTH_AMERICA = 'North-America'; const REGION_SA_SOUTH = 'SA-South'; @@ -217,11 +220,13 @@ public function getModelName() const STATS_REGION_USA = 'usa'; const STATS_REGION_ASIA_INDIA = 'asia_india'; const STATS_REGION_ASIA_SOUTHKOREA = 'asia_southkorea'; + const STATS_REGION_MEXICO = 'mexico'; const BILLING_REGION_AFRICA = 'Africa'; const BILLING_REGION_AUSTRALIA = 'Australia'; const BILLING_REGION_ASIA = 'Asia'; const BILLING_REGION_EUROPE = 'Europe'; const BILLING_REGION_INDIA = 'India'; + const BILLING_REGION_MEXICO = 'Mexico'; const BILLING_REGION_NORTH_AMERICA = 'North America'; const BILLING_REGION_SOUTH_KOREA = 'South Korea'; const BILLING_REGION_SOUTH_AMERICA = 'South America'; @@ -240,6 +245,9 @@ public function getRegionAllowableValues() self::REGION_EU_CENTRAL, self::REGION_EU_EAST, self::REGION_EU_WEST, + self::REGION_MX_NORTH, + self::REGION_MX_CENTRAL, + self::REGION_MX_SOUTH, self::REGION_MIDDLE_EAST, self::REGION_NORTH_AMERICA, self::REGION_SA_SOUTH, @@ -271,6 +279,7 @@ public function getStatsRegionAllowableValues() self::STATS_REGION_USA, self::STATS_REGION_ASIA_INDIA, self::STATS_REGION_ASIA_SOUTHKOREA, + self::STATS_REGION_MEXICO, ]; } @@ -287,6 +296,7 @@ public function getBillingRegionAllowableValues() self::BILLING_REGION_ASIA, self::BILLING_REGION_EUROPE, self::BILLING_REGION_INDIA, + self::BILLING_REGION_MEXICO, self::BILLING_REGION_NORTH_AMERICA, self::BILLING_REGION_SOUTH_KOREA, self::BILLING_REGION_SOUTH_AMERICA, diff --git a/lib/Model/RateLimiter.php b/lib/Model/RateLimiter.php index bab6a7ec..3e8fdafc 100644 --- a/lib/Model/RateLimiter.php +++ b/lib/Model/RateLimiter.php @@ -520,7 +520,7 @@ public function getUriDictionaryName() /** * Sets uri_dictionary_name * - * @param string|null $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. + * @param string|null $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. * * @return self */ diff --git a/lib/Model/RateLimiterResponse.php b/lib/Model/RateLimiterResponse.php index cd2e8880..3071163f 100644 --- a/lib/Model/RateLimiterResponse.php +++ b/lib/Model/RateLimiterResponse.php @@ -556,7 +556,7 @@ public function getUriDictionaryName() /** * Sets uri_dictionary_name * - * @param string|null $uri_dictionary_name The name of an Edge Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. + * @param string|null $uri_dictionary_name The name of a Dictionary containing URIs as keys. If not defined or `null`, all origin URIs will be rate limited. * * @return self */ diff --git a/lib/Model/RelationshipMemberWafActiveRule.php b/lib/Model/RelationshipMemberWafActiveRule.php deleted file mode 100644 index 9ce823d1..00000000 --- a/lib/Model/RelationshipMemberWafActiveRule.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipMemberWafActiveRule implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_member_waf_active_rule'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafActiveRule', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafActiveRule|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafActiveRule|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipMemberWafRuleRevision.php b/lib/Model/RelationshipMemberWafRuleRevision.php deleted file mode 100644 index 41958be6..00000000 --- a/lib/Model/RelationshipMemberWafRuleRevision.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipMemberWafRuleRevision implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_member_waf_rule_revision'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafRuleRevision', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafRuleRevision|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafRuleRevision|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF rule revision. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipMemberWafTag.php b/lib/Model/RelationshipMemberWafTag.php deleted file mode 100644 index 4c7bb747..00000000 --- a/lib/Model/RelationshipMemberWafTag.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipMemberWafTag implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_member_waf_tag'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafTag', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafTag|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafTag|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF tag. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipWafActiveRules.php b/lib/Model/RelationshipWafActiveRules.php deleted file mode 100644 index 70074be9..00000000 --- a/lib/Model/RelationshipWafActiveRules.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipWafActiveRules implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_waf_active_rules'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_active_rules' => '\Fastly\Model\RelationshipWafActiveRulesWafActiveRules' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_active_rules' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_active_rules' => 'waf_active_rules' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_active_rules' => 'setWafActiveRules' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_active_rules' => 'getWafActiveRules' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_active_rules'] = $data['waf_active_rules'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_active_rules - * - * @return \Fastly\Model\RelationshipWafActiveRulesWafActiveRules|null - */ - public function getWafActiveRules() - { - return $this->container['waf_active_rules']; - } - - /** - * Sets waf_active_rules - * - * @param \Fastly\Model\RelationshipWafActiveRulesWafActiveRules|null $waf_active_rules waf_active_rules - * - * @return self - */ - public function setWafActiveRules($waf_active_rules) - { - $this->container['waf_active_rules'] = $waf_active_rules; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipWafFirewallVersion.php b/lib/Model/RelationshipWafFirewallVersion.php deleted file mode 100644 index fe74ccb2..00000000 --- a/lib/Model/RelationshipWafFirewallVersion.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipWafFirewallVersion implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_waf_firewall_version'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_firewall_version' => '\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_firewall_version' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_firewall_version' => 'waf_firewall_version' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_firewall_version' => 'setWafFirewallVersion' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_firewall_version' => 'getWafFirewallVersion' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_firewall_version'] = $data['waf_firewall_version'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_firewall_version - * - * @return \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null - */ - public function getWafFirewallVersion() - { - return $this->container['waf_firewall_version']; - } - - /** - * Sets waf_firewall_version - * - * @param \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null $waf_firewall_version waf_firewall_version - * - * @return self - */ - public function setWafFirewallVersion($waf_firewall_version) - { - $this->container['waf_firewall_version'] = $waf_firewall_version; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipWafFirewallVersions.php b/lib/Model/RelationshipWafFirewallVersions.php deleted file mode 100644 index ea9abfdc..00000000 --- a/lib/Model/RelationshipWafFirewallVersions.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipWafFirewallVersions implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_waf_firewall_versions'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_firewall_versions' => '\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_firewall_versions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_firewall_versions' => 'waf_firewall_versions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_firewall_versions' => 'setWafFirewallVersions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_firewall_versions' => 'getWafFirewallVersions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_firewall_versions'] = $data['waf_firewall_versions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_firewall_versions - * - * @return \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null - */ - public function getWafFirewallVersions() - { - return $this->container['waf_firewall_versions']; - } - - /** - * Sets waf_firewall_versions - * - * @param \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null $waf_firewall_versions waf_firewall_versions - * - * @return self - */ - public function setWafFirewallVersions($waf_firewall_versions) - { - $this->container['waf_firewall_versions'] = $waf_firewall_versions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipWafRuleRevision.php b/lib/Model/RelationshipWafRuleRevision.php deleted file mode 100644 index d13d4f66..00000000 --- a/lib/Model/RelationshipWafRuleRevision.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipWafRuleRevision implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_waf_rule_revision'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipWafRuleRevisionWafRuleRevisions.php b/lib/Model/RelationshipWafRuleRevisionWafRuleRevisions.php deleted file mode 100644 index c3809522..00000000 --- a/lib/Model/RelationshipWafRuleRevisionWafRuleRevisions.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipWafRuleRevisionWafRuleRevisions implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_waf_rule_revision_waf_rule_revisions'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\RelationshipMemberWafRuleRevision[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\RelationshipMemberWafRuleRevision[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\RelationshipMemberWafRuleRevision[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipWafRuleRevisions.php b/lib/Model/RelationshipWafRuleRevisions.php deleted file mode 100644 index 0acc29b9..00000000 --- a/lib/Model/RelationshipWafRuleRevisions.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipWafRuleRevisions implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationship_waf_rule_revisions'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipsForWafActiveRule.php b/lib/Model/RelationshipsForWafActiveRule.php deleted file mode 100644 index 62b4f5cd..00000000 --- a/lib/Model/RelationshipsForWafActiveRule.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipsForWafActiveRule implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationships_for_waf_active_rule'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_firewall_version' => '\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion', - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_firewall_version' => null, - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_firewall_version' => 'waf_firewall_version', - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_firewall_version' => 'setWafFirewallVersion', - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_firewall_version' => 'getWafFirewallVersion', - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_firewall_version'] = $data['waf_firewall_version'] ?? null; - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_firewall_version - * - * @return \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null - */ - public function getWafFirewallVersion() - { - return $this->container['waf_firewall_version']; - } - - /** - * Sets waf_firewall_version - * - * @param \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null $waf_firewall_version waf_firewall_version - * - * @return self - */ - public function setWafFirewallVersion($waf_firewall_version) - { - $this->container['waf_firewall_version'] = $waf_firewall_version; - - return $this; - } - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipsForWafExclusion.php b/lib/Model/RelationshipsForWafExclusion.php deleted file mode 100644 index 26187ff8..00000000 --- a/lib/Model/RelationshipsForWafExclusion.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipsForWafExclusion implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationships_for_waf_exclusion'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_rules' => '\Fastly\Model\RelationshipWafRuleWafRule', - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_rules' => null, - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_rules' => 'waf_rules', - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_rules' => 'setWafRules', - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_rules' => 'getWafRules', - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_rules'] = $data['waf_rules'] ?? null; - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_rules - * - * @return \Fastly\Model\RelationshipWafRuleWafRule|null - */ - public function getWafRules() - { - return $this->container['waf_rules']; - } - - /** - * Sets waf_rules - * - * @param \Fastly\Model\RelationshipWafRuleWafRule|null $waf_rules waf_rules - * - * @return self - */ - public function setWafRules($waf_rules) - { - $this->container['waf_rules'] = $waf_rules; - - return $this; - } - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipsForWafFirewallVersion.php b/lib/Model/RelationshipsForWafFirewallVersion.php deleted file mode 100644 index bcf45b1c..00000000 --- a/lib/Model/RelationshipsForWafFirewallVersion.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipsForWafFirewallVersion implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationships_for_waf_firewall_version'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_firewall_versions' => '\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion', - 'waf_active_rules' => '\Fastly\Model\RelationshipWafActiveRulesWafActiveRules' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_firewall_versions' => null, - 'waf_active_rules' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_firewall_versions' => 'waf_firewall_versions', - 'waf_active_rules' => 'waf_active_rules' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_firewall_versions' => 'setWafFirewallVersions', - 'waf_active_rules' => 'setWafActiveRules' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_firewall_versions' => 'getWafFirewallVersions', - 'waf_active_rules' => 'getWafActiveRules' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_firewall_versions'] = $data['waf_firewall_versions'] ?? null; - $this->container['waf_active_rules'] = $data['waf_active_rules'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_firewall_versions - * - * @return \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null - */ - public function getWafFirewallVersions() - { - return $this->container['waf_firewall_versions']; - } - - /** - * Sets waf_firewall_versions - * - * @param \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null $waf_firewall_versions waf_firewall_versions - * - * @return self - */ - public function setWafFirewallVersions($waf_firewall_versions) - { - $this->container['waf_firewall_versions'] = $waf_firewall_versions; - - return $this; - } - - /** - * Gets waf_active_rules - * - * @return \Fastly\Model\RelationshipWafActiveRulesWafActiveRules|null - */ - public function getWafActiveRules() - { - return $this->container['waf_active_rules']; - } - - /** - * Sets waf_active_rules - * - * @param \Fastly\Model\RelationshipWafActiveRulesWafActiveRules|null $waf_active_rules waf_active_rules - * - * @return self - */ - public function setWafActiveRules($waf_active_rules) - { - $this->container['waf_active_rules'] = $waf_active_rules; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/RelationshipsForWafRule.php b/lib/Model/RelationshipsForWafRule.php deleted file mode 100644 index e50141ca..00000000 --- a/lib/Model/RelationshipsForWafRule.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class RelationshipsForWafRule implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'relationships_for_waf_rule'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_tags' => '\Fastly\Model\RelationshipWafTagsWafTags', - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_tags' => null, - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_tags' => 'waf_tags', - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_tags' => 'setWafTags', - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_tags' => 'getWafTags', - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_tags'] = $data['waf_tags'] ?? null; - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_tags - * - * @return \Fastly\Model\RelationshipWafTagsWafTags|null - */ - public function getWafTags() - { - return $this->container['waf_tags']; - } - - /** - * Sets waf_tags - * - * @param \Fastly\Model\RelationshipWafTagsWafTags|null $waf_tags waf_tags - * - * @return self - */ - public function setWafTags($waf_tags) - { - $this->container['waf_tags'] = $waf_tags; - - return $this; - } - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/Resource.php b/lib/Model/Resource.php index ac7c8407..e0917ff9 100644 --- a/lib/Model/Resource.php +++ b/lib/Model/Resource.php @@ -242,7 +242,7 @@ public function getName() /** * Sets name * - * @param string|null $name The name of the resource link. + * @param string|null $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. * * @return self */ diff --git a/lib/Model/ResourceResponse.php b/lib/Model/ResourceResponse.php index 252c56fb..9bd8edb3 100644 --- a/lib/Model/ResourceResponse.php +++ b/lib/Model/ResourceResponse.php @@ -290,7 +290,7 @@ public function getName() /** * Sets name * - * @param string|null $name The name of the resource link. + * @param string|null $name The name of the resource link. Note this is separate from the resource store name and might not match the store name. * * @return self */ diff --git a/lib/Model/SchemasWafFirewallVersion.php b/lib/Model/SchemasWafFirewallVersion.php deleted file mode 100644 index 6b230ffc..00000000 --- a/lib/Model/SchemasWafFirewallVersion.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SchemasWafFirewallVersion implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'schemas-waf_firewall_version'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SchemasWafFirewallVersionData' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\SchemasWafFirewallVersionData|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\SchemasWafFirewallVersionData|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/SchemasWafFirewallVersionData.php b/lib/Model/SchemasWafFirewallVersionData.php deleted file mode 100644 index 82972dc1..00000000 --- a/lib/Model/SchemasWafFirewallVersionData.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class SchemasWafFirewallVersionData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'schemas-waf_firewall_version_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafFirewallVersion', - 'attributes' => '\Fastly\Model\WafFirewallVersionDataAttributes' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafFirewallVersion|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafFirewallVersion|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafFirewallVersionDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafFirewallVersionDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/TypeWafActiveRule.php b/lib/Model/TypeWafActiveRule.php deleted file mode 100644 index 26b1bf9a..00000000 --- a/lib/Model/TypeWafActiveRule.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafActiveRuleData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_active_rule_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafActiveRule', - 'attributes' => '\Fastly\Model\WafActiveRuleDataAttributes', - 'relationships' => '\Fastly\Model\RelationshipsForWafActiveRule' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafActiveRule|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafActiveRule|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafActiveRuleDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafActiveRuleDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipsForWafActiveRule|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipsForWafActiveRule|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafActiveRuleResponseData.php b/lib/Model/WafActiveRuleResponseData.php deleted file mode 100644 index 6a24ad2e..00000000 --- a/lib/Model/WafActiveRuleResponseData.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafActiveRuleResponseData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_active_rule_response_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafActiveRule', - 'attributes' => '\Fastly\Model\WafActiveRuleResponseDataAttributes', - 'relationships' => '\Fastly\Model\WafActiveRuleResponseDataRelationships', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null, - 'relationships' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes', - 'relationships' => 'relationships', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafActiveRule|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafActiveRule|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafActiveRuleResponseDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafActiveRuleResponseDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\WafActiveRuleResponseDataRelationships|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\WafActiveRuleResponseDataRelationships|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafActiveRuleResponseDataAllOf.php b/lib/Model/WafActiveRuleResponseDataAllOf.php deleted file mode 100644 index 92f4b460..00000000 --- a/lib/Model/WafActiveRuleResponseDataAllOf.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafActiveRuleResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_active_rule_response_data_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafActiveRuleResponseDataAttributes', - 'relationships' => '\Fastly\Model\WafActiveRuleResponseDataRelationships' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'id' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafActiveRuleResponseDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafActiveRuleResponseDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\WafActiveRuleResponseDataRelationships|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\WafActiveRuleResponseDataRelationships|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafActiveRuleResponseDataAttributesAllOf.php b/lib/Model/WafActiveRuleResponseDataAttributesAllOf.php deleted file mode 100644 index c2fd6993..00000000 --- a/lib/Model/WafActiveRuleResponseDataAttributesAllOf.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafActiveRuleResponseDataAttributesAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_active_rule_response_data_attributes_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'latest_revision' => 'int', - 'outdated' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'latest_revision' => null, - 'outdated' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'latest_revision' => 'latest_revision', - 'outdated' => 'outdated' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'latest_revision' => 'setLatestRevision', - 'outdated' => 'setOutdated' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'latest_revision' => 'getLatestRevision', - 'outdated' => 'getOutdated' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['latest_revision'] = $data['latest_revision'] ?? null; - $this->container['outdated'] = $data['outdated'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets latest_revision - * - * @return int|null - */ - public function getLatestRevision() - { - return $this->container['latest_revision']; - } - - /** - * Sets latest_revision - * - * @param int|null $latest_revision The latest rule revision number that is available for the associated rule revision. - * - * @return self - */ - public function setLatestRevision($latest_revision) - { - $this->container['latest_revision'] = $latest_revision; - - return $this; - } - - /** - * Gets outdated - * - * @return bool|null - */ - public function getOutdated() - { - return $this->container['outdated']; - } - - /** - * Sets outdated - * - * @param bool|null $outdated Indicates if the associated rule revision is up to date or not. - * - * @return self - */ - public function setOutdated($outdated) - { - $this->container['outdated'] = $outdated; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafActiveRuleResponseDataRelationships.php b/lib/Model/WafActiveRuleResponseDataRelationships.php deleted file mode 100644 index 280fe0ea..00000000 --- a/lib/Model/WafActiveRuleResponseDataRelationships.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafActiveRuleResponseDataRelationships implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_active_rule_response_data_relationships'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_firewall_version' => '\Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion', - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_firewall_version' => null, - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_firewall_version' => 'waf_firewall_version', - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_firewall_version' => 'setWafFirewallVersion', - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_firewall_version' => 'getWafFirewallVersion', - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_firewall_version'] = $data['waf_firewall_version'] ?? null; - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_firewall_version - * - * @return \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null - */ - public function getWafFirewallVersion() - { - return $this->container['waf_firewall_version']; - } - - /** - * Sets waf_firewall_version - * - * @param \Fastly\Model\RelationshipWafFirewallVersionWafFirewallVersion|null $waf_firewall_version waf_firewall_version - * - * @return self - */ - public function setWafFirewallVersion($waf_firewall_version) - { - $this->container['waf_firewall_version'] = $waf_firewall_version; - - return $this; - } - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafActiveRulesResponseAllOf.php b/lib/Model/WafActiveRulesResponseAllOf.php deleted file mode 100644 index 66161f18..00000000 --- a/lib/Model/WafActiveRulesResponseAllOf.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafActiveRulesResponseAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_active_rules_response_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\WafActiveRuleResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafActiveRuleItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\WafActiveRuleResponseData[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafActiveRuleResponseData[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\IncludedWithWafActiveRuleItem[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\IncludedWithWafActiveRuleItem[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafExclusionData.php b/lib/Model/WafExclusionData.php deleted file mode 100644 index cd07c74f..00000000 --- a/lib/Model/WafExclusionData.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafExclusionData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_exclusion_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafExclusion', - 'attributes' => '\Fastly\Model\WafExclusionDataAttributes', - 'relationships' => '\Fastly\Model\RelationshipsForWafExclusion' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafExclusion|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafExclusion|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafExclusionDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafExclusionDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipsForWafExclusion|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipsForWafExclusion|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafExclusionResponseData.php b/lib/Model/WafExclusionResponseData.php deleted file mode 100644 index 3d28eb23..00000000 --- a/lib/Model/WafExclusionResponseData.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafExclusionResponseData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_exclusion_response_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafExclusion', - 'attributes' => '\Fastly\Model\WafExclusionResponseDataAttributes', - 'relationships' => '\Fastly\Model\WafExclusionResponseDataRelationships', - 'id' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null, - 'relationships' => null, - 'id' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes', - 'relationships' => 'relationships', - 'id' => 'id' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships', - 'id' => 'setId' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships', - 'id' => 'getId' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - $this->container['id'] = $data['id'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafExclusion|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafExclusion|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafExclusionResponseDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafExclusionResponseDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\WafExclusionResponseDataRelationships|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\WafExclusionResponseDataRelationships|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF exclusion. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafExclusionResponseDataAttributesAllOf.php b/lib/Model/WafExclusionResponseDataAttributesAllOf.php deleted file mode 100644 index dbb2b271..00000000 --- a/lib/Model/WafExclusionResponseDataAttributesAllOf.php +++ /dev/null @@ -1,542 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafExclusionResponseDataAttributesAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_exclusion_response_data_attributes_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'condition' => 'string', - 'exclusion_type' => 'string', - 'logging' => 'bool', - 'name' => 'string', - 'number' => 'int', - 'variable' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'condition' => null, - 'exclusion_type' => null, - 'logging' => null, - 'name' => null, - 'number' => null, - 'variable' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'condition' => 'condition', - 'exclusion_type' => 'exclusion_type', - 'logging' => 'logging', - 'name' => 'name', - 'number' => 'number', - 'variable' => 'variable' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'condition' => 'setCondition', - 'exclusion_type' => 'setExclusionType', - 'logging' => 'setLogging', - 'name' => 'setName', - 'number' => 'setNumber', - 'variable' => 'setVariable' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'condition' => 'getCondition', - 'exclusion_type' => 'getExclusionType', - 'logging' => 'getLogging', - 'name' => 'getName', - 'number' => 'getNumber', - 'variable' => 'getVariable' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const EXCLUSION_TYPE_RULE = 'rule'; - const EXCLUSION_TYPE_VARIABLE = 'variable'; - const EXCLUSION_TYPE_WAF = 'waf'; - const VARIABLE_REQ_COOKIES = 'req.cookies'; - const VARIABLE_REQ_HEADERS = 'req.headers'; - const VARIABLE_REQ_POST = 'req.post'; - const VARIABLE_REQ_POST_FILENAME = 'req.post_filename'; - const VARIABLE_REQ_QS = 'req.qs'; - const VARIABLE_NULL = 'null'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getExclusionTypeAllowableValues() - { - return [ - self::EXCLUSION_TYPE_RULE, - self::EXCLUSION_TYPE_VARIABLE, - self::EXCLUSION_TYPE_WAF, - ]; - } - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getVariableAllowableValues() - { - return [ - self::VARIABLE_REQ_COOKIES, - self::VARIABLE_REQ_HEADERS, - self::VARIABLE_REQ_POST, - self::VARIABLE_REQ_POST_FILENAME, - self::VARIABLE_REQ_QS, - self::VARIABLE_NULL, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['condition'] = $data['condition'] ?? null; - $this->container['exclusion_type'] = $data['exclusion_type'] ?? null; - $this->container['logging'] = $data['logging'] ?? true; - $this->container['name'] = $data['name'] ?? null; - $this->container['number'] = $data['number'] ?? null; - $this->container['variable'] = $data['variable'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getExclusionTypeAllowableValues(); - if (!is_null($this->container['exclusion_type']) && !in_array($this->container['exclusion_type'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'exclusion_type', must be one of '%s'", - $this->container['exclusion_type'], - implode("', '", $allowedValues) - ); - } - - $allowedValues = $this->getVariableAllowableValues(); - if (!is_null($this->container['variable']) && !in_array($this->container['variable'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'variable', must be one of '%s'", - $this->container['variable'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets condition - * - * @return string|null - */ - public function getCondition() - { - return $this->container['condition']; - } - - /** - * Sets condition - * - * @param string|null $condition A conditional expression in VCL used to determine if the condition is met. - * - * @return self - */ - public function setCondition($condition) - { - $this->container['condition'] = $condition; - - return $this; - } - - /** - * Gets exclusion_type - * - * @return string|null - */ - public function getExclusionType() - { - return $this->container['exclusion_type']; - } - - /** - * Sets exclusion_type - * - * @param string|null $exclusion_type The type of exclusion. - * - * @return self - */ - public function setExclusionType($exclusion_type) - { - $allowedValues = $this->getExclusionTypeAllowableValues(); - if (!is_null($exclusion_type) && !in_array($exclusion_type, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'exclusion_type', must be one of '%s'", - $exclusion_type, - implode("', '", $allowedValues) - ) - ); - } - $this->container['exclusion_type'] = $exclusion_type; - - return $this; - } - - /** - * Gets logging - * - * @return bool|null - */ - public function getLogging() - { - return $this->container['logging']; - } - - /** - * Sets logging - * - * @param bool|null $logging Whether to generate a log upon matching. - * - * @return self - */ - public function setLogging($logging) - { - $this->container['logging'] = $logging; - - return $this; - } - - /** - * Gets name - * - * @return string|null - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string|null $name Name of the exclusion. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets number - * - * @return int|null - */ - public function getNumber() - { - return $this->container['number']; - } - - /** - * Sets number - * - * @param int|null $number A numeric ID identifying a WAF exclusion. - * - * @return self - */ - public function setNumber($number) - { - $this->container['number'] = $number; - - return $this; - } - - /** - * Gets variable - * - * @return string|null - */ - public function getVariable() - { - return $this->container['variable']; - } - - /** - * Sets variable - * - * @param string|null $variable The variable to exclude. An optional selector can be specified after the variable separated by a colon (`:`) to restrict the variable to a particular parameter. Required for `exclusion_type=variable`. - * - * @return self - */ - public function setVariable($variable) - { - $allowedValues = $this->getVariableAllowableValues(); - if (!is_null($variable) && !in_array($variable, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'variable', must be one of '%s'", - $variable, - implode("', '", $allowedValues) - ) - ); - } - $this->container['variable'] = $variable; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafExclusionResponseDataRelationships.php b/lib/Model/WafExclusionResponseDataRelationships.php deleted file mode 100644 index 0fcb457b..00000000 --- a/lib/Model/WafExclusionResponseDataRelationships.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafExclusionResponseDataRelationships implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_exclusion_response_data_relationships'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'waf_rules' => '\Fastly\Model\RelationshipWafRuleWafRule', - 'waf_rule_revisions' => '\Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'waf_rules' => null, - 'waf_rule_revisions' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'waf_rules' => 'waf_rules', - 'waf_rule_revisions' => 'waf_rule_revisions' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'waf_rules' => 'setWafRules', - 'waf_rule_revisions' => 'setWafRuleRevisions' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'waf_rules' => 'getWafRules', - 'waf_rule_revisions' => 'getWafRuleRevisions' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['waf_rules'] = $data['waf_rules'] ?? null; - $this->container['waf_rule_revisions'] = $data['waf_rule_revisions'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets waf_rules - * - * @return \Fastly\Model\RelationshipWafRuleWafRule|null - */ - public function getWafRules() - { - return $this->container['waf_rules']; - } - - /** - * Sets waf_rules - * - * @param \Fastly\Model\RelationshipWafRuleWafRule|null $waf_rules waf_rules - * - * @return self - */ - public function setWafRules($waf_rules) - { - $this->container['waf_rules'] = $waf_rules; - - return $this; - } - - /** - * Gets waf_rule_revisions - * - * @return \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null - */ - public function getWafRuleRevisions() - { - return $this->container['waf_rule_revisions']; - } - - /** - * Sets waf_rule_revisions - * - * @param \Fastly\Model\RelationshipWafRuleRevisionWafRuleRevisions|null $waf_rule_revisions waf_rule_revisions - * - * @return self - */ - public function setWafRuleRevisions($waf_rule_revisions) - { - $this->container['waf_rule_revisions'] = $waf_rule_revisions; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafExclusionsResponseAllOf.php b/lib/Model/WafExclusionsResponseAllOf.php deleted file mode 100644 index 950060a5..00000000 --- a/lib/Model/WafExclusionsResponseAllOf.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafExclusionsResponseAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_exclusions_response_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\WafExclusionResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafExclusionItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\WafExclusionResponseData[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafExclusionResponseData[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\IncludedWithWafExclusionItem[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\IncludedWithWafExclusionItem[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallData.php b/lib/Model/WafFirewallData.php deleted file mode 100644 index d312bbc8..00000000 --- a/lib/Model/WafFirewallData.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafFirewall', - 'attributes' => '\Fastly\Model\WafFirewallDataAttributes' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafFirewall|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafFirewall|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafFirewallDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafFirewallDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallResponseData.php b/lib/Model/WafFirewallResponseData.php deleted file mode 100644 index c4065e07..00000000 --- a/lib/Model/WafFirewallResponseData.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallResponseData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_response_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafFirewall', - 'attributes' => '\Fastly\Model\WafFirewallResponseDataAttributes', - 'id' => 'string', - 'relationships' => '\Fastly\Model\RelationshipWafFirewallVersions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null, - 'id' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes', - 'id' => 'id', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes', - 'id' => 'setId', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes', - 'id' => 'getId', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafFirewall|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafFirewall|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafFirewallResponseDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafFirewallResponseDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipWafFirewallVersions|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipWafFirewallVersions|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallResponseDataAllOf.php b/lib/Model/WafFirewallResponseDataAllOf.php deleted file mode 100644 index 1451a414..00000000 --- a/lib/Model/WafFirewallResponseDataAllOf.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_response_data_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafFirewallResponseDataAttributes', - 'relationships' => '\Fastly\Model\RelationshipWafFirewallVersions' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'id' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id id - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafFirewallResponseDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafFirewallResponseDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipWafFirewallVersions|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipWafFirewallVersions|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallResponseDataAttributes.php b/lib/Model/WafFirewallResponseDataAttributes.php deleted file mode 100644 index 8aa0f2cf..00000000 --- a/lib/Model/WafFirewallResponseDataAttributes.php +++ /dev/null @@ -1,644 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallResponseDataAttributes implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_response_data_attributes'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'service_id' => 'string', - 'active_rules_fastly_block_count' => 'int', - 'active_rules_fastly_log_count' => 'int', - 'active_rules_fastly_score_count' => 'int', - 'active_rules_owasp_block_count' => 'int', - 'active_rules_owasp_log_count' => 'int', - 'active_rules_owasp_score_count' => 'int', - 'active_rules_trustwave_block_count' => 'int', - 'active_rules_trustwave_log_count' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', - 'service_id' => null, - 'active_rules_fastly_block_count' => null, - 'active_rules_fastly_log_count' => null, - 'active_rules_fastly_score_count' => null, - 'active_rules_owasp_block_count' => null, - 'active_rules_owasp_log_count' => null, - 'active_rules_owasp_score_count' => null, - 'active_rules_trustwave_block_count' => null, - 'active_rules_trustwave_log_count' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', - 'service_id' => 'service_id', - 'active_rules_fastly_block_count' => 'active_rules_fastly_block_count', - 'active_rules_fastly_log_count' => 'active_rules_fastly_log_count', - 'active_rules_fastly_score_count' => 'active_rules_fastly_score_count', - 'active_rules_owasp_block_count' => 'active_rules_owasp_block_count', - 'active_rules_owasp_log_count' => 'active_rules_owasp_log_count', - 'active_rules_owasp_score_count' => 'active_rules_owasp_score_count', - 'active_rules_trustwave_block_count' => 'active_rules_trustwave_block_count', - 'active_rules_trustwave_log_count' => 'active_rules_trustwave_log_count' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', - 'service_id' => 'setServiceId', - 'active_rules_fastly_block_count' => 'setActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'setActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'setActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'setActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'setActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'setActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'setActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'setActiveRulesTrustwaveLogCount' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', - 'service_id' => 'getServiceId', - 'active_rules_fastly_block_count' => 'getActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'getActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'getActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'getActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'getActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'getActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'getActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'getActiveRulesTrustwaveLogCount' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['active_rules_fastly_block_count'] = $data['active_rules_fastly_block_count'] ?? null; - $this->container['active_rules_fastly_log_count'] = $data['active_rules_fastly_log_count'] ?? null; - $this->container['active_rules_fastly_score_count'] = $data['active_rules_fastly_score_count'] ?? null; - $this->container['active_rules_owasp_block_count'] = $data['active_rules_owasp_block_count'] ?? null; - $this->container['active_rules_owasp_log_count'] = $data['active_rules_owasp_log_count'] ?? null; - $this->container['active_rules_owasp_score_count'] = $data['active_rules_owasp_score_count'] ?? null; - $this->container['active_rules_trustwave_block_count'] = $data['active_rules_trustwave_block_count'] ?? null; - $this->container['active_rules_trustwave_log_count'] = $data['active_rules_trustwave_log_count'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets service_id - * - * @return string|null - */ - public function getServiceId() - { - return $this->container['service_id']; - } - - /** - * Sets service_id - * - * @param string|null $service_id service_id - * - * @return self - */ - public function setServiceId($service_id) - { - $this->container['service_id'] = $service_id; - - return $this; - } - - /** - * Gets active_rules_fastly_block_count - * - * @return int|null - */ - public function getActiveRulesFastlyBlockCount() - { - return $this->container['active_rules_fastly_block_count']; - } - - /** - * Sets active_rules_fastly_block_count - * - * @param int|null $active_rules_fastly_block_count The number of active Fastly rules set to block on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesFastlyBlockCount($active_rules_fastly_block_count) - { - $this->container['active_rules_fastly_block_count'] = $active_rules_fastly_block_count; - - return $this; - } - - /** - * Gets active_rules_fastly_log_count - * - * @return int|null - */ - public function getActiveRulesFastlyLogCount() - { - return $this->container['active_rules_fastly_log_count']; - } - - /** - * Sets active_rules_fastly_log_count - * - * @param int|null $active_rules_fastly_log_count The number of active Fastly rules set to log on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesFastlyLogCount($active_rules_fastly_log_count) - { - $this->container['active_rules_fastly_log_count'] = $active_rules_fastly_log_count; - - return $this; - } - - /** - * Gets active_rules_fastly_score_count - * - * @return int|null - */ - public function getActiveRulesFastlyScoreCount() - { - return $this->container['active_rules_fastly_score_count']; - } - - /** - * Sets active_rules_fastly_score_count - * - * @param int|null $active_rules_fastly_score_count The number of active Fastly rules set to score on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesFastlyScoreCount($active_rules_fastly_score_count) - { - $this->container['active_rules_fastly_score_count'] = $active_rules_fastly_score_count; - - return $this; - } - - /** - * Gets active_rules_owasp_block_count - * - * @return int|null - */ - public function getActiveRulesOwaspBlockCount() - { - return $this->container['active_rules_owasp_block_count']; - } - - /** - * Sets active_rules_owasp_block_count - * - * @param int|null $active_rules_owasp_block_count The number of active OWASP rules set to block on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesOwaspBlockCount($active_rules_owasp_block_count) - { - $this->container['active_rules_owasp_block_count'] = $active_rules_owasp_block_count; - - return $this; - } - - /** - * Gets active_rules_owasp_log_count - * - * @return int|null - */ - public function getActiveRulesOwaspLogCount() - { - return $this->container['active_rules_owasp_log_count']; - } - - /** - * Sets active_rules_owasp_log_count - * - * @param int|null $active_rules_owasp_log_count The number of active OWASP rules set to log on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesOwaspLogCount($active_rules_owasp_log_count) - { - $this->container['active_rules_owasp_log_count'] = $active_rules_owasp_log_count; - - return $this; - } - - /** - * Gets active_rules_owasp_score_count - * - * @return int|null - */ - public function getActiveRulesOwaspScoreCount() - { - return $this->container['active_rules_owasp_score_count']; - } - - /** - * Sets active_rules_owasp_score_count - * - * @param int|null $active_rules_owasp_score_count The number of active OWASP rules set to score on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesOwaspScoreCount($active_rules_owasp_score_count) - { - $this->container['active_rules_owasp_score_count'] = $active_rules_owasp_score_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_block_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveBlockCount() - { - return $this->container['active_rules_trustwave_block_count']; - } - - /** - * Sets active_rules_trustwave_block_count - * - * @param int|null $active_rules_trustwave_block_count The number of active Trustwave rules set to block on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesTrustwaveBlockCount($active_rules_trustwave_block_count) - { - $this->container['active_rules_trustwave_block_count'] = $active_rules_trustwave_block_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_log_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveLogCount() - { - return $this->container['active_rules_trustwave_log_count']; - } - - /** - * Sets active_rules_trustwave_log_count - * - * @param int|null $active_rules_trustwave_log_count The number of active Trustwave rules set to log on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesTrustwaveLogCount($active_rules_trustwave_log_count) - { - $this->container['active_rules_trustwave_log_count'] = $active_rules_trustwave_log_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallResponseDataAttributesAllOf.php b/lib/Model/WafFirewallResponseDataAttributesAllOf.php deleted file mode 100644 index a6e624b1..00000000 --- a/lib/Model/WafFirewallResponseDataAttributesAllOf.php +++ /dev/null @@ -1,554 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallResponseDataAttributesAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_response_data_attributes_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'service_id' => 'string', - 'active_rules_fastly_block_count' => 'int', - 'active_rules_fastly_log_count' => 'int', - 'active_rules_fastly_score_count' => 'int', - 'active_rules_owasp_block_count' => 'int', - 'active_rules_owasp_log_count' => 'int', - 'active_rules_owasp_score_count' => 'int', - 'active_rules_trustwave_block_count' => 'int', - 'active_rules_trustwave_log_count' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'service_id' => null, - 'active_rules_fastly_block_count' => null, - 'active_rules_fastly_log_count' => null, - 'active_rules_fastly_score_count' => null, - 'active_rules_owasp_block_count' => null, - 'active_rules_owasp_log_count' => null, - 'active_rules_owasp_score_count' => null, - 'active_rules_trustwave_block_count' => null, - 'active_rules_trustwave_log_count' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'service_id' => 'service_id', - 'active_rules_fastly_block_count' => 'active_rules_fastly_block_count', - 'active_rules_fastly_log_count' => 'active_rules_fastly_log_count', - 'active_rules_fastly_score_count' => 'active_rules_fastly_score_count', - 'active_rules_owasp_block_count' => 'active_rules_owasp_block_count', - 'active_rules_owasp_log_count' => 'active_rules_owasp_log_count', - 'active_rules_owasp_score_count' => 'active_rules_owasp_score_count', - 'active_rules_trustwave_block_count' => 'active_rules_trustwave_block_count', - 'active_rules_trustwave_log_count' => 'active_rules_trustwave_log_count' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'service_id' => 'setServiceId', - 'active_rules_fastly_block_count' => 'setActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'setActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'setActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'setActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'setActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'setActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'setActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'setActiveRulesTrustwaveLogCount' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'service_id' => 'getServiceId', - 'active_rules_fastly_block_count' => 'getActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'getActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'getActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'getActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'getActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'getActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'getActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'getActiveRulesTrustwaveLogCount' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['active_rules_fastly_block_count'] = $data['active_rules_fastly_block_count'] ?? null; - $this->container['active_rules_fastly_log_count'] = $data['active_rules_fastly_log_count'] ?? null; - $this->container['active_rules_fastly_score_count'] = $data['active_rules_fastly_score_count'] ?? null; - $this->container['active_rules_owasp_block_count'] = $data['active_rules_owasp_block_count'] ?? null; - $this->container['active_rules_owasp_log_count'] = $data['active_rules_owasp_log_count'] ?? null; - $this->container['active_rules_owasp_score_count'] = $data['active_rules_owasp_score_count'] ?? null; - $this->container['active_rules_trustwave_block_count'] = $data['active_rules_trustwave_block_count'] ?? null; - $this->container['active_rules_trustwave_log_count'] = $data['active_rules_trustwave_log_count'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets service_id - * - * @return string|null - */ - public function getServiceId() - { - return $this->container['service_id']; - } - - /** - * Sets service_id - * - * @param string|null $service_id service_id - * - * @return self - */ - public function setServiceId($service_id) - { - $this->container['service_id'] = $service_id; - - return $this; - } - - /** - * Gets active_rules_fastly_block_count - * - * @return int|null - */ - public function getActiveRulesFastlyBlockCount() - { - return $this->container['active_rules_fastly_block_count']; - } - - /** - * Sets active_rules_fastly_block_count - * - * @param int|null $active_rules_fastly_block_count The number of active Fastly rules set to block on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesFastlyBlockCount($active_rules_fastly_block_count) - { - $this->container['active_rules_fastly_block_count'] = $active_rules_fastly_block_count; - - return $this; - } - - /** - * Gets active_rules_fastly_log_count - * - * @return int|null - */ - public function getActiveRulesFastlyLogCount() - { - return $this->container['active_rules_fastly_log_count']; - } - - /** - * Sets active_rules_fastly_log_count - * - * @param int|null $active_rules_fastly_log_count The number of active Fastly rules set to log on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesFastlyLogCount($active_rules_fastly_log_count) - { - $this->container['active_rules_fastly_log_count'] = $active_rules_fastly_log_count; - - return $this; - } - - /** - * Gets active_rules_fastly_score_count - * - * @return int|null - */ - public function getActiveRulesFastlyScoreCount() - { - return $this->container['active_rules_fastly_score_count']; - } - - /** - * Sets active_rules_fastly_score_count - * - * @param int|null $active_rules_fastly_score_count The number of active Fastly rules set to score on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesFastlyScoreCount($active_rules_fastly_score_count) - { - $this->container['active_rules_fastly_score_count'] = $active_rules_fastly_score_count; - - return $this; - } - - /** - * Gets active_rules_owasp_block_count - * - * @return int|null - */ - public function getActiveRulesOwaspBlockCount() - { - return $this->container['active_rules_owasp_block_count']; - } - - /** - * Sets active_rules_owasp_block_count - * - * @param int|null $active_rules_owasp_block_count The number of active OWASP rules set to block on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesOwaspBlockCount($active_rules_owasp_block_count) - { - $this->container['active_rules_owasp_block_count'] = $active_rules_owasp_block_count; - - return $this; - } - - /** - * Gets active_rules_owasp_log_count - * - * @return int|null - */ - public function getActiveRulesOwaspLogCount() - { - return $this->container['active_rules_owasp_log_count']; - } - - /** - * Sets active_rules_owasp_log_count - * - * @param int|null $active_rules_owasp_log_count The number of active OWASP rules set to log on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesOwaspLogCount($active_rules_owasp_log_count) - { - $this->container['active_rules_owasp_log_count'] = $active_rules_owasp_log_count; - - return $this; - } - - /** - * Gets active_rules_owasp_score_count - * - * @return int|null - */ - public function getActiveRulesOwaspScoreCount() - { - return $this->container['active_rules_owasp_score_count']; - } - - /** - * Sets active_rules_owasp_score_count - * - * @param int|null $active_rules_owasp_score_count The number of active OWASP rules set to score on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesOwaspScoreCount($active_rules_owasp_score_count) - { - $this->container['active_rules_owasp_score_count'] = $active_rules_owasp_score_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_block_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveBlockCount() - { - return $this->container['active_rules_trustwave_block_count']; - } - - /** - * Sets active_rules_trustwave_block_count - * - * @param int|null $active_rules_trustwave_block_count The number of active Trustwave rules set to block on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesTrustwaveBlockCount($active_rules_trustwave_block_count) - { - $this->container['active_rules_trustwave_block_count'] = $active_rules_trustwave_block_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_log_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveLogCount() - { - return $this->container['active_rules_trustwave_log_count']; - } - - /** - * Sets active_rules_trustwave_log_count - * - * @param int|null $active_rules_trustwave_log_count The number of active Trustwave rules set to log on the active or latest firewall version. - * - * @return self - */ - public function setActiveRulesTrustwaveLogCount($active_rules_trustwave_log_count) - { - $this->container['active_rules_trustwave_log_count'] = $active_rules_trustwave_log_count; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersion.php b/lib/Model/WafFirewallVersion.php deleted file mode 100644 index d8740b23..00000000 --- a/lib/Model/WafFirewallVersion.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersion implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\WafFirewallVersionData' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\WafFirewallVersionData|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafFirewallVersionData|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionData.php b/lib/Model/WafFirewallVersionData.php deleted file mode 100644 index 619f2779..00000000 --- a/lib/Model/WafFirewallVersionData.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafFirewallVersion', - 'attributes' => '\Fastly\Model\WafFirewallVersionDataAttributes' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'attributes' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'attributes' => 'attributes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'attributes' => 'setAttributes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'attributes' => 'getAttributes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafFirewallVersion|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafFirewallVersion|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafFirewallVersionDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafFirewallVersionDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionDataAttributes.php b/lib/Model/WafFirewallVersionDataAttributes.php deleted file mode 100644 index 837b032c..00000000 --- a/lib/Model/WafFirewallVersionDataAttributes.php +++ /dev/null @@ -1,1214 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionDataAttributes implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version_data_attributes'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'allowed_http_versions' => 'string', - 'allowed_methods' => 'string', - 'allowed_request_content_type' => 'string', - 'allowed_request_content_type_charset' => 'string', - 'arg_name_length' => 'int', - 'arg_length' => 'int', - 'combined_file_sizes' => 'int', - 'comment' => 'string', - 'critical_anomaly_score' => 'int', - 'crs_validate_utf8_encoding' => 'bool', - 'error_anomaly_score' => 'int', - 'high_risk_country_codes' => 'string', - 'http_violation_score_threshold' => 'int', - 'inbound_anomaly_score_threshold' => 'int', - 'lfi_score_threshold' => 'int', - 'locked' => 'bool', - 'max_file_size' => 'int', - 'max_num_args' => 'int', - 'notice_anomaly_score' => 'int', - 'number' => 'int', - 'paranoia_level' => 'int', - 'php_injection_score_threshold' => 'int', - 'rce_score_threshold' => 'int', - 'restricted_extensions' => 'string', - 'restricted_headers' => 'string', - 'rfi_score_threshold' => 'int', - 'session_fixation_score_threshold' => 'int', - 'sql_injection_score_threshold' => 'int', - 'total_arg_length' => 'int', - 'warning_anomaly_score' => 'int', - 'xss_score_threshold' => 'int' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'allowed_http_versions' => null, - 'allowed_methods' => null, - 'allowed_request_content_type' => null, - 'allowed_request_content_type_charset' => null, - 'arg_name_length' => null, - 'arg_length' => null, - 'combined_file_sizes' => null, - 'comment' => null, - 'critical_anomaly_score' => null, - 'crs_validate_utf8_encoding' => null, - 'error_anomaly_score' => null, - 'high_risk_country_codes' => null, - 'http_violation_score_threshold' => null, - 'inbound_anomaly_score_threshold' => null, - 'lfi_score_threshold' => null, - 'locked' => null, - 'max_file_size' => null, - 'max_num_args' => null, - 'notice_anomaly_score' => null, - 'number' => null, - 'paranoia_level' => null, - 'php_injection_score_threshold' => null, - 'rce_score_threshold' => null, - 'restricted_extensions' => null, - 'restricted_headers' => null, - 'rfi_score_threshold' => null, - 'session_fixation_score_threshold' => null, - 'sql_injection_score_threshold' => null, - 'total_arg_length' => null, - 'warning_anomaly_score' => null, - 'xss_score_threshold' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'allowed_http_versions' => 'allowed_http_versions', - 'allowed_methods' => 'allowed_methods', - 'allowed_request_content_type' => 'allowed_request_content_type', - 'allowed_request_content_type_charset' => 'allowed_request_content_type_charset', - 'arg_name_length' => 'arg_name_length', - 'arg_length' => 'arg_length', - 'combined_file_sizes' => 'combined_file_sizes', - 'comment' => 'comment', - 'critical_anomaly_score' => 'critical_anomaly_score', - 'crs_validate_utf8_encoding' => 'crs_validate_utf8_encoding', - 'error_anomaly_score' => 'error_anomaly_score', - 'high_risk_country_codes' => 'high_risk_country_codes', - 'http_violation_score_threshold' => 'http_violation_score_threshold', - 'inbound_anomaly_score_threshold' => 'inbound_anomaly_score_threshold', - 'lfi_score_threshold' => 'lfi_score_threshold', - 'locked' => 'locked', - 'max_file_size' => 'max_file_size', - 'max_num_args' => 'max_num_args', - 'notice_anomaly_score' => 'notice_anomaly_score', - 'number' => 'number', - 'paranoia_level' => 'paranoia_level', - 'php_injection_score_threshold' => 'php_injection_score_threshold', - 'rce_score_threshold' => 'rce_score_threshold', - 'restricted_extensions' => 'restricted_extensions', - 'restricted_headers' => 'restricted_headers', - 'rfi_score_threshold' => 'rfi_score_threshold', - 'session_fixation_score_threshold' => 'session_fixation_score_threshold', - 'sql_injection_score_threshold' => 'sql_injection_score_threshold', - 'total_arg_length' => 'total_arg_length', - 'warning_anomaly_score' => 'warning_anomaly_score', - 'xss_score_threshold' => 'xss_score_threshold' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'allowed_http_versions' => 'setAllowedHttpVersions', - 'allowed_methods' => 'setAllowedMethods', - 'allowed_request_content_type' => 'setAllowedRequestContentType', - 'allowed_request_content_type_charset' => 'setAllowedRequestContentTypeCharset', - 'arg_name_length' => 'setArgNameLength', - 'arg_length' => 'setArgLength', - 'combined_file_sizes' => 'setCombinedFileSizes', - 'comment' => 'setComment', - 'critical_anomaly_score' => 'setCriticalAnomalyScore', - 'crs_validate_utf8_encoding' => 'setCrsValidateUtf8Encoding', - 'error_anomaly_score' => 'setErrorAnomalyScore', - 'high_risk_country_codes' => 'setHighRiskCountryCodes', - 'http_violation_score_threshold' => 'setHttpViolationScoreThreshold', - 'inbound_anomaly_score_threshold' => 'setInboundAnomalyScoreThreshold', - 'lfi_score_threshold' => 'setLfiScoreThreshold', - 'locked' => 'setLocked', - 'max_file_size' => 'setMaxFileSize', - 'max_num_args' => 'setMaxNumArgs', - 'notice_anomaly_score' => 'setNoticeAnomalyScore', - 'number' => 'setNumber', - 'paranoia_level' => 'setParanoiaLevel', - 'php_injection_score_threshold' => 'setPhpInjectionScoreThreshold', - 'rce_score_threshold' => 'setRceScoreThreshold', - 'restricted_extensions' => 'setRestrictedExtensions', - 'restricted_headers' => 'setRestrictedHeaders', - 'rfi_score_threshold' => 'setRfiScoreThreshold', - 'session_fixation_score_threshold' => 'setSessionFixationScoreThreshold', - 'sql_injection_score_threshold' => 'setSqlInjectionScoreThreshold', - 'total_arg_length' => 'setTotalArgLength', - 'warning_anomaly_score' => 'setWarningAnomalyScore', - 'xss_score_threshold' => 'setXssScoreThreshold' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'allowed_http_versions' => 'getAllowedHttpVersions', - 'allowed_methods' => 'getAllowedMethods', - 'allowed_request_content_type' => 'getAllowedRequestContentType', - 'allowed_request_content_type_charset' => 'getAllowedRequestContentTypeCharset', - 'arg_name_length' => 'getArgNameLength', - 'arg_length' => 'getArgLength', - 'combined_file_sizes' => 'getCombinedFileSizes', - 'comment' => 'getComment', - 'critical_anomaly_score' => 'getCriticalAnomalyScore', - 'crs_validate_utf8_encoding' => 'getCrsValidateUtf8Encoding', - 'error_anomaly_score' => 'getErrorAnomalyScore', - 'high_risk_country_codes' => 'getHighRiskCountryCodes', - 'http_violation_score_threshold' => 'getHttpViolationScoreThreshold', - 'inbound_anomaly_score_threshold' => 'getInboundAnomalyScoreThreshold', - 'lfi_score_threshold' => 'getLfiScoreThreshold', - 'locked' => 'getLocked', - 'max_file_size' => 'getMaxFileSize', - 'max_num_args' => 'getMaxNumArgs', - 'notice_anomaly_score' => 'getNoticeAnomalyScore', - 'number' => 'getNumber', - 'paranoia_level' => 'getParanoiaLevel', - 'php_injection_score_threshold' => 'getPhpInjectionScoreThreshold', - 'rce_score_threshold' => 'getRceScoreThreshold', - 'restricted_extensions' => 'getRestrictedExtensions', - 'restricted_headers' => 'getRestrictedHeaders', - 'rfi_score_threshold' => 'getRfiScoreThreshold', - 'session_fixation_score_threshold' => 'getSessionFixationScoreThreshold', - 'sql_injection_score_threshold' => 'getSqlInjectionScoreThreshold', - 'total_arg_length' => 'getTotalArgLength', - 'warning_anomaly_score' => 'getWarningAnomalyScore', - 'xss_score_threshold' => 'getXssScoreThreshold' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['allowed_http_versions'] = $data['allowed_http_versions'] ?? 'HTTP/1.0 HTTP/1.1 HTTP/2'; - $this->container['allowed_methods'] = $data['allowed_methods'] ?? 'GET HEAD POST OPTIONS PUT PATCH DELETE'; - $this->container['allowed_request_content_type'] = $data['allowed_request_content_type'] ?? 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json|text/plain'; - $this->container['allowed_request_content_type_charset'] = $data['allowed_request_content_type_charset'] ?? 'utf-8|iso-8859-1|iso-8859-15|windows-1252'; - $this->container['arg_name_length'] = $data['arg_name_length'] ?? 100; - $this->container['arg_length'] = $data['arg_length'] ?? 400; - $this->container['combined_file_sizes'] = $data['combined_file_sizes'] ?? 10000000; - $this->container['comment'] = $data['comment'] ?? null; - $this->container['critical_anomaly_score'] = $data['critical_anomaly_score'] ?? 6; - $this->container['crs_validate_utf8_encoding'] = $data['crs_validate_utf8_encoding'] ?? null; - $this->container['error_anomaly_score'] = $data['error_anomaly_score'] ?? 5; - $this->container['high_risk_country_codes'] = $data['high_risk_country_codes'] ?? null; - $this->container['http_violation_score_threshold'] = $data['http_violation_score_threshold'] ?? null; - $this->container['inbound_anomaly_score_threshold'] = $data['inbound_anomaly_score_threshold'] ?? null; - $this->container['lfi_score_threshold'] = $data['lfi_score_threshold'] ?? null; - $this->container['locked'] = $data['locked'] ?? false; - $this->container['max_file_size'] = $data['max_file_size'] ?? 10000000; - $this->container['max_num_args'] = $data['max_num_args'] ?? 255; - $this->container['notice_anomaly_score'] = $data['notice_anomaly_score'] ?? 4; - $this->container['number'] = $data['number'] ?? null; - $this->container['paranoia_level'] = $data['paranoia_level'] ?? 1; - $this->container['php_injection_score_threshold'] = $data['php_injection_score_threshold'] ?? null; - $this->container['rce_score_threshold'] = $data['rce_score_threshold'] ?? null; - $this->container['restricted_extensions'] = $data['restricted_extensions'] ?? '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx'; - $this->container['restricted_headers'] = $data['restricted_headers'] ?? '/proxy/ /lock-token/ /content-range/ /translate/ /if/'; - $this->container['rfi_score_threshold'] = $data['rfi_score_threshold'] ?? null; - $this->container['session_fixation_score_threshold'] = $data['session_fixation_score_threshold'] ?? null; - $this->container['sql_injection_score_threshold'] = $data['sql_injection_score_threshold'] ?? null; - $this->container['total_arg_length'] = $data['total_arg_length'] ?? 6400; - $this->container['warning_anomaly_score'] = $data['warning_anomaly_score'] ?? null; - $this->container['xss_score_threshold'] = $data['xss_score_threshold'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets allowed_http_versions - * - * @return string|null - */ - public function getAllowedHttpVersions() - { - return $this->container['allowed_http_versions']; - } - - /** - * Sets allowed_http_versions - * - * @param string|null $allowed_http_versions Allowed HTTP versions. - * - * @return self - */ - public function setAllowedHttpVersions($allowed_http_versions) - { - $this->container['allowed_http_versions'] = $allowed_http_versions; - - return $this; - } - - /** - * Gets allowed_methods - * - * @return string|null - */ - public function getAllowedMethods() - { - return $this->container['allowed_methods']; - } - - /** - * Sets allowed_methods - * - * @param string|null $allowed_methods A space-separated list of HTTP method names. - * - * @return self - */ - public function setAllowedMethods($allowed_methods) - { - $this->container['allowed_methods'] = $allowed_methods; - - return $this; - } - - /** - * Gets allowed_request_content_type - * - * @return string|null - */ - public function getAllowedRequestContentType() - { - return $this->container['allowed_request_content_type']; - } - - /** - * Sets allowed_request_content_type - * - * @param string|null $allowed_request_content_type Allowed request content types. - * - * @return self - */ - public function setAllowedRequestContentType($allowed_request_content_type) - { - $this->container['allowed_request_content_type'] = $allowed_request_content_type; - - return $this; - } - - /** - * Gets allowed_request_content_type_charset - * - * @return string|null - */ - public function getAllowedRequestContentTypeCharset() - { - return $this->container['allowed_request_content_type_charset']; - } - - /** - * Sets allowed_request_content_type_charset - * - * @param string|null $allowed_request_content_type_charset Allowed request content type charset. - * - * @return self - */ - public function setAllowedRequestContentTypeCharset($allowed_request_content_type_charset) - { - $this->container['allowed_request_content_type_charset'] = $allowed_request_content_type_charset; - - return $this; - } - - /** - * Gets arg_name_length - * - * @return int|null - */ - public function getArgNameLength() - { - return $this->container['arg_name_length']; - } - - /** - * Sets arg_name_length - * - * @param int|null $arg_name_length The maximum allowed argument name length. - * - * @return self - */ - public function setArgNameLength($arg_name_length) - { - $this->container['arg_name_length'] = $arg_name_length; - - return $this; - } - - /** - * Gets arg_length - * - * @return int|null - */ - public function getArgLength() - { - return $this->container['arg_length']; - } - - /** - * Sets arg_length - * - * @param int|null $arg_length The maximum allowed length of an argument. - * - * @return self - */ - public function setArgLength($arg_length) - { - $this->container['arg_length'] = $arg_length; - - return $this; - } - - /** - * Gets combined_file_sizes - * - * @return int|null - */ - public function getCombinedFileSizes() - { - return $this->container['combined_file_sizes']; - } - - /** - * Sets combined_file_sizes - * - * @param int|null $combined_file_sizes The maximum allowed size of all files (in bytes). - * - * @return self - */ - public function setCombinedFileSizes($combined_file_sizes) - { - $this->container['combined_file_sizes'] = $combined_file_sizes; - - return $this; - } - - /** - * Gets comment - * - * @return string|null - */ - public function getComment() - { - return $this->container['comment']; - } - - /** - * Sets comment - * - * @param string|null $comment A freeform descriptive note. - * - * @return self - */ - public function setComment($comment) - { - $this->container['comment'] = $comment; - - return $this; - } - - /** - * Gets critical_anomaly_score - * - * @return int|null - */ - public function getCriticalAnomalyScore() - { - return $this->container['critical_anomaly_score']; - } - - /** - * Sets critical_anomaly_score - * - * @param int|null $critical_anomaly_score Score value to add for critical anomalies. - * - * @return self - */ - public function setCriticalAnomalyScore($critical_anomaly_score) - { - $this->container['critical_anomaly_score'] = $critical_anomaly_score; - - return $this; - } - - /** - * Gets crs_validate_utf8_encoding - * - * @return bool|null - */ - public function getCrsValidateUtf8Encoding() - { - return $this->container['crs_validate_utf8_encoding']; - } - - /** - * Sets crs_validate_utf8_encoding - * - * @param bool|null $crs_validate_utf8_encoding CRS validate UTF8 encoding. - * - * @return self - */ - public function setCrsValidateUtf8Encoding($crs_validate_utf8_encoding) - { - $this->container['crs_validate_utf8_encoding'] = $crs_validate_utf8_encoding; - - return $this; - } - - /** - * Gets error_anomaly_score - * - * @return int|null - */ - public function getErrorAnomalyScore() - { - return $this->container['error_anomaly_score']; - } - - /** - * Sets error_anomaly_score - * - * @param int|null $error_anomaly_score Score value to add for error anomalies. - * - * @return self - */ - public function setErrorAnomalyScore($error_anomaly_score) - { - $this->container['error_anomaly_score'] = $error_anomaly_score; - - return $this; - } - - /** - * Gets high_risk_country_codes - * - * @return string|null - */ - public function getHighRiskCountryCodes() - { - return $this->container['high_risk_country_codes']; - } - - /** - * Sets high_risk_country_codes - * - * @param string|null $high_risk_country_codes A space-separated list of country codes in ISO 3166-1 (two-letter) format. - * - * @return self - */ - public function setHighRiskCountryCodes($high_risk_country_codes) - { - $this->container['high_risk_country_codes'] = $high_risk_country_codes; - - return $this; - } - - /** - * Gets http_violation_score_threshold - * - * @return int|null - */ - public function getHttpViolationScoreThreshold() - { - return $this->container['http_violation_score_threshold']; - } - - /** - * Sets http_violation_score_threshold - * - * @param int|null $http_violation_score_threshold HTTP violation threshold. - * - * @return self - */ - public function setHttpViolationScoreThreshold($http_violation_score_threshold) - { - $this->container['http_violation_score_threshold'] = $http_violation_score_threshold; - - return $this; - } - - /** - * Gets inbound_anomaly_score_threshold - * - * @return int|null - */ - public function getInboundAnomalyScoreThreshold() - { - return $this->container['inbound_anomaly_score_threshold']; - } - - /** - * Sets inbound_anomaly_score_threshold - * - * @param int|null $inbound_anomaly_score_threshold Inbound anomaly threshold. - * - * @return self - */ - public function setInboundAnomalyScoreThreshold($inbound_anomaly_score_threshold) - { - $this->container['inbound_anomaly_score_threshold'] = $inbound_anomaly_score_threshold; - - return $this; - } - - /** - * Gets lfi_score_threshold - * - * @return int|null - */ - public function getLfiScoreThreshold() - { - return $this->container['lfi_score_threshold']; - } - - /** - * Sets lfi_score_threshold - * - * @param int|null $lfi_score_threshold Local file inclusion attack threshold. - * - * @return self - */ - public function setLfiScoreThreshold($lfi_score_threshold) - { - $this->container['lfi_score_threshold'] = $lfi_score_threshold; - - return $this; - } - - /** - * Gets locked - * - * @return bool|null - */ - public function getLocked() - { - return $this->container['locked']; - } - - /** - * Sets locked - * - * @param bool|null $locked Whether a specific firewall version is locked from being modified. - * - * @return self - */ - public function setLocked($locked) - { - $this->container['locked'] = $locked; - - return $this; - } - - /** - * Gets max_file_size - * - * @return int|null - */ - public function getMaxFileSize() - { - return $this->container['max_file_size']; - } - - /** - * Sets max_file_size - * - * @param int|null $max_file_size The maximum allowed file size, in bytes. - * - * @return self - */ - public function setMaxFileSize($max_file_size) - { - $this->container['max_file_size'] = $max_file_size; - - return $this; - } - - /** - * Gets max_num_args - * - * @return int|null - */ - public function getMaxNumArgs() - { - return $this->container['max_num_args']; - } - - /** - * Sets max_num_args - * - * @param int|null $max_num_args The maximum number of arguments allowed. - * - * @return self - */ - public function setMaxNumArgs($max_num_args) - { - $this->container['max_num_args'] = $max_num_args; - - return $this; - } - - /** - * Gets notice_anomaly_score - * - * @return int|null - */ - public function getNoticeAnomalyScore() - { - return $this->container['notice_anomaly_score']; - } - - /** - * Sets notice_anomaly_score - * - * @param int|null $notice_anomaly_score Score value to add for notice anomalies. - * - * @return self - */ - public function setNoticeAnomalyScore($notice_anomaly_score) - { - $this->container['notice_anomaly_score'] = $notice_anomaly_score; - - return $this; - } - - /** - * Gets number - * - * @return int|null - */ - public function getNumber() - { - return $this->container['number']; - } - - /** - * Sets number - * - * @param int|null $number number - * - * @return self - */ - public function setNumber($number) - { - $this->container['number'] = $number; - - return $this; - } - - /** - * Gets paranoia_level - * - * @return int|null - */ - public function getParanoiaLevel() - { - return $this->container['paranoia_level']; - } - - /** - * Sets paranoia_level - * - * @param int|null $paranoia_level The configured paranoia level. - * - * @return self - */ - public function setParanoiaLevel($paranoia_level) - { - $this->container['paranoia_level'] = $paranoia_level; - - return $this; - } - - /** - * Gets php_injection_score_threshold - * - * @return int|null - */ - public function getPhpInjectionScoreThreshold() - { - return $this->container['php_injection_score_threshold']; - } - - /** - * Sets php_injection_score_threshold - * - * @param int|null $php_injection_score_threshold PHP injection threshold. - * - * @return self - */ - public function setPhpInjectionScoreThreshold($php_injection_score_threshold) - { - $this->container['php_injection_score_threshold'] = $php_injection_score_threshold; - - return $this; - } - - /** - * Gets rce_score_threshold - * - * @return int|null - */ - public function getRceScoreThreshold() - { - return $this->container['rce_score_threshold']; - } - - /** - * Sets rce_score_threshold - * - * @param int|null $rce_score_threshold Remote code execution threshold. - * - * @return self - */ - public function setRceScoreThreshold($rce_score_threshold) - { - $this->container['rce_score_threshold'] = $rce_score_threshold; - - return $this; - } - - /** - * Gets restricted_extensions - * - * @return string|null - */ - public function getRestrictedExtensions() - { - return $this->container['restricted_extensions']; - } - - /** - * Sets restricted_extensions - * - * @param string|null $restricted_extensions A space-separated list of allowed file extensions. - * - * @return self - */ - public function setRestrictedExtensions($restricted_extensions) - { - $this->container['restricted_extensions'] = $restricted_extensions; - - return $this; - } - - /** - * Gets restricted_headers - * - * @return string|null - */ - public function getRestrictedHeaders() - { - return $this->container['restricted_headers']; - } - - /** - * Sets restricted_headers - * - * @param string|null $restricted_headers A space-separated list of allowed header names. - * - * @return self - */ - public function setRestrictedHeaders($restricted_headers) - { - $this->container['restricted_headers'] = $restricted_headers; - - return $this; - } - - /** - * Gets rfi_score_threshold - * - * @return int|null - */ - public function getRfiScoreThreshold() - { - return $this->container['rfi_score_threshold']; - } - - /** - * Sets rfi_score_threshold - * - * @param int|null $rfi_score_threshold Remote file inclusion attack threshold. - * - * @return self - */ - public function setRfiScoreThreshold($rfi_score_threshold) - { - $this->container['rfi_score_threshold'] = $rfi_score_threshold; - - return $this; - } - - /** - * Gets session_fixation_score_threshold - * - * @return int|null - */ - public function getSessionFixationScoreThreshold() - { - return $this->container['session_fixation_score_threshold']; - } - - /** - * Sets session_fixation_score_threshold - * - * @param int|null $session_fixation_score_threshold Session fixation attack threshold. - * - * @return self - */ - public function setSessionFixationScoreThreshold($session_fixation_score_threshold) - { - $this->container['session_fixation_score_threshold'] = $session_fixation_score_threshold; - - return $this; - } - - /** - * Gets sql_injection_score_threshold - * - * @return int|null - */ - public function getSqlInjectionScoreThreshold() - { - return $this->container['sql_injection_score_threshold']; - } - - /** - * Sets sql_injection_score_threshold - * - * @param int|null $sql_injection_score_threshold SQL injection attack threshold. - * - * @return self - */ - public function setSqlInjectionScoreThreshold($sql_injection_score_threshold) - { - $this->container['sql_injection_score_threshold'] = $sql_injection_score_threshold; - - return $this; - } - - /** - * Gets total_arg_length - * - * @return int|null - */ - public function getTotalArgLength() - { - return $this->container['total_arg_length']; - } - - /** - * Sets total_arg_length - * - * @param int|null $total_arg_length The maximum size of argument names and values. - * - * @return self - */ - public function setTotalArgLength($total_arg_length) - { - $this->container['total_arg_length'] = $total_arg_length; - - return $this; - } - - /** - * Gets warning_anomaly_score - * - * @return int|null - */ - public function getWarningAnomalyScore() - { - return $this->container['warning_anomaly_score']; - } - - /** - * Sets warning_anomaly_score - * - * @param int|null $warning_anomaly_score Score value to add for warning anomalies. - * - * @return self - */ - public function setWarningAnomalyScore($warning_anomaly_score) - { - $this->container['warning_anomaly_score'] = $warning_anomaly_score; - - return $this; - } - - /** - * Gets xss_score_threshold - * - * @return int|null - */ - public function getXssScoreThreshold() - { - return $this->container['xss_score_threshold']; - } - - /** - * Sets xss_score_threshold - * - * @param int|null $xss_score_threshold XSS attack threshold. - * - * @return self - */ - public function setXssScoreThreshold($xss_score_threshold) - { - $this->container['xss_score_threshold'] = $xss_score_threshold; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionResponse.php b/lib/Model/WafFirewallVersionResponse.php deleted file mode 100644 index 6674f560..00000000 --- a/lib/Model/WafFirewallVersionResponse.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\WafFirewallVersionResponseData', - 'included' => '\Fastly\Model\IncludedWithWafFirewallVersionItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\WafFirewallVersionResponseData|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafFirewallVersionResponseData|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\IncludedWithWafFirewallVersionItem[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\IncludedWithWafFirewallVersionItem[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionResponseDataAllOf.php b/lib/Model/WafFirewallVersionResponseDataAllOf.php deleted file mode 100644 index 3482d122..00000000 --- a/lib/Model/WafFirewallVersionResponseDataAllOf.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionResponseDataAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version_response_data_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafFirewallVersionResponseDataAttributes', - 'relationships' => '\Fastly\Model\RelationshipsForWafFirewallVersion' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'id' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a Firewall version. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafFirewallVersionResponseDataAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafFirewallVersionResponseDataAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipsForWafFirewallVersion|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipsForWafFirewallVersion|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionResponseDataAttributes.php b/lib/Model/WafFirewallVersionResponseDataAttributes.php deleted file mode 100644 index 51710f44..00000000 --- a/lib/Model/WafFirewallVersionResponseDataAttributes.php +++ /dev/null @@ -1,774 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionResponseDataAttributes implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version_response_data_attributes'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'created_at' => '\DateTime', - 'deleted_at' => '\DateTime', - 'updated_at' => '\DateTime', - 'active' => 'bool', - 'active_rules_fastly_block_count' => 'int', - 'active_rules_fastly_log_count' => 'int', - 'active_rules_fastly_score_count' => 'int', - 'active_rules_owasp_block_count' => 'int', - 'active_rules_owasp_log_count' => 'int', - 'active_rules_owasp_score_count' => 'int', - 'active_rules_trustwave_block_count' => 'int', - 'active_rules_trustwave_log_count' => 'int', - 'last_deployment_status' => 'string', - 'deployed_at' => 'string', - 'error' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'created_at' => 'date-time', - 'deleted_at' => 'date-time', - 'updated_at' => 'date-time', - 'active' => null, - 'active_rules_fastly_block_count' => null, - 'active_rules_fastly_log_count' => null, - 'active_rules_fastly_score_count' => null, - 'active_rules_owasp_block_count' => null, - 'active_rules_owasp_log_count' => null, - 'active_rules_owasp_score_count' => null, - 'active_rules_trustwave_block_count' => null, - 'active_rules_trustwave_log_count' => null, - 'last_deployment_status' => null, - 'deployed_at' => null, - 'error' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'created_at' => 'created_at', - 'deleted_at' => 'deleted_at', - 'updated_at' => 'updated_at', - 'active' => 'active', - 'active_rules_fastly_block_count' => 'active_rules_fastly_block_count', - 'active_rules_fastly_log_count' => 'active_rules_fastly_log_count', - 'active_rules_fastly_score_count' => 'active_rules_fastly_score_count', - 'active_rules_owasp_block_count' => 'active_rules_owasp_block_count', - 'active_rules_owasp_log_count' => 'active_rules_owasp_log_count', - 'active_rules_owasp_score_count' => 'active_rules_owasp_score_count', - 'active_rules_trustwave_block_count' => 'active_rules_trustwave_block_count', - 'active_rules_trustwave_log_count' => 'active_rules_trustwave_log_count', - 'last_deployment_status' => 'last_deployment_status', - 'deployed_at' => 'deployed_at', - 'error' => 'error' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'created_at' => 'setCreatedAt', - 'deleted_at' => 'setDeletedAt', - 'updated_at' => 'setUpdatedAt', - 'active' => 'setActive', - 'active_rules_fastly_block_count' => 'setActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'setActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'setActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'setActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'setActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'setActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'setActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'setActiveRulesTrustwaveLogCount', - 'last_deployment_status' => 'setLastDeploymentStatus', - 'deployed_at' => 'setDeployedAt', - 'error' => 'setError' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'created_at' => 'getCreatedAt', - 'deleted_at' => 'getDeletedAt', - 'updated_at' => 'getUpdatedAt', - 'active' => 'getActive', - 'active_rules_fastly_block_count' => 'getActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'getActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'getActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'getActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'getActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'getActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'getActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'getActiveRulesTrustwaveLogCount', - 'last_deployment_status' => 'getLastDeploymentStatus', - 'deployed_at' => 'getDeployedAt', - 'error' => 'getError' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const LAST_DEPLOYMENT_STATUS_NULL = 'null'; - const LAST_DEPLOYMENT_STATUS_PENDING = 'pending'; - const LAST_DEPLOYMENT_STATUS_IN_PROGRESS = 'in progress'; - const LAST_DEPLOYMENT_STATUS_COMPLETED = 'completed'; - const LAST_DEPLOYMENT_STATUS_FAILED = 'failed'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getLastDeploymentStatusAllowableValues() - { - return [ - self::LAST_DEPLOYMENT_STATUS_NULL, - self::LAST_DEPLOYMENT_STATUS_PENDING, - self::LAST_DEPLOYMENT_STATUS_IN_PROGRESS, - self::LAST_DEPLOYMENT_STATUS_COMPLETED, - self::LAST_DEPLOYMENT_STATUS_FAILED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['deleted_at'] = $data['deleted_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; - $this->container['active'] = $data['active'] ?? null; - $this->container['active_rules_fastly_block_count'] = $data['active_rules_fastly_block_count'] ?? null; - $this->container['active_rules_fastly_log_count'] = $data['active_rules_fastly_log_count'] ?? null; - $this->container['active_rules_fastly_score_count'] = $data['active_rules_fastly_score_count'] ?? null; - $this->container['active_rules_owasp_block_count'] = $data['active_rules_owasp_block_count'] ?? null; - $this->container['active_rules_owasp_log_count'] = $data['active_rules_owasp_log_count'] ?? null; - $this->container['active_rules_owasp_score_count'] = $data['active_rules_owasp_score_count'] ?? null; - $this->container['active_rules_trustwave_block_count'] = $data['active_rules_trustwave_block_count'] ?? null; - $this->container['active_rules_trustwave_log_count'] = $data['active_rules_trustwave_log_count'] ?? null; - $this->container['last_deployment_status'] = $data['last_deployment_status'] ?? null; - $this->container['deployed_at'] = $data['deployed_at'] ?? null; - $this->container['error'] = $data['error'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getLastDeploymentStatusAllowableValues(); - if (!is_null($this->container['last_deployment_status']) && !in_array($this->container['last_deployment_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'last_deployment_status', must be one of '%s'", - $this->container['last_deployment_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets created_at - * - * @return \DateTime|null - */ - public function getCreatedAt() - { - return $this->container['created_at']; - } - - /** - * Sets created_at - * - * @param \DateTime|null $created_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setCreatedAt($created_at) - { - $this->container['created_at'] = $created_at; - - return $this; - } - - /** - * Gets deleted_at - * - * @return \DateTime|null - */ - public function getDeletedAt() - { - return $this->container['deleted_at']; - } - - /** - * Sets deleted_at - * - * @param \DateTime|null $deleted_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setDeletedAt($deleted_at) - { - $this->container['deleted_at'] = $deleted_at; - - return $this; - } - - /** - * Gets updated_at - * - * @return \DateTime|null - */ - public function getUpdatedAt() - { - return $this->container['updated_at']; - } - - /** - * Sets updated_at - * - * @param \DateTime|null $updated_at Date and time in ISO 8601 format. - * - * @return self - */ - public function setUpdatedAt($updated_at) - { - $this->container['updated_at'] = $updated_at; - - return $this; - } - - /** - * Gets active - * - * @return bool|null - */ - public function getActive() - { - return $this->container['active']; - } - - /** - * Sets active - * - * @param bool|null $active Whether a specific firewall version is currently deployed. - * - * @return self - */ - public function setActive($active) - { - $this->container['active'] = $active; - - return $this; - } - - /** - * Gets active_rules_fastly_block_count - * - * @return int|null - */ - public function getActiveRulesFastlyBlockCount() - { - return $this->container['active_rules_fastly_block_count']; - } - - /** - * Sets active_rules_fastly_block_count - * - * @param int|null $active_rules_fastly_block_count The number of active Fastly rules set to block. - * - * @return self - */ - public function setActiveRulesFastlyBlockCount($active_rules_fastly_block_count) - { - $this->container['active_rules_fastly_block_count'] = $active_rules_fastly_block_count; - - return $this; - } - - /** - * Gets active_rules_fastly_log_count - * - * @return int|null - */ - public function getActiveRulesFastlyLogCount() - { - return $this->container['active_rules_fastly_log_count']; - } - - /** - * Sets active_rules_fastly_log_count - * - * @param int|null $active_rules_fastly_log_count The number of active Fastly rules set to log. - * - * @return self - */ - public function setActiveRulesFastlyLogCount($active_rules_fastly_log_count) - { - $this->container['active_rules_fastly_log_count'] = $active_rules_fastly_log_count; - - return $this; - } - - /** - * Gets active_rules_fastly_score_count - * - * @return int|null - */ - public function getActiveRulesFastlyScoreCount() - { - return $this->container['active_rules_fastly_score_count']; - } - - /** - * Sets active_rules_fastly_score_count - * - * @param int|null $active_rules_fastly_score_count The number of active Fastly rules set to score. - * - * @return self - */ - public function setActiveRulesFastlyScoreCount($active_rules_fastly_score_count) - { - $this->container['active_rules_fastly_score_count'] = $active_rules_fastly_score_count; - - return $this; - } - - /** - * Gets active_rules_owasp_block_count - * - * @return int|null - */ - public function getActiveRulesOwaspBlockCount() - { - return $this->container['active_rules_owasp_block_count']; - } - - /** - * Sets active_rules_owasp_block_count - * - * @param int|null $active_rules_owasp_block_count The number of active OWASP rules set to block. - * - * @return self - */ - public function setActiveRulesOwaspBlockCount($active_rules_owasp_block_count) - { - $this->container['active_rules_owasp_block_count'] = $active_rules_owasp_block_count; - - return $this; - } - - /** - * Gets active_rules_owasp_log_count - * - * @return int|null - */ - public function getActiveRulesOwaspLogCount() - { - return $this->container['active_rules_owasp_log_count']; - } - - /** - * Sets active_rules_owasp_log_count - * - * @param int|null $active_rules_owasp_log_count The number of active OWASP rules set to log. - * - * @return self - */ - public function setActiveRulesOwaspLogCount($active_rules_owasp_log_count) - { - $this->container['active_rules_owasp_log_count'] = $active_rules_owasp_log_count; - - return $this; - } - - /** - * Gets active_rules_owasp_score_count - * - * @return int|null - */ - public function getActiveRulesOwaspScoreCount() - { - return $this->container['active_rules_owasp_score_count']; - } - - /** - * Sets active_rules_owasp_score_count - * - * @param int|null $active_rules_owasp_score_count The number of active OWASP rules set to score. - * - * @return self - */ - public function setActiveRulesOwaspScoreCount($active_rules_owasp_score_count) - { - $this->container['active_rules_owasp_score_count'] = $active_rules_owasp_score_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_block_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveBlockCount() - { - return $this->container['active_rules_trustwave_block_count']; - } - - /** - * Sets active_rules_trustwave_block_count - * - * @param int|null $active_rules_trustwave_block_count The number of active Trustwave rules set to block. - * - * @return self - */ - public function setActiveRulesTrustwaveBlockCount($active_rules_trustwave_block_count) - { - $this->container['active_rules_trustwave_block_count'] = $active_rules_trustwave_block_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_log_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveLogCount() - { - return $this->container['active_rules_trustwave_log_count']; - } - - /** - * Sets active_rules_trustwave_log_count - * - * @param int|null $active_rules_trustwave_log_count The number of active Trustwave rules set to log. - * - * @return self - */ - public function setActiveRulesTrustwaveLogCount($active_rules_trustwave_log_count) - { - $this->container['active_rules_trustwave_log_count'] = $active_rules_trustwave_log_count; - - return $this; - } - - /** - * Gets last_deployment_status - * - * @return string|null - */ - public function getLastDeploymentStatus() - { - return $this->container['last_deployment_status']; - } - - /** - * Sets last_deployment_status - * - * @param string|null $last_deployment_status The status of the last deployment of this firewall version. - * - * @return self - */ - public function setLastDeploymentStatus($last_deployment_status) - { - $allowedValues = $this->getLastDeploymentStatusAllowableValues(); - if (!is_null($last_deployment_status) && !in_array($last_deployment_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'last_deployment_status', must be one of '%s'", - $last_deployment_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['last_deployment_status'] = $last_deployment_status; - - return $this; - } - - /** - * Gets deployed_at - * - * @return string|null - */ - public function getDeployedAt() - { - return $this->container['deployed_at']; - } - - /** - * Sets deployed_at - * - * @param string|null $deployed_at Time-stamp (GMT) indicating when the firewall version was last deployed. - * - * @return self - */ - public function setDeployedAt($deployed_at) - { - $this->container['deployed_at'] = $deployed_at; - - return $this; - } - - /** - * Gets error - * - * @return string|null - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * - * @param string|null $error Contains error message if the firewall version fails to deploy. - * - * @return self - */ - public function setError($error) - { - $this->container['error'] = $error; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionResponseDataAttributesAllOf.php b/lib/Model/WafFirewallVersionResponseDataAttributesAllOf.php deleted file mode 100644 index 7ae9df7a..00000000 --- a/lib/Model/WafFirewallVersionResponseDataAttributesAllOf.php +++ /dev/null @@ -1,684 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionResponseDataAttributesAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_version_response_data_attributes_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'active' => 'bool', - 'active_rules_fastly_block_count' => 'int', - 'active_rules_fastly_log_count' => 'int', - 'active_rules_fastly_score_count' => 'int', - 'active_rules_owasp_block_count' => 'int', - 'active_rules_owasp_log_count' => 'int', - 'active_rules_owasp_score_count' => 'int', - 'active_rules_trustwave_block_count' => 'int', - 'active_rules_trustwave_log_count' => 'int', - 'last_deployment_status' => 'string', - 'deployed_at' => 'string', - 'error' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'active' => null, - 'active_rules_fastly_block_count' => null, - 'active_rules_fastly_log_count' => null, - 'active_rules_fastly_score_count' => null, - 'active_rules_owasp_block_count' => null, - 'active_rules_owasp_log_count' => null, - 'active_rules_owasp_score_count' => null, - 'active_rules_trustwave_block_count' => null, - 'active_rules_trustwave_log_count' => null, - 'last_deployment_status' => null, - 'deployed_at' => null, - 'error' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'active' => 'active', - 'active_rules_fastly_block_count' => 'active_rules_fastly_block_count', - 'active_rules_fastly_log_count' => 'active_rules_fastly_log_count', - 'active_rules_fastly_score_count' => 'active_rules_fastly_score_count', - 'active_rules_owasp_block_count' => 'active_rules_owasp_block_count', - 'active_rules_owasp_log_count' => 'active_rules_owasp_log_count', - 'active_rules_owasp_score_count' => 'active_rules_owasp_score_count', - 'active_rules_trustwave_block_count' => 'active_rules_trustwave_block_count', - 'active_rules_trustwave_log_count' => 'active_rules_trustwave_log_count', - 'last_deployment_status' => 'last_deployment_status', - 'deployed_at' => 'deployed_at', - 'error' => 'error' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'active' => 'setActive', - 'active_rules_fastly_block_count' => 'setActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'setActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'setActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'setActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'setActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'setActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'setActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'setActiveRulesTrustwaveLogCount', - 'last_deployment_status' => 'setLastDeploymentStatus', - 'deployed_at' => 'setDeployedAt', - 'error' => 'setError' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'active' => 'getActive', - 'active_rules_fastly_block_count' => 'getActiveRulesFastlyBlockCount', - 'active_rules_fastly_log_count' => 'getActiveRulesFastlyLogCount', - 'active_rules_fastly_score_count' => 'getActiveRulesFastlyScoreCount', - 'active_rules_owasp_block_count' => 'getActiveRulesOwaspBlockCount', - 'active_rules_owasp_log_count' => 'getActiveRulesOwaspLogCount', - 'active_rules_owasp_score_count' => 'getActiveRulesOwaspScoreCount', - 'active_rules_trustwave_block_count' => 'getActiveRulesTrustwaveBlockCount', - 'active_rules_trustwave_log_count' => 'getActiveRulesTrustwaveLogCount', - 'last_deployment_status' => 'getLastDeploymentStatus', - 'deployed_at' => 'getDeployedAt', - 'error' => 'getError' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const LAST_DEPLOYMENT_STATUS_NULL = 'null'; - const LAST_DEPLOYMENT_STATUS_PENDING = 'pending'; - const LAST_DEPLOYMENT_STATUS_IN_PROGRESS = 'in progress'; - const LAST_DEPLOYMENT_STATUS_COMPLETED = 'completed'; - const LAST_DEPLOYMENT_STATUS_FAILED = 'failed'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getLastDeploymentStatusAllowableValues() - { - return [ - self::LAST_DEPLOYMENT_STATUS_NULL, - self::LAST_DEPLOYMENT_STATUS_PENDING, - self::LAST_DEPLOYMENT_STATUS_IN_PROGRESS, - self::LAST_DEPLOYMENT_STATUS_COMPLETED, - self::LAST_DEPLOYMENT_STATUS_FAILED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['active'] = $data['active'] ?? null; - $this->container['active_rules_fastly_block_count'] = $data['active_rules_fastly_block_count'] ?? null; - $this->container['active_rules_fastly_log_count'] = $data['active_rules_fastly_log_count'] ?? null; - $this->container['active_rules_fastly_score_count'] = $data['active_rules_fastly_score_count'] ?? null; - $this->container['active_rules_owasp_block_count'] = $data['active_rules_owasp_block_count'] ?? null; - $this->container['active_rules_owasp_log_count'] = $data['active_rules_owasp_log_count'] ?? null; - $this->container['active_rules_owasp_score_count'] = $data['active_rules_owasp_score_count'] ?? null; - $this->container['active_rules_trustwave_block_count'] = $data['active_rules_trustwave_block_count'] ?? null; - $this->container['active_rules_trustwave_log_count'] = $data['active_rules_trustwave_log_count'] ?? null; - $this->container['last_deployment_status'] = $data['last_deployment_status'] ?? null; - $this->container['deployed_at'] = $data['deployed_at'] ?? null; - $this->container['error'] = $data['error'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getLastDeploymentStatusAllowableValues(); - if (!is_null($this->container['last_deployment_status']) && !in_array($this->container['last_deployment_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'last_deployment_status', must be one of '%s'", - $this->container['last_deployment_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets active - * - * @return bool|null - */ - public function getActive() - { - return $this->container['active']; - } - - /** - * Sets active - * - * @param bool|null $active Whether a specific firewall version is currently deployed. - * - * @return self - */ - public function setActive($active) - { - $this->container['active'] = $active; - - return $this; - } - - /** - * Gets active_rules_fastly_block_count - * - * @return int|null - */ - public function getActiveRulesFastlyBlockCount() - { - return $this->container['active_rules_fastly_block_count']; - } - - /** - * Sets active_rules_fastly_block_count - * - * @param int|null $active_rules_fastly_block_count The number of active Fastly rules set to block. - * - * @return self - */ - public function setActiveRulesFastlyBlockCount($active_rules_fastly_block_count) - { - $this->container['active_rules_fastly_block_count'] = $active_rules_fastly_block_count; - - return $this; - } - - /** - * Gets active_rules_fastly_log_count - * - * @return int|null - */ - public function getActiveRulesFastlyLogCount() - { - return $this->container['active_rules_fastly_log_count']; - } - - /** - * Sets active_rules_fastly_log_count - * - * @param int|null $active_rules_fastly_log_count The number of active Fastly rules set to log. - * - * @return self - */ - public function setActiveRulesFastlyLogCount($active_rules_fastly_log_count) - { - $this->container['active_rules_fastly_log_count'] = $active_rules_fastly_log_count; - - return $this; - } - - /** - * Gets active_rules_fastly_score_count - * - * @return int|null - */ - public function getActiveRulesFastlyScoreCount() - { - return $this->container['active_rules_fastly_score_count']; - } - - /** - * Sets active_rules_fastly_score_count - * - * @param int|null $active_rules_fastly_score_count The number of active Fastly rules set to score. - * - * @return self - */ - public function setActiveRulesFastlyScoreCount($active_rules_fastly_score_count) - { - $this->container['active_rules_fastly_score_count'] = $active_rules_fastly_score_count; - - return $this; - } - - /** - * Gets active_rules_owasp_block_count - * - * @return int|null - */ - public function getActiveRulesOwaspBlockCount() - { - return $this->container['active_rules_owasp_block_count']; - } - - /** - * Sets active_rules_owasp_block_count - * - * @param int|null $active_rules_owasp_block_count The number of active OWASP rules set to block. - * - * @return self - */ - public function setActiveRulesOwaspBlockCount($active_rules_owasp_block_count) - { - $this->container['active_rules_owasp_block_count'] = $active_rules_owasp_block_count; - - return $this; - } - - /** - * Gets active_rules_owasp_log_count - * - * @return int|null - */ - public function getActiveRulesOwaspLogCount() - { - return $this->container['active_rules_owasp_log_count']; - } - - /** - * Sets active_rules_owasp_log_count - * - * @param int|null $active_rules_owasp_log_count The number of active OWASP rules set to log. - * - * @return self - */ - public function setActiveRulesOwaspLogCount($active_rules_owasp_log_count) - { - $this->container['active_rules_owasp_log_count'] = $active_rules_owasp_log_count; - - return $this; - } - - /** - * Gets active_rules_owasp_score_count - * - * @return int|null - */ - public function getActiveRulesOwaspScoreCount() - { - return $this->container['active_rules_owasp_score_count']; - } - - /** - * Sets active_rules_owasp_score_count - * - * @param int|null $active_rules_owasp_score_count The number of active OWASP rules set to score. - * - * @return self - */ - public function setActiveRulesOwaspScoreCount($active_rules_owasp_score_count) - { - $this->container['active_rules_owasp_score_count'] = $active_rules_owasp_score_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_block_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveBlockCount() - { - return $this->container['active_rules_trustwave_block_count']; - } - - /** - * Sets active_rules_trustwave_block_count - * - * @param int|null $active_rules_trustwave_block_count The number of active Trustwave rules set to block. - * - * @return self - */ - public function setActiveRulesTrustwaveBlockCount($active_rules_trustwave_block_count) - { - $this->container['active_rules_trustwave_block_count'] = $active_rules_trustwave_block_count; - - return $this; - } - - /** - * Gets active_rules_trustwave_log_count - * - * @return int|null - */ - public function getActiveRulesTrustwaveLogCount() - { - return $this->container['active_rules_trustwave_log_count']; - } - - /** - * Sets active_rules_trustwave_log_count - * - * @param int|null $active_rules_trustwave_log_count The number of active Trustwave rules set to log. - * - * @return self - */ - public function setActiveRulesTrustwaveLogCount($active_rules_trustwave_log_count) - { - $this->container['active_rules_trustwave_log_count'] = $active_rules_trustwave_log_count; - - return $this; - } - - /** - * Gets last_deployment_status - * - * @return string|null - */ - public function getLastDeploymentStatus() - { - return $this->container['last_deployment_status']; - } - - /** - * Sets last_deployment_status - * - * @param string|null $last_deployment_status The status of the last deployment of this firewall version. - * - * @return self - */ - public function setLastDeploymentStatus($last_deployment_status) - { - $allowedValues = $this->getLastDeploymentStatusAllowableValues(); - if (!is_null($last_deployment_status) && !in_array($last_deployment_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'last_deployment_status', must be one of '%s'", - $last_deployment_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['last_deployment_status'] = $last_deployment_status; - - return $this; - } - - /** - * Gets deployed_at - * - * @return string|null - */ - public function getDeployedAt() - { - return $this->container['deployed_at']; - } - - /** - * Sets deployed_at - * - * @param string|null $deployed_at Time-stamp (GMT) indicating when the firewall version was last deployed. - * - * @return self - */ - public function setDeployedAt($deployed_at) - { - $this->container['deployed_at'] = $deployed_at; - - return $this; - } - - /** - * Gets error - * - * @return string|null - */ - public function getError() - { - return $this->container['error']; - } - - /** - * Sets error - * - * @param string|null $error Contains error message if the firewall version fails to deploy. - * - * @return self - */ - public function setError($error) - { - $this->container['error'] = $error; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallVersionsResponseAllOf.php b/lib/Model/WafFirewallVersionsResponseAllOf.php deleted file mode 100644 index b3249f59..00000000 --- a/lib/Model/WafFirewallVersionsResponseAllOf.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallVersionsResponseAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewall_versions_response_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\WafFirewallVersionResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafFirewallVersionItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\WafFirewallVersionResponseData[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafFirewallVersionResponseData[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\IncludedWithWafFirewallVersionItem[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\IncludedWithWafFirewallVersionItem[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafFirewallsResponseAllOf.php b/lib/Model/WafFirewallsResponseAllOf.php deleted file mode 100644 index 34326c4c..00000000 --- a/lib/Model/WafFirewallsResponseAllOf.php +++ /dev/null @@ -1,344 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafFirewallsResponseAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_firewalls_response_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\WafFirewallResponseData[]', - 'included' => '\Fastly\Model\SchemasWafFirewallVersion[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets data - * - * @return \Fastly\Model\WafFirewallResponseData[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafFirewallResponseData[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\SchemasWafFirewallVersion[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\SchemasWafFirewallVersion[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafRuleRevision.php b/lib/Model/WafRuleRevision.php deleted file mode 100644 index 55246221..00000000 --- a/lib/Model/WafRuleRevision.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafRuleRevision implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_rule_revision'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafRuleRevision', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleRevisionAttributes' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, - 'attributes' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafRuleRevision|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafRuleRevision|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF rule revision. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafRuleRevisionAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafRuleRevisionAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafRuleRevisionAttributes.php b/lib/Model/WafRuleRevisionAttributes.php deleted file mode 100644 index 0ba0cd55..00000000 --- a/lib/Model/WafRuleRevisionAttributes.php +++ /dev/null @@ -1,558 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafRuleRevisionAttributes implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_rule_revision_attributes'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'message' => 'string', - 'modsec_rule_id' => 'int', - 'paranoia_level' => 'int', - 'revision' => 'int', - 'severity' => 'int', - 'source' => 'string', - 'state' => 'string', - 'vcl' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'message' => null, - 'modsec_rule_id' => null, - 'paranoia_level' => null, - 'revision' => null, - 'severity' => null, - 'source' => null, - 'state' => null, - 'vcl' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'message' => 'message', - 'modsec_rule_id' => 'modsec_rule_id', - 'paranoia_level' => 'paranoia_level', - 'revision' => 'revision', - 'severity' => 'severity', - 'source' => 'source', - 'state' => 'state', - 'vcl' => 'vcl' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'message' => 'setMessage', - 'modsec_rule_id' => 'setModsecRuleId', - 'paranoia_level' => 'setParanoiaLevel', - 'revision' => 'setRevision', - 'severity' => 'setSeverity', - 'source' => 'setSource', - 'state' => 'setState', - 'vcl' => 'setVcl' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'message' => 'getMessage', - 'modsec_rule_id' => 'getModsecRuleId', - 'paranoia_level' => 'getParanoiaLevel', - 'revision' => 'getRevision', - 'severity' => 'getSeverity', - 'source' => 'getSource', - 'state' => 'getState', - 'vcl' => 'getVcl' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - const STATE_LATEST = 'latest'; - const STATE_OUTDATED = 'outdated'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getStateAllowableValues() - { - return [ - self::STATE_LATEST, - self::STATE_OUTDATED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['message'] = $data['message'] ?? null; - $this->container['modsec_rule_id'] = $data['modsec_rule_id'] ?? null; - $this->container['paranoia_level'] = $data['paranoia_level'] ?? null; - $this->container['revision'] = $data['revision'] ?? null; - $this->container['severity'] = $data['severity'] ?? null; - $this->container['source'] = $data['source'] ?? null; - $this->container['state'] = $data['state'] ?? null; - $this->container['vcl'] = $data['vcl'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - $allowedValues = $this->getStateAllowableValues(); - if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'state', must be one of '%s'", - $this->container['state'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets message - * - * @return string|null - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string|null $message Message metadata for the rule. - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets modsec_rule_id - * - * @return int|null - */ - public function getModsecRuleId() - { - return $this->container['modsec_rule_id']; - } - - /** - * Sets modsec_rule_id - * - * @param int|null $modsec_rule_id Corresponding ModSecurity rule ID. - * - * @return self - */ - public function setModsecRuleId($modsec_rule_id) - { - $this->container['modsec_rule_id'] = $modsec_rule_id; - - return $this; - } - - /** - * Gets paranoia_level - * - * @return int|null - */ - public function getParanoiaLevel() - { - return $this->container['paranoia_level']; - } - - /** - * Sets paranoia_level - * - * @param int|null $paranoia_level Paranoia level for the rule. - * - * @return self - */ - public function setParanoiaLevel($paranoia_level) - { - $this->container['paranoia_level'] = $paranoia_level; - - return $this; - } - - /** - * Gets revision - * - * @return int|null - */ - public function getRevision() - { - return $this->container['revision']; - } - - /** - * Sets revision - * - * @param int|null $revision Revision number. - * - * @return self - */ - public function setRevision($revision) - { - $this->container['revision'] = $revision; - - return $this; - } - - /** - * Gets severity - * - * @return int|null - */ - public function getSeverity() - { - return $this->container['severity']; - } - - /** - * Sets severity - * - * @param int|null $severity Severity metadata for the rule. - * - * @return self - */ - public function setSeverity($severity) - { - $this->container['severity'] = $severity; - - return $this; - } - - /** - * Gets source - * - * @return string|null - */ - public function getSource() - { - return $this->container['source']; - } - - /** - * Sets source - * - * @param string|null $source The ModSecurity rule logic. - * - * @return self - */ - public function setSource($source) - { - $this->container['source'] = $source; - - return $this; - } - - /** - * Gets state - * - * @return string|null - */ - public function getState() - { - return $this->container['state']; - } - - /** - * Sets state - * - * @param string|null $state The state, indicating if the revision is the most recent version of the rule. - * - * @return self - */ - public function setState($state) - { - $allowedValues = $this->getStateAllowableValues(); - if (!is_null($state) && !in_array($state, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'state', must be one of '%s'", - $state, - implode("', '", $allowedValues) - ) - ); - } - $this->container['state'] = $state; - - return $this; - } - - /** - * Gets vcl - * - * @return string|null - */ - public function getVcl() - { - return $this->container['vcl']; - } - - /** - * Sets vcl - * - * @param string|null $vcl The VCL representation of the rule logic. - * - * @return self - */ - public function setVcl($vcl) - { - $this->container['vcl'] = $vcl; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafRuleRevisionResponseData.php b/lib/Model/WafRuleRevisionResponseData.php deleted file mode 100644 index e4f38408..00000000 --- a/lib/Model/WafRuleRevisionResponseData.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafRuleRevisionResponseData implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_rule_revision_response_data'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafRuleRevision', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafRuleRevisionAttributes', - 'relationships' => '\Fastly\Model\RelationshipWafRule' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafRuleRevision|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafRuleRevision|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF rule revision. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafRuleRevisionAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafRuleRevisionAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipWafRule|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipWafRule|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafRuleRevisionsResponse.php b/lib/Model/WafRuleRevisionsResponse.php deleted file mode 100644 index 4ce0fcc5..00000000 --- a/lib/Model/WafRuleRevisionsResponse.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafRuleRevisionsResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_rule_revisions_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'links' => '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafRuleRevisionResponseData[]', - 'included' => '\Fastly\Model\WafRule[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets links - * - * @return \Fastly\Model\PaginationLinks|null - */ - public function getLinks() - { - return $this->container['links']; - } - - /** - * Sets links - * - * @param \Fastly\Model\PaginationLinks|null $links links - * - * @return self - */ - public function setLinks($links) - { - $this->container['links'] = $links; - - return $this; - } - - /** - * Gets meta - * - * @return \Fastly\Model\PaginationMeta|null - */ - public function getMeta() - { - return $this->container['meta']; - } - - /** - * Sets meta - * - * @param \Fastly\Model\PaginationMeta|null $meta meta - * - * @return self - */ - public function setMeta($meta) - { - $this->container['meta'] = $meta; - - return $this; - } - - /** - * Gets data - * - * @return \Fastly\Model\WafRuleRevisionResponseData[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafRuleRevisionResponseData[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\WafRule[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\WafRule[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafRulesResponse.php b/lib/Model/WafRulesResponse.php deleted file mode 100644 index 8dc5fd46..00000000 --- a/lib/Model/WafRulesResponse.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafRulesResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_rules_response'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'links' => '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafRuleResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafRuleItem[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets links - * - * @return \Fastly\Model\PaginationLinks|null - */ - public function getLinks() - { - return $this->container['links']; - } - - /** - * Sets links - * - * @param \Fastly\Model\PaginationLinks|null $links links - * - * @return self - */ - public function setLinks($links) - { - $this->container['links'] = $links; - - return $this; - } - - /** - * Gets meta - * - * @return \Fastly\Model\PaginationMeta|null - */ - public function getMeta() - { - return $this->container['meta']; - } - - /** - * Sets meta - * - * @param \Fastly\Model\PaginationMeta|null $meta meta - * - * @return self - */ - public function setMeta($meta) - { - $this->container['meta'] = $meta; - - return $this; - } - - /** - * Gets data - * - * @return \Fastly\Model\WafRuleResponseData[]|null - */ - public function getData() - { - return $this->container['data']; - } - - /** - * Sets data - * - * @param \Fastly\Model\WafRuleResponseData[]|null $data data - * - * @return self - */ - public function setData($data) - { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets included - * - * @return \Fastly\Model\IncludedWithWafRuleItem[]|null - */ - public function getIncluded() - { - return $this->container['included']; - } - - /** - * Sets included - * - * @param \Fastly\Model\IncludedWithWafRuleItem[]|null $included included - * - * @return self - */ - public function setIncluded($included) - { - $this->container['included'] = $included; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafTag.php b/lib/Model/WafTag.php deleted file mode 100644 index 31af5d43..00000000 --- a/lib/Model/WafTag.php +++ /dev/null @@ -1,374 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafTag implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_tag'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafTag', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafTagAttributes' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, - 'attributes' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafTag|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafTag|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF tag. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafTagAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafTagAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafTagsResponseDataItem.php b/lib/Model/WafTagsResponseDataItem.php deleted file mode 100644 index 9e569bde..00000000 --- a/lib/Model/WafTagsResponseDataItem.php +++ /dev/null @@ -1,404 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class WafTagsResponseDataItem implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $fastlyModelName = 'waf_tags_response_data_item'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $fastlyTypes = [ - 'type' => '\Fastly\Model\TypeWafTag', - 'id' => 'string', - 'attributes' => '\Fastly\Model\WafTagAttributes', - 'relationships' => '\Fastly\Model\RelationshipWafRule' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $fastlyFormats = [ - 'type' => null, - 'id' => null, - 'attributes' => null, - 'relationships' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyTypes() - { - return self::$fastlyTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function fastlyFormats() - { - return self::$fastlyFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'type' => 'type', - 'id' => 'id', - 'attributes' => 'attributes', - 'relationships' => 'relationships' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'type' => 'setType', - 'id' => 'setId', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'type' => 'getType', - 'id' => 'getId', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$fastlyModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['type'] = $data['type'] ?? null; - $this->container['id'] = $data['id'] ?? null; - $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Fastly\Model\TypeWafTag|null - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Fastly\Model\TypeWafTag|null $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets id - * - * @return string|null - */ - public function getId() - { - return $this->container['id']; - } - - /** - * Sets id - * - * @param string|null $id Alphanumeric string identifying a WAF tag. - * - * @return self - */ - public function setId($id) - { - $this->container['id'] = $id; - - return $this; - } - - /** - * Gets attributes - * - * @return \Fastly\Model\WafTagAttributes|null - */ - public function getAttributes() - { - return $this->container['attributes']; - } - - /** - * Sets attributes - * - * @param \Fastly\Model\WafTagAttributes|null $attributes attributes - * - * @return self - */ - public function setAttributes($attributes) - { - $this->container['attributes'] = $attributes; - - return $this; - } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipWafRule|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipWafRule|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/lib/Model/WafActiveRulesResponse.php b/lib/Model/WebsocketsResponseBodyGetAllServices.php similarity index 69% rename from lib/Model/WafActiveRulesResponse.php rename to lib/Model/WebsocketsResponseBodyGetAllServices.php index 51320375..dafb1d5b 100644 --- a/lib/Model/WafActiveRulesResponse.php +++ b/lib/Model/WebsocketsResponseBodyGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\PaginationLinks', - 'meta' => '\Fastly\Model\PaginationMeta', - 'data' => '\Fastly\Model\WafActiveRuleResponseData[]', - 'included' => '\Fastly\Model\IncludedWithWafActiveRuleItem[]' + 'product' => '\Fastly\Model\WebsocketsResponseProductProduct', + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks' ]; /** @@ -67,10 +67,10 @@ class WafActiveRulesResponse implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $fastlyFormats = [ - 'links' => null, - 'meta' => null, - 'data' => null, - 'included' => null + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null ]; /** @@ -100,10 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'links' => 'links', - 'meta' => 'meta', - 'data' => 'data', - 'included' => 'included' + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' ]; /** @@ -112,10 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'links' => 'setLinks', - 'meta' => 'setMeta', - 'data' => 'setData', - 'included' => 'setIncluded' + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' ]; /** @@ -124,10 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'links' => 'getLinks', - 'meta' => 'getMeta', - 'data' => 'getData', - 'included' => 'getIncluded' + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' ]; /** @@ -187,10 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['links'] = $data['links'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; - $this->container['data'] = $data['data'] ?? null; - $this->container['included'] = $data['included'] ?? null; + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -218,97 +218,97 @@ public function valid() /** - * Gets links + * Gets product * - * @return \Fastly\Model\PaginationLinks|null + * @return \Fastly\Model\WebsocketsResponseProductProduct|null */ - public function getLinks() + public function getProduct() { - return $this->container['links']; + return $this->container['product']; } /** - * Sets links + * Sets product * - * @param \Fastly\Model\PaginationLinks|null $links links + * @param \Fastly\Model\WebsocketsResponseProductProduct|null $product product * * @return self */ - public function setLinks($links) + public function setProduct($product) { - $this->container['links'] = $links; + $this->container['product'] = $product; return $this; } /** - * Gets meta + * Gets customer * - * @return \Fastly\Model\PaginationMeta|null + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null */ - public function getMeta() + public function getCustomer() { - return $this->container['meta']; + return $this->container['customer']; } /** - * Sets meta + * Sets customer * - * @param \Fastly\Model\PaginationMeta|null $meta meta + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer * * @return self */ - public function setMeta($meta) + public function setCustomer($customer) { - $this->container['meta'] = $meta; + $this->container['customer'] = $customer; return $this; } /** - * Gets data + * Gets services * - * @return \Fastly\Model\WafActiveRuleResponseData[]|null + * @return string[]|null */ - public function getData() + public function getServices() { - return $this->container['data']; + return $this->container['services']; } /** - * Sets data + * Sets services * - * @param \Fastly\Model\WafActiveRuleResponseData[]|null $data data + * @param string[]|null $services A list of services with Websockets enabled. * * @return self */ - public function setData($data) + public function setServices($services) { - $this->container['data'] = $data; + $this->container['services'] = $services; return $this; } /** - * Gets included + * Gets _links * - * @return \Fastly\Model\IncludedWithWafActiveRuleItem[]|null + * @return \Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks|null */ - public function getIncluded() + public function getLinks() { - return $this->container['included']; + return $this->container['_links']; } /** - * Sets included + * Sets _links * - * @param \Fastly\Model\IncludedWithWafActiveRuleItem[]|null $included included + * @param \Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setIncluded($included) + public function setLinks($_links) { - $this->container['included'] = $included; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/WebsocketsResponseCustomer.php b/lib/Model/WebsocketsResponseCustomer.php new file mode 100644 index 00000000..969144a6 --- /dev/null +++ b/lib/Model/WebsocketsResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class WebsocketsResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'websockets_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\BotManagementResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\BotManagementResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\BotManagementResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RelationshipWafTags.php b/lib/Model/WebsocketsResponseEnabledServices.php similarity index 87% rename from lib/Model/RelationshipWafTags.php rename to lib/Model/WebsocketsResponseEnabledServices.php index 7211bc47..c50ee64a 100644 --- a/lib/Model/RelationshipWafTags.php +++ b/lib/Model/WebsocketsResponseEnabledServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipWafTagsWafTags' + 'services' => 'string[]' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafTags implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $fastlyFormats = [ - 'waf_tags' => null + 'services' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'waf_tags' => 'waf_tags' + 'services' => 'services' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'waf_tags' => 'setWafTags' + 'services' => 'setServices' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'waf_tags' => 'getWafTags' + 'services' => 'getServices' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['waf_tags'] = $data['waf_tags'] ?? null; + $this->container['services'] = $data['services'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets waf_tags + * Gets services * - * @return \Fastly\Model\RelationshipWafTagsWafTags|null + * @return string[]|null */ - public function getWafTags() + public function getServices() { - return $this->container['waf_tags']; + return $this->container['services']; } /** - * Sets waf_tags + * Sets services * - * @param \Fastly\Model\RelationshipWafTagsWafTags|null $waf_tags waf_tags + * @param string[]|null $services A list of services with Websockets enabled. * * @return self */ - public function setWafTags($waf_tags) + public function setServices($services) { - $this->container['waf_tags'] = $waf_tags; + $this->container['services'] = $services; return $this; } diff --git a/lib/Model/RelationshipWafFirewallVersionWafFirewallVersion.php b/lib/Model/WebsocketsResponseLinksGetAllServices.php similarity index 86% rename from lib/Model/RelationshipWafFirewallVersionWafFirewallVersion.php rename to lib/Model/WebsocketsResponseLinksGetAllServices.php index a370a695..e4b07f1b 100644 --- a/lib/Model/RelationshipWafFirewallVersionWafFirewallVersion.php +++ b/lib/Model/WebsocketsResponseLinksGetAllServices.php @@ -1,6 +1,6 @@ '\Fastly\Model\RelationshipMemberWafFirewallVersion[]' + '_links' => '\Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks' ]; /** @@ -64,7 +64,7 @@ class RelationshipWafFirewallVersionWafFirewallVersion implements ModelInterface * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + '_links' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + '_links' => '_links' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + '_links' => 'setLinks' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + '_links' => 'getLinks' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets _links * - * @return \Fastly\Model\RelationshipMemberWafFirewallVersion[]|null + * @return \Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks|null */ - public function getData() + public function getLinks() { - return $this->container['data']; + return $this->container['_links']; } /** - * Sets data + * Sets _links * - * @param \Fastly\Model\RelationshipMemberWafFirewallVersion[]|null $data data + * @param \Fastly\Model\WebsocketsResponseLinksGetAllServicesLinks|null $_links _links * * @return self */ - public function setData($data) + public function setLinks($_links) { - $this->container['data'] = $data; + $this->container['_links'] = $_links; return $this; } diff --git a/lib/Model/WafActiveRuleResponse.php b/lib/Model/WebsocketsResponseLinksGetAllServicesLinks.php similarity index 88% rename from lib/Model/WafActiveRuleResponse.php rename to lib/Model/WebsocketsResponseLinksGetAllServicesLinks.php index 99cc4bf7..70bb4435 100644 --- a/lib/Model/WafActiveRuleResponse.php +++ b/lib/Model/WebsocketsResponseLinksGetAllServicesLinks.php @@ -1,6 +1,6 @@ '\Fastly\Model\WafActiveRuleResponseData' + 'self' => 'string' ]; /** @@ -64,7 +64,7 @@ class WafActiveRuleResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'self' => 'uri' ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'self' => 'self' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'self' => 'setSelf' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'self' => 'getSelf' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; + $this->container['self'] = $data['self'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets data + * Gets self * - * @return \Fastly\Model\WafActiveRuleResponseData|null + * @return string|null */ - public function getData() + public function getSelf() { - return $this->container['data']; + return $this->container['self']; } /** - * Sets data + * Sets self * - * @param \Fastly\Model\WafActiveRuleResponseData|null $data data + * @param string|null $self Location of resource * * @return self */ - public function setData($data) + public function setSelf($self) { - $this->container['data'] = $data; + $this->container['self'] = $self; return $this; } diff --git a/sig.json b/sig.json index 7ae3a1b7..df49b766 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "b5b58c2d", "D": "2741b776"} +{"G": "38dbf5ed", "D": "fed72b8e"} From 21d218f1cd1499cec1add83621cf8593d36380d9 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 12 Jun 2025 04:53:08 +0000 Subject: [PATCH 4/8] Generated v10.0.0 --- CHANGELOG.md | 28 +++++++++++++ README.md | 39 ++++++++++++------- docs/Api/BackendApi.md | 8 ++-- docs/Api/LoggingAzureblobApi.md | 4 +- docs/Api/LoggingBigqueryApi.md | 4 +- docs/Api/LoggingCloudfilesApi.md | 4 +- docs/Api/LoggingDatadogApi.md | 4 +- docs/Api/LoggingDigitaloceanApi.md | 4 +- docs/Api/LoggingElasticsearchApi.md | 4 +- docs/Api/LoggingFtpApi.md | 4 +- docs/Api/LoggingGcsApi.md | 4 +- docs/Api/LoggingGrafanacloudlogsApi.md | 4 +- docs/Api/LoggingHerokuApi.md | 4 +- docs/Api/LoggingHoneycombApi.md | 4 +- docs/Api/LoggingHttpsApi.md | 4 +- docs/Api/LoggingKafkaApi.md | 2 +- docs/Api/LoggingLogentriesApi.md | 4 +- docs/Api/LoggingLogglyApi.md | 4 +- docs/Api/LoggingLogshuttleApi.md | 4 +- docs/Api/LoggingNewrelicApi.md | 4 +- docs/Api/LoggingNewrelicotlpApi.md | 4 +- docs/Api/LoggingOpenstackApi.md | 4 +- docs/Api/LoggingPapertrailApi.md | 4 +- docs/Api/LoggingPubsubApi.md | 4 +- docs/Api/LoggingS3Api.md | 4 +- docs/Api/LoggingScalyrApi.md | 4 +- docs/Api/LoggingSftpApi.md | 4 +- docs/Api/LoggingSplunkApi.md | 4 +- docs/Api/LoggingSumologicApi.md | 4 +- docs/Api/LoggingSyslogApi.md | 4 +- docs/Api/ServiceApi.md | 2 + docs/Model/Backend.md | 2 +- docs/Model/BackendResponse.md | 2 +- docs/Model/LoggingAzureblobResponse.md | 2 +- docs/Model/LoggingBigqueryResponse.md | 2 +- docs/Model/LoggingCloudfilesResponse.md | 2 +- docs/Model/LoggingCommon.md | 2 +- docs/Model/LoggingCommonResponse.md | 2 +- docs/Model/LoggingCommonResponseAllOf.md | 2 +- docs/Model/LoggingDatadogResponse.md | 2 +- docs/Model/LoggingDigitaloceanResponse.md | 2 +- docs/Model/LoggingElasticsearchResponse.md | 2 +- docs/Model/LoggingFtpResponse.md | 2 +- docs/Model/LoggingGcsResponse.md | 2 +- docs/Model/LoggingGooglePubsubResponse.md | 2 +- docs/Model/LoggingGrafanacloudlogsResponse.md | 2 +- docs/Model/LoggingHerokuResponse.md | 2 +- docs/Model/LoggingHoneycombResponse.md | 2 +- docs/Model/LoggingHttpsResponse.md | 2 +- docs/Model/LoggingKafkaResponse.md | 2 +- docs/Model/LoggingKafkaResponsePost.md | 2 +- docs/Model/LoggingLogentriesResponse.md | 2 +- docs/Model/LoggingLogglyResponse.md | 2 +- docs/Model/LoggingLogshuttleResponse.md | 2 +- docs/Model/LoggingNewrelicResponse.md | 2 +- docs/Model/LoggingNewrelicotlpResponse.md | 2 +- docs/Model/LoggingOpenstackResponse.md | 2 +- docs/Model/LoggingPapertrailResponse.md | 2 +- docs/Model/LoggingS3Response.md | 2 +- docs/Model/LoggingScalyrResponse.md | 2 +- docs/Model/LoggingSftpResponse.md | 2 +- docs/Model/LoggingSplunkResponse.md | 2 +- docs/Model/LoggingSumologicResponse.md | 2 +- docs/Model/LoggingSyslogResponse.md | 2 +- docs/Model/Results.md | 4 +- lib/Api/BackendApi.php | 20 +++++----- lib/Api/ServiceApi.php | 17 ++++++++ lib/Configuration.php | 4 +- lib/Model/Backend.php | 2 +- lib/Model/BackendResponse.php | 2 +- lib/Model/LoggingAzureblobResponse.php | 2 - lib/Model/LoggingBigqueryResponse.php | 2 - lib/Model/LoggingCloudfilesResponse.php | 2 - lib/Model/LoggingCommon.php | 2 - lib/Model/LoggingCommonResponse.php | 2 - lib/Model/LoggingCommonResponseAllOf.php | 2 - lib/Model/LoggingDatadogResponse.php | 2 - lib/Model/LoggingDigitaloceanResponse.php | 2 - lib/Model/LoggingElasticsearchResponse.php | 2 - lib/Model/LoggingFtpResponse.php | 2 - lib/Model/LoggingGcsResponse.php | 2 - lib/Model/LoggingGooglePubsubResponse.php | 2 - lib/Model/LoggingGrafanacloudlogsResponse.php | 2 - lib/Model/LoggingHerokuResponse.php | 2 - lib/Model/LoggingHoneycombResponse.php | 2 - lib/Model/LoggingHttpsResponse.php | 2 - lib/Model/LoggingKafkaResponse.php | 2 - lib/Model/LoggingKafkaResponsePost.php | 2 - lib/Model/LoggingLogentriesResponse.php | 2 - lib/Model/LoggingLogglyResponse.php | 2 - lib/Model/LoggingLogshuttleResponse.php | 2 - lib/Model/LoggingNewrelicResponse.php | 2 - lib/Model/LoggingNewrelicotlpResponse.php | 2 - lib/Model/LoggingOpenstackResponse.php | 2 - lib/Model/LoggingPapertrailResponse.php | 2 - lib/Model/LoggingPlacement.php | 3 -- lib/Model/LoggingS3Response.php | 2 - lib/Model/LoggingScalyrResponse.php | 2 - lib/Model/LoggingSftpResponse.php | 2 - lib/Model/LoggingSplunkResponse.php | 2 - lib/Model/LoggingSumologicResponse.php | 2 - lib/Model/LoggingSyslogResponse.php | 2 - lib/Model/Results.php | 4 +- sig.json | 2 +- 104 files changed, 182 insertions(+), 187 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0384816..55faf158 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [v10.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v10.0.0) (2025-06-11) + +**Breaking Changes:** + +- removed(properties): Remove logging placement value `waf_debug`. + + +**Bug fixes:** + +- fix(backend): Marked `prefer_ipv6` as nullable. + + +**Enhancements:** + +- feat(historical): The following Next-Gen WAF metrics have been updated to include both Edge WAF and +- Core WAF counts:`ngwaf_requests_total_count`, `ngwaf_requests_blocked_count`, + + +**Documentation:** + +- doc(domain-discovery): Correct documentation of valid values of `scope` query parameter. +- doc(observability-aggregations-for-logs): Correct documentation of valid values of `log-aggregations-filter` query + parameter. +- doc(backend): Tweak language of `prefer_ipv6` description. +- doc(service): Add documentation for `filter[versions.active]` query parameter when getting detailed information on + a specified service. + + ## [v9.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v9.0.0) (2025-05-12) **Breaking Changes:** diff --git a/README.md b/README.md index 1783e07d..398cd00c 100644 --- a/README.md +++ b/README.md @@ -660,6 +660,19 @@ The fastly-php API client currently does not support the following endpoints: - [`/domains/v1/tools/suggest`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/domains/v1/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/domains/v1`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}/events/{event_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET, PATCH) +- [`/ngwaf/v1/workspaces/{workspace_id}/events`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET) +- [`/ngwaf/v1/workspaces/{workspace_id}/redactions/{redaction_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (DELETE, GET, PATCH) +- [`/ngwaf/v1/workspaces/{workspace_id}/redactions`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}/requests/{request_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/requests) (GET) +- [`/ngwaf/v1/workspaces/{workspace_id}/requests`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/requests) (GET) +- [`/ngwaf/v1/workspaces/{workspace_id}/rules/{rule_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/rules) (DELETE, GET, PATCH) +- [`/ngwaf/v1/workspaces/{workspace_id}/rules`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/rules) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}/timeseries`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/timeseries) (GET) +- [`/ngwaf/v1/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/virtual-patches) (GET, PATCH) +- [`/ngwaf/v1/workspaces/{workspace_id}/virtual-patches`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/virtual-patches) (GET) +- [`/ngwaf/v1/workspaces/{workspace_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspaces) (DELETE, GET, PATCH) +- [`/ngwaf/v1/workspaces`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspaces) (GET, POST) - [`/notifications/integration-types`](https://developer.fastly.com/reference/api/observability/notification) (GET) - [`/notifications/integrations/{integration_id}/rotateSigningKey`](https://developer.fastly.com/reference/api/observability/notification) (POST) - [`/notifications/integrations/{integration_id}/signingKey`](https://developer.fastly.com/reference/api/observability/notification) (GET) @@ -667,19 +680,19 @@ The fastly-php API client currently does not support the following endpoints: - [`/notifications/integrations`](https://developer.fastly.com/reference/api/observability/notification) (GET, POST) - [`/notifications/mailinglist-confirmations`](https://developer.fastly.com/reference/api/observability/notification) (POST) - [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) -- [`/security/workspaces/{workspace_id}/events/{event_id}`](https://docs.fastly.com/en/ngwaf/) (GET, PATCH) -- [`/security/workspaces/{workspace_id}/events`](https://docs.fastly.com/en/ngwaf/) (GET) -- [`/security/workspaces/{workspace_id}/redactions/{redaction_id}`](https://docs.fastly.com/en/ngwaf/) (DELETE, GET, PATCH) -- [`/security/workspaces/{workspace_id}/redactions`](https://docs.fastly.com/en/ngwaf/) (GET, POST) -- [`/security/workspaces/{workspace_id}/requests/{request_id}`](https://docs.fastly.com/en/ngwaf/) (GET) -- [`/security/workspaces/{workspace_id}/requests`](https://docs.fastly.com/en/ngwaf/) (GET) -- [`/security/workspaces/{workspace_id}/rules/{rule_id}`](https://docs.fastly.com/en/ngwaf/) (DELETE, GET, PATCH) -- [`/security/workspaces/{workspace_id}/rules`](https://docs.fastly.com/en/ngwaf/) (GET, POST) -- [`/security/workspaces/{workspace_id}/timeseries`](https://docs.fastly.com/en/ngwaf/) (GET) -- [`/security/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`](https://docs.fastly.com/en/ngwaf/) (GET, PATCH) -- [`/security/workspaces/{workspace_id}/virtual-patches`](https://docs.fastly.com/en/ngwaf/) (GET) -- [`/security/workspaces/{workspace_id}`](https://docs.fastly.com/en/ngwaf/) (DELETE, GET, PATCH) -- [`/security/workspaces`](https://docs.fastly.com/en/ngwaf/) (GET, POST) +- [`/security/workspaces/{workspace_id}/events/{event_id}`](https://www.fastly.com/documentation/reference/api/security/events) (GET, PATCH) +- [`/security/workspaces/{workspace_id}/events`](https://www.fastly.com/documentation/reference/api/security/events) (GET) +- [`/security/workspaces/{workspace_id}/redactions/{redaction_id}`](https://www.fastly.com/documentation/reference/api/security/redactions) (DELETE, GET, PATCH) +- [`/security/workspaces/{workspace_id}/redactions`](https://www.fastly.com/documentation/reference/api/security/redactions) (GET, POST) +- [`/security/workspaces/{workspace_id}/requests/{request_id}`](https://www.fastly.com/documentation/reference/api/security/requests) (GET) +- [`/security/workspaces/{workspace_id}/requests`](https://www.fastly.com/documentation/reference/api/security/requests) (GET) +- [`/security/workspaces/{workspace_id}/rules/{rule_id}`](https://www.fastly.com/documentation/reference/api/security/rules) (DELETE, GET, PATCH) +- [`/security/workspaces/{workspace_id}/rules`](https://www.fastly.com/documentation/reference/api/security/rules) (GET, POST) +- [`/security/workspaces/{workspace_id}/timeseries`](https://www.fastly.com/documentation/reference/api/security/timeseries) (GET) +- [`/security/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`](https://www.fastly.com/documentation/reference/api/security/virtual-patches) (GET, PATCH) +- [`/security/workspaces/{workspace_id}/virtual-patches`](https://www.fastly.com/documentation/reference/api/security/virtual-patches) (GET) +- [`/security/workspaces/{workspace_id}`](https://www.fastly.com/documentation/reference/api/security/workspaces) (DELETE, GET, PATCH) +- [`/security/workspaces`](https://www.fastly.com/documentation/reference/api/security/workspaces) (GET, POST) - [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) - [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) - [`/tls/configurations/{tls_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) diff --git a/docs/Api/BackendApi.md b/docs/Api/BackendApi.md index 7ae04cac..819bda74 100644 --- a/docs/Api/BackendApi.md +++ b/docs/Api/BackendApi.md @@ -54,7 +54,7 @@ $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum all $options['name'] = 'name_example'; // string | The name of the backend. $options['override_host'] = 'override_host_example'; // string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. $options['port'] = 56; // int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. -$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections for DNS hostname lookups. +$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections to origins for hostname backends. $options['request_condition'] = 'request_condition_example'; // string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. $options['share_key'] = 'share_key_example'; // string | Value that when shared across backends will enable those backends to share the same health check. $options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). @@ -106,7 +106,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] @@ -275,7 +275,7 @@ $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum all $options['name'] = 'name_example'; // string | The name of the backend. $options['override_host'] = 'override_host_example'; // string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. $options['port'] = 56; // int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. -$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections for DNS hostname lookups. +$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections to origins for hostname backends. $options['request_condition'] = 'request_condition_example'; // string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. $options['share_key'] = 'share_key_example'; // string | Value that when shared across backends will enable those backends to share the same health check. $options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). @@ -328,7 +328,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] diff --git a/docs/Api/LoggingAzureblobApi.md b/docs/Api/LoggingAzureblobApi.md index 9de34647..fbd38ac9 100644 --- a/docs/Api/LoggingAzureblobApi.md +++ b/docs/Api/LoggingAzureblobApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -251,7 +251,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_azureblob_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingBigqueryApi.md b/docs/Api/LoggingBigqueryApi.md index aeb7ce42..9f760725 100644 --- a/docs/Api/LoggingBigqueryApi.md +++ b/docs/Api/LoggingBigqueryApi.md @@ -65,7 +65,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -239,7 +239,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_bigquery_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingCloudfilesApi.md b/docs/Api/LoggingCloudfilesApi.md index 173a5286..49673cce 100644 --- a/docs/Api/LoggingCloudfilesApi.md +++ b/docs/Api/LoggingCloudfilesApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -251,7 +251,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_cloudfiles_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingDatadogApi.md b/docs/Api/LoggingDatadogApi.md index 79477a6d..a1265509 100644 --- a/docs/Api/LoggingDatadogApi.md +++ b/docs/Api/LoggingDatadogApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_datadog_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingDigitaloceanApi.md b/docs/Api/LoggingDigitaloceanApi.md index 5b35e808..7166deaf 100644 --- a/docs/Api/LoggingDigitaloceanApi.md +++ b/docs/Api/LoggingDigitaloceanApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -251,7 +251,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_digitalocean_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingElasticsearchApi.md b/docs/Api/LoggingElasticsearchApi.md index 83079dd8..828b7f08 100644 --- a/docs/Api/LoggingElasticsearchApi.md +++ b/docs/Api/LoggingElasticsearchApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -251,7 +251,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_elasticsearch_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingFtpApi.md b/docs/Api/LoggingFtpApi.md index 75b50c45..7e9c1f3e 100644 --- a/docs/Api/LoggingFtpApi.md +++ b/docs/Api/LoggingFtpApi.md @@ -71,7 +71,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -257,7 +257,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_ftp_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingGcsApi.md b/docs/Api/LoggingGcsApi.md index fcc205bb..3010b455 100644 --- a/docs/Api/LoggingGcsApi.md +++ b/docs/Api/LoggingGcsApi.md @@ -70,7 +70,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -254,7 +254,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_gcs_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingGrafanacloudlogsApi.md b/docs/Api/LoggingGrafanacloudlogsApi.md index e1579473..61811cfc 100644 --- a/docs/Api/LoggingGrafanacloudlogsApi.md +++ b/docs/Api/LoggingGrafanacloudlogsApi.md @@ -62,7 +62,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -230,7 +230,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_grafanacloudlogs_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingHerokuApi.md b/docs/Api/LoggingHerokuApi.md index 489235a2..8ca3195f 100644 --- a/docs/Api/LoggingHerokuApi.md +++ b/docs/Api/LoggingHerokuApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_heroku_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingHoneycombApi.md b/docs/Api/LoggingHoneycombApi.md index 1e84bc17..632b7dac 100644 --- a/docs/Api/LoggingHoneycombApi.md +++ b/docs/Api/LoggingHoneycombApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_honeycomb_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingHttpsApi.md b/docs/Api/LoggingHttpsApi.md index ebfd6f8e..8e386a59 100644 --- a/docs/Api/LoggingHttpsApi.md +++ b/docs/Api/LoggingHttpsApi.md @@ -71,7 +71,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -257,7 +257,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_https_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingKafkaApi.md b/docs/Api/LoggingKafkaApi.md index 7bff23fe..67b64a01 100644 --- a/docs/Api/LoggingKafkaApi.md +++ b/docs/Api/LoggingKafkaApi.md @@ -72,7 +72,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingLogentriesApi.md b/docs/Api/LoggingLogentriesApi.md index 933e9042..f9c8f256 100644 --- a/docs/Api/LoggingLogentriesApi.md +++ b/docs/Api/LoggingLogentriesApi.md @@ -62,7 +62,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -230,7 +230,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_logentries_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingLogglyApi.md b/docs/Api/LoggingLogglyApi.md index a00b8e33..f92b3601 100644 --- a/docs/Api/LoggingLogglyApi.md +++ b/docs/Api/LoggingLogglyApi.md @@ -59,7 +59,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -221,7 +221,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_loggly_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingLogshuttleApi.md b/docs/Api/LoggingLogshuttleApi.md index 8b1d2679..3148d934 100644 --- a/docs/Api/LoggingLogshuttleApi.md +++ b/docs/Api/LoggingLogshuttleApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_logshuttle_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingNewrelicApi.md b/docs/Api/LoggingNewrelicApi.md index b9bc1a45..de8d403f 100644 --- a/docs/Api/LoggingNewrelicApi.md +++ b/docs/Api/LoggingNewrelicApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_newrelic_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingNewrelicotlpApi.md b/docs/Api/LoggingNewrelicotlpApi.md index 02cf0476..53e1b01a 100644 --- a/docs/Api/LoggingNewrelicotlpApi.md +++ b/docs/Api/LoggingNewrelicotlpApi.md @@ -61,7 +61,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -227,7 +227,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_newrelicotlp_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingOpenstackApi.md b/docs/Api/LoggingOpenstackApi.md index 4b9f21ef..294c20a1 100644 --- a/docs/Api/LoggingOpenstackApi.md +++ b/docs/Api/LoggingOpenstackApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -251,7 +251,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_openstack_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingPapertrailApi.md b/docs/Api/LoggingPapertrailApi.md index 041b1dff..bbf2cdc2 100644 --- a/docs/Api/LoggingPapertrailApi.md +++ b/docs/Api/LoggingPapertrailApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_papertrail_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingPubsubApi.md b/docs/Api/LoggingPubsubApi.md index da75fb59..40d4b21b 100644 --- a/docs/Api/LoggingPubsubApi.md +++ b/docs/Api/LoggingPubsubApi.md @@ -63,7 +63,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -233,7 +233,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_google_pubsub_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingS3Api.md b/docs/Api/LoggingS3Api.md index 56ec7a23..77f8ecc0 100644 --- a/docs/Api/LoggingS3Api.md +++ b/docs/Api/LoggingS3Api.md @@ -75,7 +75,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -269,7 +269,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_s3_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingScalyrApi.md b/docs/Api/LoggingScalyrApi.md index 030364ee..b70dffb4 100644 --- a/docs/Api/LoggingScalyrApi.md +++ b/docs/Api/LoggingScalyrApi.md @@ -61,7 +61,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -227,7 +227,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_scalyr_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingSftpApi.md b/docs/Api/LoggingSftpApi.md index 5f31ac14..e9966bd5 100644 --- a/docs/Api/LoggingSftpApi.md +++ b/docs/Api/LoggingSftpApi.md @@ -71,7 +71,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -257,7 +257,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_sftp_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingSplunkApi.md b/docs/Api/LoggingSplunkApi.md index f38599f4..9a714fc6 100644 --- a/docs/Api/LoggingSplunkApi.md +++ b/docs/Api/LoggingSplunkApi.md @@ -67,7 +67,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -245,7 +245,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_splunk_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingSumologicApi.md b/docs/Api/LoggingSumologicApi.md index 918dc584..e43ab58a 100644 --- a/docs/Api/LoggingSumologicApi.md +++ b/docs/Api/LoggingSumologicApi.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -224,7 +224,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_sumologic_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/LoggingSyslogApi.md b/docs/Api/LoggingSyslogApi.md index cba03660..7d6ded1f 100644 --- a/docs/Api/LoggingSyslogApi.md +++ b/docs/Api/LoggingSyslogApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] @@ -251,7 +251,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **logging_syslog_name** | **string** | The name for the real-time logging configuration. | **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Api/ServiceApi.md b/docs/Api/ServiceApi.md index 72d0edc6..4d1663de 100644 --- a/docs/Api/ServiceApi.md +++ b/docs/Api/ServiceApi.md @@ -147,6 +147,7 @@ List detailed information on a specified service. ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version'] = 56; // int | Number identifying a version of the service. +$options['filter_versions_active'] = True; // bool | Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). try { $result = $apiInstance->getServiceDetail($options); @@ -163,6 +164,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | **version** | **int** | Number identifying a version of the service. | [optional] +**filter_versions_active** | **bool** | Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). | [optional] ### Return type diff --git a/docs/Model/Backend.md b/docs/Model/Backend.md index 41ab9d15..5fcc6ef8 100644 --- a/docs/Model/Backend.md +++ b/docs/Model/Backend.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] diff --git a/docs/Model/BackendResponse.md b/docs/Model/BackendResponse.md index 4ae8bd32..a2e4ffec 100644 --- a/docs/Model/BackendResponse.md +++ b/docs/Model/BackendResponse.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections for DNS hostname lookups. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] **shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] diff --git a/docs/Model/LoggingAzureblobResponse.md b/docs/Model/LoggingAzureblobResponse.md index 6487a5a2..f5a6d534 100644 --- a/docs/Model/LoggingAzureblobResponse.md +++ b/docs/Model/LoggingAzureblobResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingBigqueryResponse.md b/docs/Model/LoggingBigqueryResponse.md index f5640627..6e01b309 100644 --- a/docs/Model/LoggingBigqueryResponse.md +++ b/docs/Model/LoggingBigqueryResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingCloudfilesResponse.md b/docs/Model/LoggingCloudfilesResponse.md index cd9345cd..71dc95a2 100644 --- a/docs/Model/LoggingCloudfilesResponse.md +++ b/docs/Model/LoggingCloudfilesResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingCommon.md b/docs/Model/LoggingCommon.md index c5bd4a8c..e08307ba 100644 --- a/docs/Model/LoggingCommon.md +++ b/docs/Model/LoggingCommon.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] diff --git a/docs/Model/LoggingCommonResponse.md b/docs/Model/LoggingCommonResponse.md index ad40a7bd..b9d566de 100644 --- a/docs/Model/LoggingCommonResponse.md +++ b/docs/Model/LoggingCommonResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingCommonResponseAllOf.md b/docs/Model/LoggingCommonResponseAllOf.md index a4994b62..43ae9f98 100644 --- a/docs/Model/LoggingCommonResponseAllOf.md +++ b/docs/Model/LoggingCommonResponseAllOf.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] diff --git a/docs/Model/LoggingDatadogResponse.md b/docs/Model/LoggingDatadogResponse.md index 0225e82e..07ccc2ca 100644 --- a/docs/Model/LoggingDatadogResponse.md +++ b/docs/Model/LoggingDatadogResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingDigitaloceanResponse.md b/docs/Model/LoggingDigitaloceanResponse.md index 00341d8f..1527b685 100644 --- a/docs/Model/LoggingDigitaloceanResponse.md +++ b/docs/Model/LoggingDigitaloceanResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingElasticsearchResponse.md b/docs/Model/LoggingElasticsearchResponse.md index eded69ee..bfcdb09c 100644 --- a/docs/Model/LoggingElasticsearchResponse.md +++ b/docs/Model/LoggingElasticsearchResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingFtpResponse.md b/docs/Model/LoggingFtpResponse.md index 77377264..25f26e33 100644 --- a/docs/Model/LoggingFtpResponse.md +++ b/docs/Model/LoggingFtpResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingGcsResponse.md b/docs/Model/LoggingGcsResponse.md index 162877e1..5f733505 100644 --- a/docs/Model/LoggingGcsResponse.md +++ b/docs/Model/LoggingGcsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingGooglePubsubResponse.md b/docs/Model/LoggingGooglePubsubResponse.md index 3e8df75e..2052fe3a 100644 --- a/docs/Model/LoggingGooglePubsubResponse.md +++ b/docs/Model/LoggingGooglePubsubResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingGrafanacloudlogsResponse.md b/docs/Model/LoggingGrafanacloudlogsResponse.md index 533878b2..13c1de99 100644 --- a/docs/Model/LoggingGrafanacloudlogsResponse.md +++ b/docs/Model/LoggingGrafanacloudlogsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingHerokuResponse.md b/docs/Model/LoggingHerokuResponse.md index e353e053..edf9fbc3 100644 --- a/docs/Model/LoggingHerokuResponse.md +++ b/docs/Model/LoggingHerokuResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingHoneycombResponse.md b/docs/Model/LoggingHoneycombResponse.md index 2d7d0ab7..ae8f2d57 100644 --- a/docs/Model/LoggingHoneycombResponse.md +++ b/docs/Model/LoggingHoneycombResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingHttpsResponse.md b/docs/Model/LoggingHttpsResponse.md index 95834439..b30ea202 100644 --- a/docs/Model/LoggingHttpsResponse.md +++ b/docs/Model/LoggingHttpsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingKafkaResponse.md b/docs/Model/LoggingKafkaResponse.md index f2c281df..2c4ab5f7 100644 --- a/docs/Model/LoggingKafkaResponse.md +++ b/docs/Model/LoggingKafkaResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingKafkaResponsePost.md b/docs/Model/LoggingKafkaResponsePost.md index 11b8c57e..d863ce78 100644 --- a/docs/Model/LoggingKafkaResponsePost.md +++ b/docs/Model/LoggingKafkaResponsePost.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] diff --git a/docs/Model/LoggingLogentriesResponse.md b/docs/Model/LoggingLogentriesResponse.md index e2dec6cd..da142e2b 100644 --- a/docs/Model/LoggingLogentriesResponse.md +++ b/docs/Model/LoggingLogentriesResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingLogglyResponse.md b/docs/Model/LoggingLogglyResponse.md index e43f5047..b112858b 100644 --- a/docs/Model/LoggingLogglyResponse.md +++ b/docs/Model/LoggingLogglyResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingLogshuttleResponse.md b/docs/Model/LoggingLogshuttleResponse.md index 38362e0b..94c5ac3c 100644 --- a/docs/Model/LoggingLogshuttleResponse.md +++ b/docs/Model/LoggingLogshuttleResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingNewrelicResponse.md b/docs/Model/LoggingNewrelicResponse.md index 28deb0a9..7dcf0ca9 100644 --- a/docs/Model/LoggingNewrelicResponse.md +++ b/docs/Model/LoggingNewrelicResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingNewrelicotlpResponse.md b/docs/Model/LoggingNewrelicotlpResponse.md index 5a6eda15..1681b176 100644 --- a/docs/Model/LoggingNewrelicotlpResponse.md +++ b/docs/Model/LoggingNewrelicotlpResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingOpenstackResponse.md b/docs/Model/LoggingOpenstackResponse.md index e1986e6a..ce2fbbf3 100644 --- a/docs/Model/LoggingOpenstackResponse.md +++ b/docs/Model/LoggingOpenstackResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingPapertrailResponse.md b/docs/Model/LoggingPapertrailResponse.md index d1bdb305..39a2334d 100644 --- a/docs/Model/LoggingPapertrailResponse.md +++ b/docs/Model/LoggingPapertrailResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingS3Response.md b/docs/Model/LoggingS3Response.md index 4d778c90..9a692822 100644 --- a/docs/Model/LoggingS3Response.md +++ b/docs/Model/LoggingS3Response.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingScalyrResponse.md b/docs/Model/LoggingScalyrResponse.md index 05a534e8..ca5238d6 100644 --- a/docs/Model/LoggingScalyrResponse.md +++ b/docs/Model/LoggingScalyrResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingSftpResponse.md b/docs/Model/LoggingSftpResponse.md index f48c11af..ec3ebf67 100644 --- a/docs/Model/LoggingSftpResponse.md +++ b/docs/Model/LoggingSftpResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingSplunkResponse.md b/docs/Model/LoggingSplunkResponse.md index 109bdce1..f26d6d72 100644 --- a/docs/Model/LoggingSplunkResponse.md +++ b/docs/Model/LoggingSplunkResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingSumologicResponse.md b/docs/Model/LoggingSumologicResponse.md index 8337e285..09157479 100644 --- a/docs/Model/LoggingSumologicResponse.md +++ b/docs/Model/LoggingSumologicResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingSyslogResponse.md b/docs/Model/LoggingSyslogResponse.md index 0d1fd726..4dd23c49 100644 --- a/docs/Model/LoggingSyslogResponse.md +++ b/docs/Model/LoggingSyslogResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] -**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'waf_debug', 'null'] +**placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] **format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/Results.md b/docs/Model/Results.md index 68ff2f62..43505dc1 100644 --- a/docs/Model/Results.md +++ b/docs/Model/Results.md @@ -267,9 +267,9 @@ Name | Type | Description | Notes **compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] **ngwaf_requests_total_count** | **int** | Total number of Next-Gen WAF (Edge WAF & Core WAF) requests. | [optional] **ngwaf_requests_unknown_count** | **int** | Count of Edge WAF requests with an unknown outcome. | [optional] -**ngwaf_requests_allowed_count** | **int** | Count of Edge WAF requests allowed. | [optional] +**ngwaf_requests_allowed_count** | **int** | Count of Next-Gen WAF (Edge WAF & Core WAF) requests allowed. | [optional] **ngwaf_requests_logged_count** | **int** | Count of Edge WAF requests logged. | [optional] -**ngwaf_requests_blocked_count** | **int** | Count of Edge WAF requests blocked. | [optional] +**ngwaf_requests_blocked_count** | **int** | Count of Next-Gen WAF (Edge WAF & Core WAF) requests blocked. | [optional] **ngwaf_requests_timeout_count** | **int** | Count of Edge WAF requests timed outcome. | [optional] **ngwaf_requests_challenged_count** | **int** | Count of Edge WAF requests challenged. | [optional] **service_id** | **string** | | [optional] [readonly] diff --git a/lib/Api/BackendApi.php b/lib/Api/BackendApi.php index b31b7fa3..a2fab6f8 100644 --- a/lib/Api/BackendApi.php +++ b/lib/Api/BackendApi.php @@ -139,7 +139,7 @@ public function getConfig() * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -198,7 +198,7 @@ public function createBackend($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -345,7 +345,7 @@ public function createBackendWithHttpInfo($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -407,7 +407,7 @@ function ($response) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -495,7 +495,7 @@ function ($exception) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -1912,7 +1912,7 @@ public function listBackendsRequest($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -1972,7 +1972,7 @@ public function updateBackend($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2120,7 +2120,7 @@ public function updateBackendWithHttpInfo($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2183,7 +2183,7 @@ function ($response) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) @@ -2272,7 +2272,7 @@ function ($exception) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) diff --git a/lib/Api/ServiceApi.php b/lib/Api/ServiceApi.php index fdfc1520..45031c37 100644 --- a/lib/Api/ServiceApi.php +++ b/lib/Api/ServiceApi.php @@ -1107,6 +1107,7 @@ public function getServiceRequest($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version Number identifying a version of the service. (optional) + * @param bool $filter_versions_active Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1130,6 +1131,7 @@ public function getServiceDetail($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version Number identifying a version of the service. (optional) + * @param bool $filter_versions_active Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1241,6 +1243,7 @@ public function getServiceDetailWithHttpInfo($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version Number identifying a version of the service. (optional) + * @param bool $filter_versions_active Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1267,6 +1270,7 @@ function ($response) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version Number identifying a version of the service. (optional) + * @param bool $filter_versions_active Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1319,6 +1323,7 @@ function ($exception) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version Number identifying a version of the service. (optional) + * @param bool $filter_versions_active Limits the versions array to the active versions. Accepts `true` or `false` (defaults to false). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1328,6 +1333,7 @@ public function getServiceDetailRequest($options) // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; $version = array_key_exists('version', $options) ? $options['version'] : null; + $filter_versions_active = array_key_exists('filter_versions_active', $options) ? $options['filter_versions_active'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -1358,6 +1364,17 @@ public function getServiceDetailRequest($options) $queryParams['version'] = ObjectSerializer::toString($version); } } + // query params + if ($filter_versions_active !== null) { + if('form' === 'form' && is_array($filter_versions_active)) { + foreach($filter_versions_active as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['filter[versions.active]'] = ObjectSerializer::toString($filter_versions_active); + } + } // path params diff --git a/lib/Configuration.php b/lib/Configuration.php index adb6ba27..58b3501c 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/9.0.0'; + protected $userAgent = 'fastly-php/10.0.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 9.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 10.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/Backend.php b/lib/Model/Backend.php index d4c03ed8..3922ff68 100644 --- a/lib/Model/Backend.php +++ b/lib/Model/Backend.php @@ -858,7 +858,7 @@ public function getPreferIpv6() /** * Sets prefer_ipv6 * - * @param bool|null $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. + * @param bool|null $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. * * @return self */ diff --git a/lib/Model/BackendResponse.php b/lib/Model/BackendResponse.php index b53d75d6..7eefd204 100644 --- a/lib/Model/BackendResponse.php +++ b/lib/Model/BackendResponse.php @@ -894,7 +894,7 @@ public function getPreferIpv6() /** * Sets prefer_ipv6 * - * @param bool|null $prefer_ipv6 Prefer IPv6 connections for DNS hostname lookups. + * @param bool|null $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. * * @return self */ diff --git a/lib/Model/LoggingAzureblobResponse.php b/lib/Model/LoggingAzureblobResponse.php index a54cd3a5..e604a024 100644 --- a/lib/Model/LoggingAzureblobResponse.php +++ b/lib/Model/LoggingAzureblobResponse.php @@ -257,7 +257,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -278,7 +277,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingBigqueryResponse.php b/lib/Model/LoggingBigqueryResponse.php index 7d4f889c..84f776c7 100644 --- a/lib/Model/LoggingBigqueryResponse.php +++ b/lib/Model/LoggingBigqueryResponse.php @@ -237,7 +237,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -251,7 +250,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingCloudfilesResponse.php b/lib/Model/LoggingCloudfilesResponse.php index 52a79fa9..8f9556cf 100644 --- a/lib/Model/LoggingCloudfilesResponse.php +++ b/lib/Model/LoggingCloudfilesResponse.php @@ -257,7 +257,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -285,7 +284,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingCommon.php b/lib/Model/LoggingCommon.php index f7077b60..d0073b7a 100644 --- a/lib/Model/LoggingCommon.php +++ b/lib/Model/LoggingCommon.php @@ -172,7 +172,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; /** @@ -184,7 +183,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingCommonResponse.php b/lib/Model/LoggingCommonResponse.php index 97b4fa57..2083aaed 100644 --- a/lib/Model/LoggingCommonResponse.php +++ b/lib/Model/LoggingCommonResponse.php @@ -177,7 +177,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -191,7 +190,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingCommonResponseAllOf.php b/lib/Model/LoggingCommonResponseAllOf.php index ce8d9257..70a9120c 100644 --- a/lib/Model/LoggingCommonResponseAllOf.php +++ b/lib/Model/LoggingCommonResponseAllOf.php @@ -172,7 +172,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; /** @@ -184,7 +183,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingDatadogResponse.php b/lib/Model/LoggingDatadogResponse.php index 8e707b0a..50bed1c2 100644 --- a/lib/Model/LoggingDatadogResponse.php +++ b/lib/Model/LoggingDatadogResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -232,7 +231,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingDigitaloceanResponse.php b/lib/Model/LoggingDigitaloceanResponse.php index ce1ed016..aac8d3c5 100644 --- a/lib/Model/LoggingDigitaloceanResponse.php +++ b/lib/Model/LoggingDigitaloceanResponse.php @@ -257,7 +257,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -278,7 +277,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingElasticsearchResponse.php b/lib/Model/LoggingElasticsearchResponse.php index 7d196b39..66eb73a0 100644 --- a/lib/Model/LoggingElasticsearchResponse.php +++ b/lib/Model/LoggingElasticsearchResponse.php @@ -257,7 +257,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -271,7 +270,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingFtpResponse.php b/lib/Model/LoggingFtpResponse.php index d7d9e158..2e4c9be5 100644 --- a/lib/Model/LoggingFtpResponse.php +++ b/lib/Model/LoggingFtpResponse.php @@ -267,7 +267,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -288,7 +287,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingGcsResponse.php b/lib/Model/LoggingGcsResponse.php index f522a52f..6f352298 100644 --- a/lib/Model/LoggingGcsResponse.php +++ b/lib/Model/LoggingGcsResponse.php @@ -262,7 +262,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -283,7 +282,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingGooglePubsubResponse.php b/lib/Model/LoggingGooglePubsubResponse.php index 730946ca..b3b1006b 100644 --- a/lib/Model/LoggingGooglePubsubResponse.php +++ b/lib/Model/LoggingGooglePubsubResponse.php @@ -227,7 +227,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -241,7 +240,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingGrafanacloudlogsResponse.php b/lib/Model/LoggingGrafanacloudlogsResponse.php index 33dd2943..26414426 100644 --- a/lib/Model/LoggingGrafanacloudlogsResponse.php +++ b/lib/Model/LoggingGrafanacloudlogsResponse.php @@ -222,7 +222,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -236,7 +235,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingHerokuResponse.php b/lib/Model/LoggingHerokuResponse.php index bc559337..cc3c5642 100644 --- a/lib/Model/LoggingHerokuResponse.php +++ b/lib/Model/LoggingHerokuResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -226,7 +225,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingHoneycombResponse.php b/lib/Model/LoggingHoneycombResponse.php index 2b900087..70e51791 100644 --- a/lib/Model/LoggingHoneycombResponse.php +++ b/lib/Model/LoggingHoneycombResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -226,7 +225,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingHttpsResponse.php b/lib/Model/LoggingHttpsResponse.php index f69451d3..ff891772 100644 --- a/lib/Model/LoggingHttpsResponse.php +++ b/lib/Model/LoggingHttpsResponse.php @@ -267,7 +267,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -286,7 +285,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingKafkaResponse.php b/lib/Model/LoggingKafkaResponse.php index afe62448..702ce21e 100644 --- a/lib/Model/LoggingKafkaResponse.php +++ b/lib/Model/LoggingKafkaResponse.php @@ -272,7 +272,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -296,7 +295,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingKafkaResponsePost.php b/lib/Model/LoggingKafkaResponsePost.php index cef922ea..8524721b 100644 --- a/lib/Model/LoggingKafkaResponsePost.php +++ b/lib/Model/LoggingKafkaResponsePost.php @@ -272,7 +272,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = 1; const FORMAT_VERSION_v2 = 2; @@ -296,7 +295,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingLogentriesResponse.php b/lib/Model/LoggingLogentriesResponse.php index 6a1e818b..62400e99 100644 --- a/lib/Model/LoggingLogentriesResponse.php +++ b/lib/Model/LoggingLogentriesResponse.php @@ -222,7 +222,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -243,7 +242,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingLogglyResponse.php b/lib/Model/LoggingLogglyResponse.php index dbce9ea6..02844707 100644 --- a/lib/Model/LoggingLogglyResponse.php +++ b/lib/Model/LoggingLogglyResponse.php @@ -207,7 +207,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -221,7 +220,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingLogshuttleResponse.php b/lib/Model/LoggingLogshuttleResponse.php index 238d6a21..dffe5b72 100644 --- a/lib/Model/LoggingLogshuttleResponse.php +++ b/lib/Model/LoggingLogshuttleResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -226,7 +225,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingNewrelicResponse.php b/lib/Model/LoggingNewrelicResponse.php index 76efe8fc..fe096da0 100644 --- a/lib/Model/LoggingNewrelicResponse.php +++ b/lib/Model/LoggingNewrelicResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -228,7 +227,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingNewrelicotlpResponse.php b/lib/Model/LoggingNewrelicotlpResponse.php index 41c53826..9cbfb9e1 100644 --- a/lib/Model/LoggingNewrelicotlpResponse.php +++ b/lib/Model/LoggingNewrelicotlpResponse.php @@ -217,7 +217,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -233,7 +232,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingOpenstackResponse.php b/lib/Model/LoggingOpenstackResponse.php index a999ecf7..7c750af4 100644 --- a/lib/Model/LoggingOpenstackResponse.php +++ b/lib/Model/LoggingOpenstackResponse.php @@ -257,7 +257,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -278,7 +277,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingPapertrailResponse.php b/lib/Model/LoggingPapertrailResponse.php index fdcf34e5..dd8cfd21 100644 --- a/lib/Model/LoggingPapertrailResponse.php +++ b/lib/Model/LoggingPapertrailResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -226,7 +225,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingPlacement.php b/lib/Model/LoggingPlacement.php index 3e561cb1..e0911671 100644 --- a/lib/Model/LoggingPlacement.php +++ b/lib/Model/LoggingPlacement.php @@ -39,8 +39,6 @@ class LoggingPlacement */ const NONE = 'none'; - const WAF_DEBUG = 'waf_debug'; - const NULL = 'null'; /** @@ -51,7 +49,6 @@ public static function getAllowableEnumValues() { return [ self::NONE, - self::WAF_DEBUG, self::NULL ]; } diff --git a/lib/Model/LoggingS3Response.php b/lib/Model/LoggingS3Response.php index 33287eee..11ef4480 100644 --- a/lib/Model/LoggingS3Response.php +++ b/lib/Model/LoggingS3Response.php @@ -287,7 +287,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -308,7 +307,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingScalyrResponse.php b/lib/Model/LoggingScalyrResponse.php index 130e8771..98004000 100644 --- a/lib/Model/LoggingScalyrResponse.php +++ b/lib/Model/LoggingScalyrResponse.php @@ -217,7 +217,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -233,7 +232,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingSftpResponse.php b/lib/Model/LoggingSftpResponse.php index cf585ada..75f451d7 100644 --- a/lib/Model/LoggingSftpResponse.php +++ b/lib/Model/LoggingSftpResponse.php @@ -267,7 +267,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -288,7 +287,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingSplunkResponse.php b/lib/Model/LoggingSplunkResponse.php index 670943ab..3a298675 100644 --- a/lib/Model/LoggingSplunkResponse.php +++ b/lib/Model/LoggingSplunkResponse.php @@ -247,7 +247,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -261,7 +260,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingSumologicResponse.php b/lib/Model/LoggingSumologicResponse.php index 0dbfb886..cf0dba82 100644 --- a/lib/Model/LoggingSumologicResponse.php +++ b/lib/Model/LoggingSumologicResponse.php @@ -212,7 +212,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -226,7 +225,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/LoggingSyslogResponse.php b/lib/Model/LoggingSyslogResponse.php index b33019bf..0fc56378 100644 --- a/lib/Model/LoggingSyslogResponse.php +++ b/lib/Model/LoggingSyslogResponse.php @@ -257,7 +257,6 @@ public function getModelName() } const PLACEMENT_NONE = 'none'; - const PLACEMENT_WAF_DEBUG = 'waf_debug'; const PLACEMENT_NULL = 'null'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -271,7 +270,6 @@ public function getPlacementAllowableValues() { return [ self::PLACEMENT_NONE, - self::PLACEMENT_WAF_DEBUG, self::PLACEMENT_NULL, ]; } diff --git a/lib/Model/Results.php b/lib/Model/Results.php index e2b2d4de..e8ac52f9 100644 --- a/lib/Model/Results.php +++ b/lib/Model/Results.php @@ -8143,7 +8143,7 @@ public function getNgwafRequestsAllowedCount() /** * Sets ngwaf_requests_allowed_count * - * @param int|null $ngwaf_requests_allowed_count Count of Edge WAF requests allowed. + * @param int|null $ngwaf_requests_allowed_count Count of Next-Gen WAF (Edge WAF & Core WAF) requests allowed. * * @return self */ @@ -8191,7 +8191,7 @@ public function getNgwafRequestsBlockedCount() /** * Sets ngwaf_requests_blocked_count * - * @param int|null $ngwaf_requests_blocked_count Count of Edge WAF requests blocked. + * @param int|null $ngwaf_requests_blocked_count Count of Next-Gen WAF (Edge WAF & Core WAF) requests blocked. * * @return self */ diff --git a/sig.json b/sig.json index df49b766..48c02df4 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "38dbf5ed", "D": "fed72b8e"} +{"G": "bb3cb969", "D": "cabf600c"} From d3b57c3ea8edb593cfaad41f7c6c435d1be04bf4 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 8 Jul 2025 04:43:18 +0000 Subject: [PATCH 5/8] Generated v10.1.0 --- CHANGELOG.md | 18 + README.md | 7 +- docs/Api/BackendApi.md | 16 +- docs/Api/InvitationsApi.md | 4 +- docs/Api/LoggingAzureblobApi.md | 12 +- docs/Api/LoggingBigqueryApi.md | 12 +- docs/Api/LoggingCloudfilesApi.md | 12 +- docs/Api/LoggingDatadogApi.md | 12 +- docs/Api/LoggingDigitaloceanApi.md | 12 +- docs/Api/LoggingElasticsearchApi.md | 12 +- docs/Api/LoggingFtpApi.md | 12 +- docs/Api/LoggingGcsApi.md | 12 +- docs/Api/LoggingGrafanacloudlogsApi.md | 12 +- docs/Api/LoggingHerokuApi.md | 12 +- docs/Api/LoggingHoneycombApi.md | 12 +- docs/Api/LoggingHttpsApi.md | 12 +- docs/Api/LoggingKafkaApi.md | 6 +- docs/Api/LoggingKinesisApi.md | 4 +- docs/Api/LoggingLogentriesApi.md | 12 +- docs/Api/LoggingLogglyApi.md | 12 +- docs/Api/LoggingLogshuttleApi.md | 12 +- docs/Api/LoggingNewrelicApi.md | 12 +- docs/Api/LoggingNewrelicotlpApi.md | 12 +- docs/Api/LoggingOpenstackApi.md | 12 +- docs/Api/LoggingPapertrailApi.md | 12 +- docs/Api/LoggingPubsubApi.md | 12 +- docs/Api/LoggingS3Api.md | 12 +- docs/Api/LoggingScalyrApi.md | 12 +- docs/Api/LoggingSftpApi.md | 12 +- docs/Api/LoggingSplunkApi.md | 12 +- docs/Api/LoggingSumologicApi.md | 12 +- docs/Api/LoggingSyslogApi.md | 12 +- docs/Api/PoolApi.md | 8 +- docs/Api/PurgeApi.md | 2 +- docs/Model/Backend.md | 4 +- docs/Model/BackendResponse.md | 4 +- docs/Model/Invitation.md | 2 +- docs/Model/InvitationCreateData.md | 12 + docs/Model/InvitationCreateDataAllOf.md | 10 + ...esponse.md => InvitationCreateResponse.md} | 2 +- ...Of.md => InvitationCreateResponseAllOf.md} | 2 +- docs/Model/InvitationData.md | 1 - docs/Model/InvitationResponseData.md | 2 +- docs/Model/LoggingAzureblobResponse.md | 3 +- docs/Model/LoggingBigqueryAdditional.md | 2 +- docs/Model/LoggingBigqueryResponse.md | 3 +- docs/Model/LoggingCloudfilesResponse.md | 3 +- docs/Model/LoggingCommon.md | 3 +- docs/Model/LoggingCommonResponse.md | 3 +- docs/Model/LoggingCommonResponseAllOf.md | 3 +- docs/Model/LoggingDatadogAdditional.md | 2 +- docs/Model/LoggingDatadogResponse.md | 3 +- docs/Model/LoggingDigitaloceanResponse.md | 3 +- docs/Model/LoggingElasticsearchAdditional.md | 2 +- docs/Model/LoggingElasticsearchResponse.md | 3 +- docs/Model/LoggingFtpResponse.md | 3 +- docs/Model/LoggingGcsResponse.md | 3 +- docs/Model/LoggingGooglePubsubAdditional.md | 2 +- docs/Model/LoggingGooglePubsubResponse.md | 3 +- .../LoggingGrafanacloudlogsAdditional.md | 2 +- docs/Model/LoggingGrafanacloudlogsResponse.md | 3 +- docs/Model/LoggingHerokuResponse.md | 3 +- docs/Model/LoggingHoneycombAdditional.md | 2 +- docs/Model/LoggingHoneycombResponse.md | 3 +- docs/Model/LoggingHttpsAdditional.md | 2 +- docs/Model/LoggingHttpsResponse.md | 3 +- docs/Model/LoggingKafkaResponse.md | 3 +- docs/Model/LoggingKafkaResponsePost.md | 3 +- docs/Model/LoggingKinesisAdditional.md | 2 +- docs/Model/LoggingKinesisResponse.md | 2 +- docs/Model/LoggingLogentriesResponse.md | 3 +- docs/Model/LoggingLogglyResponse.md | 3 +- docs/Model/LoggingLogshuttleResponse.md | 3 +- docs/Model/LoggingNewrelicAdditional.md | 2 +- docs/Model/LoggingNewrelicResponse.md | 3 +- docs/Model/LoggingNewrelicotlpAdditional.md | 2 +- docs/Model/LoggingNewrelicotlpResponse.md | 3 +- docs/Model/LoggingOpenstackResponse.md | 3 +- docs/Model/LoggingPapertrailResponse.md | 3 +- docs/Model/LoggingS3Response.md | 3 +- docs/Model/LoggingScalyrResponse.md | 3 +- docs/Model/LoggingSftpResponse.md | 3 +- docs/Model/LoggingSplunkResponse.md | 3 +- docs/Model/LoggingSumologicResponse.md | 3 +- docs/Model/LoggingSyslogResponse.md | 3 +- docs/Model/PoolAdditional.md | 2 +- docs/Model/PoolResponse.md | 2 +- docs/Model/PoolResponsePost.md | 2 +- docs/Model/TlsCertificateDataAttributes.md | 1 + docs/Model/TlsCsrData.md | 1 - docs/Model/TlsCsrDataAttributes.md | 1 + lib/Api/BackendApi.php | 40 +- lib/Api/InvitationsApi.php | 14 +- lib/Api/LoggingAzureblobApi.php | 40 +- lib/Api/LoggingBigqueryApi.php | 40 +- lib/Api/LoggingCloudfilesApi.php | 40 +- lib/Api/LoggingDatadogApi.php | 40 +- lib/Api/LoggingDigitaloceanApi.php | 40 +- lib/Api/LoggingElasticsearchApi.php | 40 +- lib/Api/LoggingFtpApi.php | 40 +- lib/Api/LoggingGcsApi.php | 40 +- lib/Api/LoggingGrafanacloudlogsApi.php | 40 +- lib/Api/LoggingHerokuApi.php | 40 +- lib/Api/LoggingHoneycombApi.php | 40 +- lib/Api/LoggingHttpsApi.php | 40 +- lib/Api/LoggingKafkaApi.php | 20 +- lib/Api/LoggingKinesisApi.php | 10 +- lib/Api/LoggingLogentriesApi.php | 40 +- lib/Api/LoggingLogglyApi.php | 40 +- lib/Api/LoggingLogshuttleApi.php | 40 +- lib/Api/LoggingNewrelicApi.php | 40 +- lib/Api/LoggingNewrelicotlpApi.php | 40 +- lib/Api/LoggingOpenstackApi.php | 40 +- lib/Api/LoggingPapertrailApi.php | 40 +- lib/Api/LoggingPubsubApi.php | 40 +- lib/Api/LoggingS3Api.php | 40 +- lib/Api/LoggingScalyrApi.php | 40 +- lib/Api/LoggingSftpApi.php | 40 +- lib/Api/LoggingSplunkApi.php | 40 +- lib/Api/LoggingSumologicApi.php | 40 +- lib/Api/LoggingSyslogApi.php | 40 +- lib/Api/PoolApi.php | 20 +- lib/Configuration.php | 4 +- lib/Model/Backend.php | 4 +- lib/Model/BackendResponse.php | 4 +- lib/Model/Invitation.php | 6 +- lib/Model/InvitationCreateData.php | 374 ++++++++++++++++++ lib/Model/InvitationCreateDataAllOf.php | 314 +++++++++++++++ ...ponse.php => InvitationCreateResponse.php} | 8 +- ....php => InvitationCreateResponseAllOf.php} | 8 +- lib/Model/InvitationData.php | 40 +- lib/Model/InvitationResponseData.php | 54 +-- lib/Model/LoggingAzureblobResponse.php | 68 +++- lib/Model/LoggingBigqueryAdditional.php | 2 +- lib/Model/LoggingBigqueryResponse.php | 68 +++- lib/Model/LoggingCloudfilesResponse.php | 68 +++- lib/Model/LoggingCommon.php | 78 +++- lib/Model/LoggingCommonResponse.php | 68 +++- lib/Model/LoggingCommonResponseAllOf.php | 78 +++- lib/Model/LoggingDatadogAdditional.php | 2 +- lib/Model/LoggingDatadogResponse.php | 68 +++- lib/Model/LoggingDigitaloceanResponse.php | 68 +++- lib/Model/LoggingElasticsearchAdditional.php | 2 +- lib/Model/LoggingElasticsearchResponse.php | 68 +++- lib/Model/LoggingFtpResponse.php | 68 +++- lib/Model/LoggingGcsResponse.php | 68 +++- lib/Model/LoggingGooglePubsubAdditional.php | 2 +- lib/Model/LoggingGooglePubsubResponse.php | 68 +++- .../LoggingGrafanacloudlogsAdditional.php | 2 +- lib/Model/LoggingGrafanacloudlogsResponse.php | 68 +++- lib/Model/LoggingHerokuResponse.php | 68 +++- lib/Model/LoggingHoneycombAdditional.php | 2 +- lib/Model/LoggingHoneycombResponse.php | 68 +++- lib/Model/LoggingHttpsAdditional.php | 2 +- lib/Model/LoggingHttpsResponse.php | 68 +++- lib/Model/LoggingKafkaResponse.php | 68 +++- lib/Model/LoggingKafkaResponsePost.php | 68 +++- lib/Model/LoggingKinesisAdditional.php | 2 +- lib/Model/LoggingKinesisResponse.php | 2 +- lib/Model/LoggingLogentriesResponse.php | 68 +++- lib/Model/LoggingLogglyResponse.php | 68 +++- lib/Model/LoggingLogshuttleResponse.php | 68 +++- lib/Model/LoggingNewrelicAdditional.php | 2 +- lib/Model/LoggingNewrelicResponse.php | 68 +++- lib/Model/LoggingNewrelicotlpAdditional.php | 2 +- lib/Model/LoggingNewrelicotlpResponse.php | 68 +++- lib/Model/LoggingOpenstackResponse.php | 68 +++- lib/Model/LoggingPapertrailResponse.php | 68 +++- lib/Model/LoggingS3Response.php | 68 +++- lib/Model/LoggingScalyrResponse.php | 68 +++- lib/Model/LoggingSftpResponse.php | 68 +++- lib/Model/LoggingSplunkResponse.php | 68 +++- lib/Model/LoggingSumologicResponse.php | 68 +++- lib/Model/LoggingSyslogResponse.php | 68 +++- lib/Model/PoolAdditional.php | 2 +- lib/Model/PoolResponse.php | 2 +- lib/Model/PoolResponsePost.php | 2 +- lib/Model/TlsCertificateDataAttributes.php | 40 +- lib/Model/TlsCsrData.php | 40 +- lib/Model/TlsCsrDataAttributes.php | 40 +- sig.json | 2 +- 181 files changed, 4111 insertions(+), 667 deletions(-) create mode 100644 docs/Model/InvitationCreateData.md create mode 100644 docs/Model/InvitationCreateDataAllOf.md rename docs/Model/{InvitationResponse.md => InvitationCreateResponse.md} (91%) rename docs/Model/{InvitationResponseAllOf.md => InvitationCreateResponseAllOf.md} (89%) create mode 100644 lib/Model/InvitationCreateData.php create mode 100644 lib/Model/InvitationCreateDataAllOf.php rename lib/Model/{InvitationResponse.php => InvitationCreateResponse.php} (96%) rename lib/Model/{InvitationResponseAllOf.php => InvitationCreateResponseAllOf.php} (96%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55faf158..bf6feb2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [v10.1.0](https://github.com/fastly/fastly-php/releases/tag/release/v10.1.0) (2025-07-07) + +**Bug fixes:** + +- fix(backend): Marked `prefer_ipv6` as not nullable, and documented that the default value differs for Delivery and Compute services. +- fix(invitations): Marked `service_invitations.data` under relationships as nullable, and corrected model composition. + + +**Enhancements:** + +- feat(tls_certificates): Add `allow_untrusted_root` attribute for TLS certificate creation and update endpoints + + +**Documentation:** + +- doc: Update redirect URLs + + ## [v10.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v10.0.0) (2025-06-11) **Breaking Changes:** diff --git a/README.md b/README.md index 398cd00c..36413976 100644 --- a/README.md +++ b/README.md @@ -660,6 +660,9 @@ The fastly-php API client currently does not support the following endpoints: - [`/domains/v1/tools/suggest`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/domains/v1/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/domains/v1`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}/signing-key`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (DELETE, GET, PATCH) +- [`/ngwaf/v1/workspaces/{workspace_id}/alerts`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (GET, POST) - [`/ngwaf/v1/workspaces/{workspace_id}/events/{event_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET, PATCH) - [`/ngwaf/v1/workspaces/{workspace_id}/events`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET) - [`/ngwaf/v1/workspaces/{workspace_id}/redactions/{redaction_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (DELETE, GET, PATCH) @@ -671,8 +674,8 @@ The fastly-php API client currently does not support the following endpoints: - [`/ngwaf/v1/workspaces/{workspace_id}/timeseries`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/timeseries) (GET) - [`/ngwaf/v1/workspaces/{workspace_id}/virtual-patches/{virtual_patch_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/virtual-patches) (GET, PATCH) - [`/ngwaf/v1/workspaces/{workspace_id}/virtual-patches`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/virtual-patches) (GET) -- [`/ngwaf/v1/workspaces/{workspace_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspaces) (DELETE, GET, PATCH) -- [`/ngwaf/v1/workspaces`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspaces) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/workspaces) (DELETE, GET, PATCH) +- [`/ngwaf/v1/workspaces`](https://www.fastly.com/documentation/reference/api/ngwaf/workspaces) (GET, POST) - [`/notifications/integration-types`](https://developer.fastly.com/reference/api/observability/notification) (GET) - [`/notifications/integrations/{integration_id}/rotateSigningKey`](https://developer.fastly.com/reference/api/observability/notification) (POST) - [`/notifications/integrations/{integration_id}/signingKey`](https://developer.fastly.com/reference/api/observability/notification) (GET) diff --git a/docs/Api/BackendApi.md b/docs/Api/BackendApi.md index 819bda74..d63a41ef 100644 --- a/docs/Api/BackendApi.md +++ b/docs/Api/BackendApi.md @@ -54,10 +54,10 @@ $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum all $options['name'] = 'name_example'; // string | The name of the backend. $options['override_host'] = 'override_host_example'; // string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. $options['port'] = 56; // int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. -$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections to origins for hostname backends. +$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. $options['request_condition'] = 'request_condition_example'; // string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. $options['share_key'] = 'share_key_example'; // string | Value that when shared across backends will enable those backends to share the same health check. -$options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). +$options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). $options['ssl_ca_cert'] = 'ssl_ca_cert_example'; // string | CA certificate attached to origin. $options['ssl_cert_hostname'] = 'ssl_cert_hostname_example'; // string | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. $options['ssl_check_cert'] = true; // bool | Be strict on checking SSL certs. @@ -106,10 +106,10 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] -**shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] +**shield** | **string** | Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). | [optional] **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] @@ -275,10 +275,10 @@ $options['min_tls_version'] = 'min_tls_version_example'; // string | Minimum all $options['name'] = 'name_example'; // string | The name of the backend. $options['override_host'] = 'override_host_example'; // string | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. $options['port'] = 56; // int | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. -$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections to origins for hostname backends. +$options['prefer_ipv6'] = True; // bool | Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. $options['request_condition'] = 'request_condition_example'; // string | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. $options['share_key'] = 'share_key_example'; // string | Value that when shared across backends will enable those backends to share the same health check. -$options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). +$options['shield'] = 'shield_example'; // string | Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). $options['ssl_ca_cert'] = 'ssl_ca_cert_example'; // string | CA certificate attached to origin. $options['ssl_cert_hostname'] = 'ssl_cert_hostname_example'; // string | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. $options['ssl_check_cert'] = true; // bool | Be strict on checking SSL certs. @@ -328,10 +328,10 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] -**shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] +**shield** | **string** | Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). | [optional] **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] diff --git a/docs/Api/InvitationsApi.md b/docs/Api/InvitationsApi.md index 24dc3f5d..96988f38 100644 --- a/docs/Api/InvitationsApi.md +++ b/docs/Api/InvitationsApi.md @@ -25,7 +25,7 @@ Method | HTTP request | Description ## `createInvitation()` ```php -createInvitation($options): \Fastly\Model\InvitationResponse // Create an invitation +createInvitation($options): \Fastly\Model\InvitationCreateResponse // Create an invitation ``` Create an invitation. @@ -51,7 +51,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InvitationResponse**](../Model/InvitationResponse.md) +[**\Fastly\Model\InvitationCreateResponse**](../Model/InvitationCreateResponse.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/LoggingAzureblobApi.md b/docs/Api/LoggingAzureblobApi.md index fbd38ac9..d3365204 100644 --- a/docs/Api/LoggingAzureblobApi.md +++ b/docs/Api/LoggingAzureblobApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = 2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -71,7 +72,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -220,7 +222,8 @@ $options['logging_azureblob_name'] = 'logging_azureblob_name_example'; // string $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -253,7 +256,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingBigqueryApi.md b/docs/Api/LoggingBigqueryApi.md index 9f760725..e474aa09 100644 --- a/docs/Api/LoggingBigqueryApi.md +++ b/docs/Api/LoggingBigqueryApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name of the BigQuery logging object. Used as a primary key for API access. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['user'] = 'user_example'; // string | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. $options['secret_key'] = 'secret_key_example'; // string | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. @@ -67,7 +68,8 @@ Name | Type | Description | Notes **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **user** | **string** | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] **secret_key** | **string** | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] @@ -212,7 +214,8 @@ $options['logging_bigquery_name'] = 'logging_bigquery_name_example'; // string | $options['name'] = 'name_example'; // string | The name of the BigQuery logging object. Used as a primary key for API access. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['user'] = 'user_example'; // string | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. $options['secret_key'] = 'secret_key_example'; // string | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. @@ -241,7 +244,8 @@ Name | Type | Description | Notes **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **user** | **string** | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] **secret_key** | **string** | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] diff --git a/docs/Api/LoggingCloudfilesApi.md b/docs/Api/LoggingCloudfilesApi.md index 49673cce..d431e9ac 100644 --- a/docs/Api/LoggingCloudfilesApi.md +++ b/docs/Api/LoggingCloudfilesApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -71,7 +72,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -220,7 +222,8 @@ $options['logging_cloudfiles_name'] = 'logging_cloudfiles_name_example'; // stri $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -253,7 +256,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingDatadogApi.md b/docs/Api/LoggingDatadogApi.md index a1265509..b11ce00d 100644 --- a/docs/Api/LoggingDatadogApi.md +++ b/docs/Api/LoggingDatadogApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '{\"ddsource\":\"fastly\",\"service\":\"%{req.service_id}V\",\"date\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_start\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_end\":\"%{end:%Y-%m-%dT%H:%M:%S%Z}t\",\"http\":{\"request_time_ms\":\"%D\",\"method\":\"%m\",\"url\":\"%{json.escape(req.url)}V\",\"useragent\":\"%{User-Agent}i\",\"referer\":\"%{Referer}i\",\"protocol\":\"%H\",\"request_x_forwarded_for\":\"%{X-Forwarded-For}i\",\"status_code\":\"%s\"},\"network\":{\"client\":{\"ip\":\"%h\",\"name\":\"%{client.as.name}V\",\"number\":\"%{client.as.number}V\",\"connection_speed\":\"%{client.geo.conn_speed}V\"},\"destination\":{\"ip\":\"%A\"},\"geoip\":{\"geo_city\":\"%{client.geo.city.utf8}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"geo_continent_code\":\"%{client.geo.continent_code}V\",\"geo_region\":\"%{client.geo.region}V\"},\"bytes_written\":\"%B\",\"bytes_read\":\"%{req.body_bytes_read}V\"},\"host\":\"%{Fastly-Orig-Host}i\",\"origin_host\":\"%v\",\"is_ipv6\":\"%{if(req.is_ipv6, \\\"true\\\", \\\"false\\\")}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"tls_client_protocol\":\"%{json.escape(tls.client.protocol)}V\",\"tls_client_servername\":\"%{json.escape(tls.client.servername)}V\",\"tls_client_cipher\":\"%{json.escape(tls.client.cipher)}V\",\"tls_client_cipher_sha\":\"%{json.escape(tls.client.ciphers_sha)}V\",\"tls_client_tlsexts_sha\":\"%{json.escape(tls.client.tlsexts_sha)}V\",\"is_h2\":\"%{if(fastly_info.is_h2, \\\"true\\\", \\\"false\\\")}V\",\"is_h2_push\":\"%{if(fastly_info.h2.is_push, \\\"true\\\", \\\"false\\\")}V\",\"h2_stream_id\":\"%{fastly_info.h2.stream_id}V\",\"request_accept_content\":\"%{Accept}i\",\"request_accept_language\":\"%{Accept-Language}i\",\"request_accept_encoding\":\"%{Accept-Encoding}i\",\"request_accept_charset\":\"%{Accept-Charset}i\",\"request_connection\":\"%{Connection}i\",\"request_dnt\":\"%{DNT}i\",\"request_forwarded\":\"%{Forwarded}i\",\"request_via\":\"%{Via}i\",\"request_cache_control\":\"%{Cache-Control}i\",\"request_x_requested_with\":\"%{X-Requested-With}i\",\"request_x_att_device_id\":\"%{X-ATT-Device-Id}i\",\"content_type\":\"%{Content-Type}o\",\"is_cacheable\":\"%{if(fastly_info.state~\\\"^(HIT|MISS)$\\\", \\\"true\\\", \\\"false\\\")}V\",\"response_age\":\"%{Age}o\",\"response_cache_control\":\"%{Cache-Control}o\",\"response_expires\":\"%{Expires}o\",\"response_last_modified\":\"%{Last-Modified}o\",\"response_tsv\":\"%{TSV}o\",\"server_datacenter\":\"%{server.datacenter}V\",\"req_header_size\":\"%{req.header_bytes_read}V\",\"resp_header_size\":\"%{resp.header_bytes_written}V\",\"socket_cwnd\":\"%{client.socket.cwnd}V\",\"socket_nexthop\":\"%{client.socket.nexthop}V\",\"socket_tcpi_rcv_mss\":\"%{client.socket.tcpi_rcv_mss}V\",\"socket_tcpi_snd_mss\":\"%{client.socket.tcpi_snd_mss}V\",\"socket_tcpi_rtt\":\"%{client.socket.tcpi_rtt}V\",\"socket_tcpi_rttvar\":\"%{client.socket.tcpi_rttvar}V\",\"socket_tcpi_rcv_rtt\":\"%{client.socket.tcpi_rcv_rtt}V\",\"socket_tcpi_rcv_space\":\"%{client.socket.tcpi_rcv_space}V\",\"socket_tcpi_last_data_sent\":\"%{client.socket.tcpi_last_data_sent}V\",\"socket_tcpi_total_retrans\":\"%{client.socket.tcpi_total_retrans}V\",\"socket_tcpi_delta_retrans\":\"%{client.socket.tcpi_delta_retrans}V\",\"socket_ploss\":\"%{client.socket.ploss}V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. +$options['format'] = '{\"ddsource\":\"fastly\",\"service\":\"%{req.service_id}V\",\"date\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_start\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_end\":\"%{end:%Y-%m-%dT%H:%M:%S%Z}t\",\"http\":{\"request_time_ms\":\"%D\",\"method\":\"%m\",\"url\":\"%{json.escape(req.url)}V\",\"useragent\":\"%{User-Agent}i\",\"referer\":\"%{Referer}i\",\"protocol\":\"%H\",\"request_x_forwarded_for\":\"%{X-Forwarded-For}i\",\"status_code\":\"%s\"},\"network\":{\"client\":{\"ip\":\"%h\",\"name\":\"%{client.as.name}V\",\"number\":\"%{client.as.number}V\",\"connection_speed\":\"%{client.geo.conn_speed}V\"},\"destination\":{\"ip\":\"%A\"},\"geoip\":{\"geo_city\":\"%{client.geo.city.utf8}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"geo_continent_code\":\"%{client.geo.continent_code}V\",\"geo_region\":\"%{client.geo.region}V\"},\"bytes_written\":\"%B\",\"bytes_read\":\"%{req.body_bytes_read}V\"},\"host\":\"%{Fastly-Orig-Host}i\",\"origin_host\":\"%v\",\"is_ipv6\":\"%{if(req.is_ipv6, \\\"true\\\", \\\"false\\\")}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"tls_client_protocol\":\"%{json.escape(tls.client.protocol)}V\",\"tls_client_servername\":\"%{json.escape(tls.client.servername)}V\",\"tls_client_cipher\":\"%{json.escape(tls.client.cipher)}V\",\"tls_client_cipher_sha\":\"%{json.escape(tls.client.ciphers_sha)}V\",\"tls_client_tlsexts_sha\":\"%{json.escape(tls.client.tlsexts_sha)}V\",\"is_h2\":\"%{if(fastly_info.is_h2, \\\"true\\\", \\\"false\\\")}V\",\"is_h2_push\":\"%{if(fastly_info.h2.is_push, \\\"true\\\", \\\"false\\\")}V\",\"h2_stream_id\":\"%{fastly_info.h2.stream_id}V\",\"request_accept_content\":\"%{Accept}i\",\"request_accept_language\":\"%{Accept-Language}i\",\"request_accept_encoding\":\"%{Accept-Encoding}i\",\"request_accept_charset\":\"%{Accept-Charset}i\",\"request_connection\":\"%{Connection}i\",\"request_dnt\":\"%{DNT}i\",\"request_forwarded\":\"%{Forwarded}i\",\"request_via\":\"%{Via}i\",\"request_cache_control\":\"%{Cache-Control}i\",\"request_x_requested_with\":\"%{X-Requested-With}i\",\"request_x_att_device_id\":\"%{X-ATT-Device-Id}i\",\"content_type\":\"%{Content-Type}o\",\"is_cacheable\":\"%{if(fastly_info.state~\\\"^(HIT|MISS)$\\\", \\\"true\\\", \\\"false\\\")}V\",\"response_age\":\"%{Age}o\",\"response_cache_control\":\"%{Cache-Control}o\",\"response_expires\":\"%{Expires}o\",\"response_last_modified\":\"%{Last-Modified}o\",\"response_tsv\":\"%{TSV}o\",\"server_datacenter\":\"%{server.datacenter}V\",\"req_header_size\":\"%{req.header_bytes_read}V\",\"resp_header_size\":\"%{resp.header_bytes_written}V\",\"socket_cwnd\":\"%{client.socket.cwnd}V\",\"socket_nexthop\":\"%{client.socket.nexthop}V\",\"socket_tcpi_rcv_mss\":\"%{client.socket.tcpi_rcv_mss}V\",\"socket_tcpi_snd_mss\":\"%{client.socket.tcpi_snd_mss}V\",\"socket_tcpi_rtt\":\"%{client.socket.tcpi_rtt}V\",\"socket_tcpi_rttvar\":\"%{client.socket.tcpi_rttvar}V\",\"socket_tcpi_rcv_rtt\":\"%{client.socket.tcpi_rcv_rtt}V\",\"socket_tcpi_rcv_space\":\"%{client.socket.tcpi_rcv_space}V\",\"socket_tcpi_last_data_sent\":\"%{client.socket.tcpi_last_data_sent}V\",\"socket_tcpi_total_retrans\":\"%{client.socket.tcpi_total_retrans}V\",\"socket_tcpi_delta_retrans\":\"%{client.socket.tcpi_delta_retrans}V\",\"socket_ploss\":\"%{client.socket.ploss}V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['region'] = 'US'; // string | The region that log data will be sent to. $options['token'] = 'token_example'; // string | The API key from your Datadog account. Required. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'US3', 'US5', 'EU (legacy, same as EU1)', 'EU1', 'AP1'] [defaults to 'US'] **token** | **string** | The API key from your Datadog account. Required. | [optional] @@ -202,7 +204,8 @@ $options['logging_datadog_name'] = 'logging_datadog_name_example'; // string | T $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '{\"ddsource\":\"fastly\",\"service\":\"%{req.service_id}V\",\"date\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_start\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_end\":\"%{end:%Y-%m-%dT%H:%M:%S%Z}t\",\"http\":{\"request_time_ms\":\"%D\",\"method\":\"%m\",\"url\":\"%{json.escape(req.url)}V\",\"useragent\":\"%{User-Agent}i\",\"referer\":\"%{Referer}i\",\"protocol\":\"%H\",\"request_x_forwarded_for\":\"%{X-Forwarded-For}i\",\"status_code\":\"%s\"},\"network\":{\"client\":{\"ip\":\"%h\",\"name\":\"%{client.as.name}V\",\"number\":\"%{client.as.number}V\",\"connection_speed\":\"%{client.geo.conn_speed}V\"},\"destination\":{\"ip\":\"%A\"},\"geoip\":{\"geo_city\":\"%{client.geo.city.utf8}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"geo_continent_code\":\"%{client.geo.continent_code}V\",\"geo_region\":\"%{client.geo.region}V\"},\"bytes_written\":\"%B\",\"bytes_read\":\"%{req.body_bytes_read}V\"},\"host\":\"%{Fastly-Orig-Host}i\",\"origin_host\":\"%v\",\"is_ipv6\":\"%{if(req.is_ipv6, \\\"true\\\", \\\"false\\\")}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"tls_client_protocol\":\"%{json.escape(tls.client.protocol)}V\",\"tls_client_servername\":\"%{json.escape(tls.client.servername)}V\",\"tls_client_cipher\":\"%{json.escape(tls.client.cipher)}V\",\"tls_client_cipher_sha\":\"%{json.escape(tls.client.ciphers_sha)}V\",\"tls_client_tlsexts_sha\":\"%{json.escape(tls.client.tlsexts_sha)}V\",\"is_h2\":\"%{if(fastly_info.is_h2, \\\"true\\\", \\\"false\\\")}V\",\"is_h2_push\":\"%{if(fastly_info.h2.is_push, \\\"true\\\", \\\"false\\\")}V\",\"h2_stream_id\":\"%{fastly_info.h2.stream_id}V\",\"request_accept_content\":\"%{Accept}i\",\"request_accept_language\":\"%{Accept-Language}i\",\"request_accept_encoding\":\"%{Accept-Encoding}i\",\"request_accept_charset\":\"%{Accept-Charset}i\",\"request_connection\":\"%{Connection}i\",\"request_dnt\":\"%{DNT}i\",\"request_forwarded\":\"%{Forwarded}i\",\"request_via\":\"%{Via}i\",\"request_cache_control\":\"%{Cache-Control}i\",\"request_x_requested_with\":\"%{X-Requested-With}i\",\"request_x_att_device_id\":\"%{X-ATT-Device-Id}i\",\"content_type\":\"%{Content-Type}o\",\"is_cacheable\":\"%{if(fastly_info.state~\\\"^(HIT|MISS)$\\\", \\\"true\\\", \\\"false\\\")}V\",\"response_age\":\"%{Age}o\",\"response_cache_control\":\"%{Cache-Control}o\",\"response_expires\":\"%{Expires}o\",\"response_last_modified\":\"%{Last-Modified}o\",\"response_tsv\":\"%{TSV}o\",\"server_datacenter\":\"%{server.datacenter}V\",\"req_header_size\":\"%{req.header_bytes_read}V\",\"resp_header_size\":\"%{resp.header_bytes_written}V\",\"socket_cwnd\":\"%{client.socket.cwnd}V\",\"socket_nexthop\":\"%{client.socket.nexthop}V\",\"socket_tcpi_rcv_mss\":\"%{client.socket.tcpi_rcv_mss}V\",\"socket_tcpi_snd_mss\":\"%{client.socket.tcpi_snd_mss}V\",\"socket_tcpi_rtt\":\"%{client.socket.tcpi_rtt}V\",\"socket_tcpi_rttvar\":\"%{client.socket.tcpi_rttvar}V\",\"socket_tcpi_rcv_rtt\":\"%{client.socket.tcpi_rcv_rtt}V\",\"socket_tcpi_rcv_space\":\"%{client.socket.tcpi_rcv_space}V\",\"socket_tcpi_last_data_sent\":\"%{client.socket.tcpi_last_data_sent}V\",\"socket_tcpi_total_retrans\":\"%{client.socket.tcpi_total_retrans}V\",\"socket_tcpi_delta_retrans\":\"%{client.socket.tcpi_delta_retrans}V\",\"socket_ploss\":\"%{client.socket.ploss}V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. +$options['format'] = '{\"ddsource\":\"fastly\",\"service\":\"%{req.service_id}V\",\"date\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_start\":\"%{begin:%Y-%m-%dT%H:%M:%S%Z}t\",\"time_end\":\"%{end:%Y-%m-%dT%H:%M:%S%Z}t\",\"http\":{\"request_time_ms\":\"%D\",\"method\":\"%m\",\"url\":\"%{json.escape(req.url)}V\",\"useragent\":\"%{User-Agent}i\",\"referer\":\"%{Referer}i\",\"protocol\":\"%H\",\"request_x_forwarded_for\":\"%{X-Forwarded-For}i\",\"status_code\":\"%s\"},\"network\":{\"client\":{\"ip\":\"%h\",\"name\":\"%{client.as.name}V\",\"number\":\"%{client.as.number}V\",\"connection_speed\":\"%{client.geo.conn_speed}V\"},\"destination\":{\"ip\":\"%A\"},\"geoip\":{\"geo_city\":\"%{client.geo.city.utf8}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"geo_continent_code\":\"%{client.geo.continent_code}V\",\"geo_region\":\"%{client.geo.region}V\"},\"bytes_written\":\"%B\",\"bytes_read\":\"%{req.body_bytes_read}V\"},\"host\":\"%{Fastly-Orig-Host}i\",\"origin_host\":\"%v\",\"is_ipv6\":\"%{if(req.is_ipv6, \\\"true\\\", \\\"false\\\")}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"tls_client_protocol\":\"%{json.escape(tls.client.protocol)}V\",\"tls_client_servername\":\"%{json.escape(tls.client.servername)}V\",\"tls_client_cipher\":\"%{json.escape(tls.client.cipher)}V\",\"tls_client_cipher_sha\":\"%{json.escape(tls.client.ciphers_sha)}V\",\"tls_client_tlsexts_sha\":\"%{json.escape(tls.client.tlsexts_sha)}V\",\"is_h2\":\"%{if(fastly_info.is_h2, \\\"true\\\", \\\"false\\\")}V\",\"is_h2_push\":\"%{if(fastly_info.h2.is_push, \\\"true\\\", \\\"false\\\")}V\",\"h2_stream_id\":\"%{fastly_info.h2.stream_id}V\",\"request_accept_content\":\"%{Accept}i\",\"request_accept_language\":\"%{Accept-Language}i\",\"request_accept_encoding\":\"%{Accept-Encoding}i\",\"request_accept_charset\":\"%{Accept-Charset}i\",\"request_connection\":\"%{Connection}i\",\"request_dnt\":\"%{DNT}i\",\"request_forwarded\":\"%{Forwarded}i\",\"request_via\":\"%{Via}i\",\"request_cache_control\":\"%{Cache-Control}i\",\"request_x_requested_with\":\"%{X-Requested-With}i\",\"request_x_att_device_id\":\"%{X-ATT-Device-Id}i\",\"content_type\":\"%{Content-Type}o\",\"is_cacheable\":\"%{if(fastly_info.state~\\\"^(HIT|MISS)$\\\", \\\"true\\\", \\\"false\\\")}V\",\"response_age\":\"%{Age}o\",\"response_cache_control\":\"%{Cache-Control}o\",\"response_expires\":\"%{Expires}o\",\"response_last_modified\":\"%{Last-Modified}o\",\"response_tsv\":\"%{TSV}o\",\"server_datacenter\":\"%{server.datacenter}V\",\"req_header_size\":\"%{req.header_bytes_read}V\",\"resp_header_size\":\"%{resp.header_bytes_written}V\",\"socket_cwnd\":\"%{client.socket.cwnd}V\",\"socket_nexthop\":\"%{client.socket.nexthop}V\",\"socket_tcpi_rcv_mss\":\"%{client.socket.tcpi_rcv_mss}V\",\"socket_tcpi_snd_mss\":\"%{client.socket.tcpi_snd_mss}V\",\"socket_tcpi_rtt\":\"%{client.socket.tcpi_rtt}V\",\"socket_tcpi_rttvar\":\"%{client.socket.tcpi_rttvar}V\",\"socket_tcpi_rcv_rtt\":\"%{client.socket.tcpi_rcv_rtt}V\",\"socket_tcpi_rcv_space\":\"%{client.socket.tcpi_rcv_space}V\",\"socket_tcpi_last_data_sent\":\"%{client.socket.tcpi_last_data_sent}V\",\"socket_tcpi_total_retrans\":\"%{client.socket.tcpi_total_retrans}V\",\"socket_tcpi_delta_retrans\":\"%{client.socket.tcpi_delta_retrans}V\",\"socket_ploss\":\"%{client.socket.ploss}V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['region'] = 'US'; // string | The region that log data will be sent to. $options['token'] = 'token_example'; // string | The API key from your Datadog account. Required. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'US3', 'US5', 'EU (legacy, same as EU1)', 'EU1', 'AP1'] [defaults to 'US'] **token** | **string** | The API key from your Datadog account. Required. | [optional] diff --git a/docs/Api/LoggingDigitaloceanApi.md b/docs/Api/LoggingDigitaloceanApi.md index 7166deaf..3d64bbb9 100644 --- a/docs/Api/LoggingDigitaloceanApi.md +++ b/docs/Api/LoggingDigitaloceanApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -71,7 +72,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -220,7 +222,8 @@ $options['logging_digitalocean_name'] = 'logging_digitalocean_name_example'; // $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -253,7 +256,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingElasticsearchApi.md b/docs/Api/LoggingElasticsearchApi.md index 828b7f08..b0abd919 100644 --- a/docs/Api/LoggingElasticsearchApi.md +++ b/docs/Api/LoggingElasticsearchApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -71,7 +72,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] @@ -220,7 +222,8 @@ $options['logging_elasticsearch_name'] = 'logging_elasticsearch_name_example'; / $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -253,7 +256,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Api/LoggingFtpApi.md b/docs/Api/LoggingFtpApi.md index 7e9c1f3e..b8c4ef05 100644 --- a/docs/Api/LoggingFtpApi.md +++ b/docs/Api/LoggingFtpApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -73,7 +74,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -224,7 +226,8 @@ $options['logging_ftp_name'] = 'logging_ftp_name_example'; // string | The name $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -259,7 +262,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingGcsApi.md b/docs/Api/LoggingGcsApi.md index 3010b455..60e7b118 100644 --- a/docs/Api/LoggingGcsApi.md +++ b/docs/Api/LoggingGcsApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -72,7 +73,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -222,7 +224,8 @@ $options['logging_gcs_name'] = 'logging_gcs_name_example'; // string | The name $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -256,7 +259,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingGrafanacloudlogsApi.md b/docs/Api/LoggingGrafanacloudlogsApi.md index 61811cfc..a4e387cb 100644 --- a/docs/Api/LoggingGrafanacloudlogsApi.md +++ b/docs/Api/LoggingGrafanacloudlogsApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['user'] = 'user_example'; // string | The Grafana Cloud Logs Dataset you want to log to. $options['url'] = 'url_example'; // string | The URL of the Loki instance in your Grafana stack. @@ -64,7 +65,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **user** | **string** | The Grafana Cloud Logs Dataset you want to log to. | [optional] **url** | **string** | The URL of the Loki instance in your Grafana stack. | [optional] @@ -206,7 +208,8 @@ $options['logging_grafanacloudlogs_name'] = 'logging_grafanacloudlogs_name_examp $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['user'] = 'user_example'; // string | The Grafana Cloud Logs Dataset you want to log to. $options['url'] = 'url_example'; // string | The URL of the Loki instance in your Grafana stack. @@ -232,7 +235,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **user** | **string** | The Grafana Cloud Logs Dataset you want to log to. | [optional] **url** | **string** | The URL of the Loki instance in your Grafana stack. | [optional] diff --git a/docs/Api/LoggingHerokuApi.md b/docs/Api/LoggingHerokuApi.md index 8ca3195f..4cc80d34 100644 --- a/docs/Api/LoggingHerokuApi.md +++ b/docs/Api/LoggingHerokuApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). $options['url'] = 'url_example'; // string | The URL to stream logs to. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). | [optional] **url** | **string** | The URL to stream logs to. | [optional] @@ -202,7 +204,8 @@ $options['logging_heroku_name'] = 'logging_heroku_name_example'; // string | The $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). $options['url'] = 'url_example'; // string | The URL to stream logs to. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). | [optional] **url** | **string** | The URL to stream logs to. | [optional] diff --git a/docs/Api/LoggingHoneycombApi.md b/docs/Api/LoggingHoneycombApi.md index 632b7dac..bdceb3bc 100644 --- a/docs/Api/LoggingHoneycombApi.md +++ b/docs/Api/LoggingHoneycombApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['dataset'] = 'dataset_example'; // string | The Honeycomb Dataset you want to log to. $options['token'] = 'token_example'; // string | The Write Key from the Account page of your Honeycomb account. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **dataset** | **string** | The Honeycomb Dataset you want to log to. | [optional] **token** | **string** | The Write Key from the Account page of your Honeycomb account. | [optional] @@ -202,7 +204,8 @@ $options['logging_honeycomb_name'] = 'logging_honeycomb_name_example'; // string $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = 'format_example'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. +$options['format'] = 'format_example'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['dataset'] = 'dataset_example'; // string | The Honeycomb Dataset you want to log to. $options['token'] = 'token_example'; // string | The Write Key from the Account page of your Honeycomb account. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **dataset** | **string** | The Honeycomb Dataset you want to log to. | [optional] **token** | **string** | The Write Key from the Account page of your Honeycomb account. | [optional] diff --git a/docs/Api/LoggingHttpsApi.md b/docs/Api/LoggingHttpsApi.md index 8e386a59..f8e8ea40 100644 --- a/docs/Api/LoggingHttpsApi.md +++ b/docs/Api/LoggingHttpsApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -73,7 +74,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] @@ -224,7 +226,8 @@ $options['logging_https_name'] = 'logging_https_name_example'; // string | The n $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -259,7 +262,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Api/LoggingKafkaApi.md b/docs/Api/LoggingKafkaApi.md index 67b64a01..fa720ec4 100644 --- a/docs/Api/LoggingKafkaApi.md +++ b/docs/Api/LoggingKafkaApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -74,7 +75,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Api/LoggingKinesisApi.md b/docs/Api/LoggingKinesisApi.md index 88040c4a..c047836a 100644 --- a/docs/Api/LoggingKinesisApi.md +++ b/docs/Api/LoggingKinesisApi.md @@ -38,7 +38,7 @@ Create an Amazon Kinesis Data Streams logging object for a particular service an $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = new \Fastly\Model\LoggingPlacement(); // \Fastly\Model\LoggingPlacement -$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). $options['topic'] = 'topic_example'; // string | The Amazon Kinesis stream to send logs to. Required. $options['region'] = new \Fastly\Model\AwsRegion(); // \Fastly\Model\AwsRegion $options['secret_key'] = 'secret_key_example'; // string | The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. @@ -63,7 +63,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | [**\Fastly\Model\LoggingPlacement**](../Model/LoggingPlacement.md) | | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **topic** | **string** | The Amazon Kinesis stream to send logs to. Required. | [optional] **region** | [**\Fastly\Model\AwsRegion**](../Model/AwsRegion.md) | | [optional] **secret_key** | **string** | The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. | [optional] diff --git a/docs/Api/LoggingLogentriesApi.md b/docs/Api/LoggingLogentriesApi.md index f9c8f256..d0b5da03 100644 --- a/docs/Api/LoggingLogentriesApi.md +++ b/docs/Api/LoggingLogentriesApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['port'] = 20000; // int | The port number. $options['token'] = 'token_example'; // string | Use token based authentication. @@ -64,7 +65,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **port** | **int** | The port number. | [optional] [defaults to 20000] **token** | **string** | Use token based authentication. | [optional] @@ -206,7 +208,8 @@ $options['logging_logentries_name'] = 'logging_logentries_name_example'; // stri $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['port'] = 20000; // int | The port number. $options['token'] = 'token_example'; // string | Use token based authentication. @@ -232,7 +235,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **port** | **int** | The port number. | [optional] [defaults to 20000] **token** | **string** | Use token based authentication. | [optional] diff --git a/docs/Api/LoggingLogglyApi.md b/docs/Api/LoggingLogglyApi.md index f92b3601..1ffbcdd4 100644 --- a/docs/Api/LoggingLogglyApi.md +++ b/docs/Api/LoggingLogglyApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). @@ -61,7 +62,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). | [optional] @@ -200,7 +202,8 @@ $options['logging_loggly_name'] = 'logging_loggly_name_example'; // string | The $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). @@ -223,7 +226,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). | [optional] diff --git a/docs/Api/LoggingLogshuttleApi.md b/docs/Api/LoggingLogshuttleApi.md index 3148d934..18702b5f 100644 --- a/docs/Api/LoggingLogshuttleApi.md +++ b/docs/Api/LoggingLogshuttleApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The data authentication token associated with this endpoint. $options['url'] = 'url_example'; // string | The URL to stream logs to. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The data authentication token associated with this endpoint. | [optional] **url** | **string** | The URL to stream logs to. | [optional] @@ -202,7 +204,8 @@ $options['logging_logshuttle_name'] = 'logging_logshuttle_name_example'; // stri $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The data authentication token associated with this endpoint. $options['url'] = 'url_example'; // string | The URL to stream logs to. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The data authentication token associated with this endpoint. | [optional] **url** | **string** | The URL to stream logs to. | [optional] diff --git a/docs/Api/LoggingNewrelicApi.md b/docs/Api/LoggingNewrelicApi.md index de8d403f..e26c550a 100644 --- a/docs/Api/LoggingNewrelicApi.md +++ b/docs/Api/LoggingNewrelicApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. +$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The Insert API key from the Account page of your New Relic account. Required. $options['region'] = 'US'; // string | The region to which to stream logs. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] @@ -202,7 +204,8 @@ $options['logging_newrelic_name'] = 'logging_newrelic_name_example'; // string | $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. +$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The Insert API key from the Account page of your New Relic account. Required. $options['region'] = 'US'; // string | The region to which to stream logs. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] diff --git a/docs/Api/LoggingNewrelicotlpApi.md b/docs/Api/LoggingNewrelicotlpApi.md index 53e1b01a..ea02cd1a 100644 --- a/docs/Api/LoggingNewrelicotlpApi.md +++ b/docs/Api/LoggingNewrelicotlpApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The Insert API key from the Account page of your New Relic account. Required. $options['region'] = 'US'; // string | The region to which to stream logs. @@ -63,7 +64,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] @@ -204,7 +206,8 @@ $options['logging_newrelicotlp_name'] = 'logging_newrelicotlp_name_example'; // $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['token'] = 'token_example'; // string | The Insert API key from the Account page of your New Relic account. Required. $options['region'] = 'US'; // string | The region to which to stream logs. @@ -229,7 +232,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] diff --git a/docs/Api/LoggingOpenstackApi.md b/docs/Api/LoggingOpenstackApi.md index 294c20a1..a5d2611f 100644 --- a/docs/Api/LoggingOpenstackApi.md +++ b/docs/Api/LoggingOpenstackApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -71,7 +72,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -220,7 +222,8 @@ $options['logging_openstack_name'] = 'logging_openstack_name_example'; // string $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -253,7 +256,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingPapertrailApi.md b/docs/Api/LoggingPapertrailApi.md index bbf2cdc2..05c461f1 100644 --- a/docs/Api/LoggingPapertrailApi.md +++ b/docs/Api/LoggingPapertrailApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['address'] = 'address_example'; // string | A hostname or IPv4 address. $options['port'] = 514; // int | The port number. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **address** | **string** | A hostname or IPv4 address. | [optional] **port** | **int** | The port number. | [optional] [defaults to 514] @@ -202,7 +204,8 @@ $options['logging_papertrail_name'] = 'logging_papertrail_name_example'; // stri $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['address'] = 'address_example'; // string | A hostname or IPv4 address. $options['port'] = 514; // int | The port number. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **address** | **string** | A hostname or IPv4 address. | [optional] **port** | **int** | The port number. | [optional] [defaults to 514] diff --git a/docs/Api/LoggingPubsubApi.md b/docs/Api/LoggingPubsubApi.md index 40d4b21b..cf4ffa27 100644 --- a/docs/Api/LoggingPubsubApi.md +++ b/docs/Api/LoggingPubsubApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['user'] = 'user_example'; // string | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. $options['secret_key'] = 'secret_key_example'; // string | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. @@ -65,7 +66,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **user** | **string** | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] **secret_key** | **string** | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] @@ -208,7 +210,8 @@ $options['logging_google_pubsub_name'] = 'logging_google_pubsub_name_example'; / $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['user'] = 'user_example'; // string | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. $options['secret_key'] = 'secret_key_example'; // string | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. @@ -235,7 +238,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **user** | **string** | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] **secret_key** | **string** | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] diff --git a/docs/Api/LoggingS3Api.md b/docs/Api/LoggingS3Api.md index 77f8ecc0..5167fcda 100644 --- a/docs/Api/LoggingS3Api.md +++ b/docs/Api/LoggingS3Api.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -77,7 +78,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -232,7 +234,8 @@ $options['logging_s3_name'] = 'logging_s3_name_example'; // string | The name fo $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -271,7 +274,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingScalyrApi.md b/docs/Api/LoggingScalyrApi.md index b70dffb4..b61b9572 100644 --- a/docs/Api/LoggingScalyrApi.md +++ b/docs/Api/LoggingScalyrApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['region'] = 'US'; // string | The region that log data will be sent to. $options['token'] = 'token_example'; // string | The token to use for authentication. @@ -63,7 +64,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] **token** | **string** | The token to use for authentication. | [optional] @@ -204,7 +206,8 @@ $options['logging_scalyr_name'] = 'logging_scalyr_name_example'; // string | The $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['region'] = 'US'; // string | The region that log data will be sent to. $options['token'] = 'token_example'; // string | The token to use for authentication. @@ -229,7 +232,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] **token** | **string** | The token to use for authentication. | [optional] diff --git a/docs/Api/LoggingSftpApi.md b/docs/Api/LoggingSftpApi.md index e9966bd5..ab7e89e3 100644 --- a/docs/Api/LoggingSftpApi.md +++ b/docs/Api/LoggingSftpApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -73,7 +74,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] @@ -224,7 +226,8 @@ $options['logging_sftp_name'] = 'logging_sftp_name_example'; // string | The nam $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = 'classic'; // string | How the message should be formatted. $options['timestamp_format'] = 'timestamp_format_example'; // string | A timestamp format @@ -259,7 +262,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] diff --git a/docs/Api/LoggingSplunkApi.md b/docs/Api/LoggingSplunkApi.md index 9a714fc6..e63d744b 100644 --- a/docs/Api/LoggingSplunkApi.md +++ b/docs/Api/LoggingSplunkApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -69,7 +70,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] @@ -216,7 +218,8 @@ $options['logging_splunk_name'] = 'logging_splunk_name_example'; // string | The $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -247,7 +250,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Api/LoggingSumologicApi.md b/docs/Api/LoggingSumologicApi.md index e43ab58a..9958d844 100644 --- a/docs/Api/LoggingSumologicApi.md +++ b/docs/Api/LoggingSumologicApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = new \Fastly\Model\LoggingMessageType(); // \Fastly\Model\LoggingMessageType $options['url'] = 'url_example'; // string | The URL to post logs to. @@ -62,7 +63,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | [**\Fastly\Model\LoggingMessageType**](../Model/LoggingMessageType.md) | | [optional] **url** | **string** | The URL to post logs to. | [optional] @@ -202,7 +204,8 @@ $options['logging_sumologic_name'] = 'logging_sumologic_name_example'; // string $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['message_type'] = new \Fastly\Model\LoggingMessageType(); // \Fastly\Model\LoggingMessageType $options['url'] = 'url_example'; // string | The URL to post logs to. @@ -226,7 +229,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **message_type** | [**\Fastly\Model\LoggingMessageType**](../Model/LoggingMessageType.md) | | [optional] **url** | **string** | The URL to post logs to. | [optional] diff --git a/docs/Api/LoggingSyslogApi.md b/docs/Api/LoggingSyslogApi.md index 7d6ded1f..92d3c5c1 100644 --- a/docs/Api/LoggingSyslogApi.md +++ b/docs/Api/LoggingSyslogApi.md @@ -39,7 +39,8 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -71,7 +72,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] @@ -220,7 +222,8 @@ $options['logging_syslog_name'] = 'logging_syslog_name_example'; // string | The $options['name'] = 'name_example'; // string | The name for the real-time logging configuration. $options['placement'] = 'placement_example'; // string | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. $options['response_condition'] = 'response_condition_example'; // string | The name of an existing condition in the configured endpoint, or leave blank to always execute. -$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). +$options['format'] = '%h %l %u %t \"%r\" %>s %b'; // string | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). +$options['log_processing_region'] = 'none'; // string | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. $options['format_version'] = self::FORMAT_VERSION_v2; // int | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. $options['tls_ca_cert'] = 'null'; // string | A secure certificate to authenticate a server with. Must be in PEM format. $options['tls_client_cert'] = 'null'; // string | The client certificate used to make authenticated requests. Must be in PEM format. @@ -253,7 +256,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Api/PoolApi.md b/docs/Api/PoolApi.md index 7f789a53..3b64a6e3 100644 --- a/docs/Api/PoolApi.md +++ b/docs/Api/PoolApi.md @@ -56,7 +56,7 @@ $options['max_tls_version'] = 56; // int | Maximum allowed TLS version on connec $options['healthcheck'] = 'healthcheck_example'; // string | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['type'] = 'type_example'; // string | What type of load balance group to use. -$options['override_host'] = 'null'; // string | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. +$options['override_host'] = 'null'; // string | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. $options['between_bytes_timeout'] = 10000; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. $options['connect_timeout'] = 56; // int | How long to wait for a timeout in milliseconds. Optional. $options['first_byte_timeout'] = 56; // int | How long to wait for the first byte in milliseconds. Optional. @@ -99,7 +99,7 @@ Name | Type | Description | Notes **healthcheck** | **string** | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] -**override_host** | **string** | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] +**override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] **between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] [defaults to 10000] **connect_timeout** | **int** | How long to wait for a timeout in milliseconds. Optional. | [optional] **first_byte_timeout** | **int** | How long to wait for the first byte in milliseconds. Optional. | [optional] @@ -259,7 +259,7 @@ $options['max_tls_version'] = 56; // int | Maximum allowed TLS version on connec $options['healthcheck'] = 'healthcheck_example'; // string | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['type'] = 'type_example'; // string | What type of load balance group to use. -$options['override_host'] = 'null'; // string | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. +$options['override_host'] = 'null'; // string | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. $options['between_bytes_timeout'] = 10000; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. $options['connect_timeout'] = 56; // int | How long to wait for a timeout in milliseconds. Optional. $options['first_byte_timeout'] = 56; // int | How long to wait for the first byte in milliseconds. Optional. @@ -303,7 +303,7 @@ Name | Type | Description | Notes **healthcheck** | **string** | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] -**override_host** | **string** | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] +**override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] **between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] [defaults to 10000] **connect_timeout** | **int** | How long to wait for a timeout in milliseconds. Optional. | [optional] **first_byte_timeout** | **int** | How long to wait for the first byte in milliseconds. Optional. | [optional] diff --git a/docs/Api/PurgeApi.md b/docs/Api/PurgeApi.md index a14cdcc7..a1161830 100644 --- a/docs/Api/PurgeApi.md +++ b/docs/Api/PurgeApi.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes purgeAll($options): \Fastly\Model\InlineResponse200 // Purge everything from a service ``` -Instant Purge everything from a service. Purge-all requests cannot be done in soft mode and will always immediately invalidate all cached content associated with the service. To do a soft-purge-all, consider applying a constant [surrogate key](https://docs.fastly.com/en/guides/getting-started-with-surrogate-keys) tag (e.g., `\"all\"`) to all objects. +Instant Purge everything from a service. Purge-all requests cannot be done in soft mode and will always immediately invalidate all cached content associated with the service. To do a soft-purge-all, consider applying a constant [surrogate key](https://www.fastly.com/documentation/guides/full-site-delivery/purging/working-with-surrogate-keys/) tag (e.g., `\"all\"`) to all objects. ### Example ```php diff --git a/docs/Model/Backend.md b/docs/Model/Backend.md index 5fcc6ef8..9be08451 100644 --- a/docs/Model/Backend.md +++ b/docs/Model/Backend.md @@ -22,10 +22,10 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] -**shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] +**shield** | **string** | Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). | [optional] **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] diff --git a/docs/Model/BackendResponse.md b/docs/Model/BackendResponse.md index a2e4ffec..cb535fa5 100644 --- a/docs/Model/BackendResponse.md +++ b/docs/Model/BackendResponse.md @@ -22,10 +22,10 @@ Name | Type | Description | Notes **name** | **string** | The name of the backend. | [optional] **override_host** | **string** | If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. | [optional] **port** | **int** | Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. | [optional] -**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. | [optional] +**prefer_ipv6** | **bool** | Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. | [optional] **request_condition** | **string** | Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. | [optional] **share_key** | **string** | Value that when shared across backends will enable those backends to share the same health check. | [optional] -**shield** | **string** | Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). | [optional] +**shield** | **string** | Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). | [optional] **ssl_ca_cert** | **string** | CA certificate attached to origin. | [optional] **ssl_cert_hostname** | **string** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] **ssl_check_cert** | **bool** | Be strict on checking SSL certs. | [optional] [defaults to true] diff --git a/docs/Model/Invitation.md b/docs/Model/Invitation.md index c8c5b5af..21192483 100644 --- a/docs/Model/Invitation.md +++ b/docs/Model/Invitation.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\InvitationData**](InvitationData.md) | | [optional] +**data** | [**\Fastly\Model\InvitationCreateData**](InvitationCreateData.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvitationCreateData.md b/docs/Model/InvitationCreateData.md new file mode 100644 index 00000000..13304ca9 --- /dev/null +++ b/docs/Model/InvitationCreateData.md @@ -0,0 +1,12 @@ +# # InvitationCreateData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\Fastly\Model\TypeInvitation**](TypeInvitation.md) | | [optional] +**attributes** | [**\Fastly\Model\InvitationDataAttributes**](InvitationDataAttributes.md) | | [optional] +**relationships** | [**\Fastly\Model\RelationshipServiceInvitationsCreate**](RelationshipServiceInvitationsCreate.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvitationCreateDataAllOf.md b/docs/Model/InvitationCreateDataAllOf.md new file mode 100644 index 00000000..77a9cac8 --- /dev/null +++ b/docs/Model/InvitationCreateDataAllOf.md @@ -0,0 +1,10 @@ +# # InvitationCreateDataAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**relationships** | [**\Fastly\Model\RelationshipServiceInvitationsCreate**](RelationshipServiceInvitationsCreate.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvitationResponse.md b/docs/Model/InvitationCreateResponse.md similarity index 91% rename from docs/Model/InvitationResponse.md rename to docs/Model/InvitationCreateResponse.md index e1f18d79..a15c9146 100644 --- a/docs/Model/InvitationResponse.md +++ b/docs/Model/InvitationCreateResponse.md @@ -1,4 +1,4 @@ -# # InvitationResponse +# # InvitationCreateResponse ## Properties diff --git a/docs/Model/InvitationResponseAllOf.md b/docs/Model/InvitationCreateResponseAllOf.md similarity index 89% rename from docs/Model/InvitationResponseAllOf.md rename to docs/Model/InvitationCreateResponseAllOf.md index 164cdd6b..8a91ba48 100644 --- a/docs/Model/InvitationResponseAllOf.md +++ b/docs/Model/InvitationCreateResponseAllOf.md @@ -1,4 +1,4 @@ -# # InvitationResponseAllOf +# # InvitationCreateResponseAllOf ## Properties diff --git a/docs/Model/InvitationData.md b/docs/Model/InvitationData.md index 19adee02..49209e99 100644 --- a/docs/Model/InvitationData.md +++ b/docs/Model/InvitationData.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**\Fastly\Model\TypeInvitation**](TypeInvitation.md) | | [optional] **attributes** | [**\Fastly\Model\InvitationDataAttributes**](InvitationDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipServiceInvitationsCreate**](RelationshipServiceInvitationsCreate.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvitationResponseData.md b/docs/Model/InvitationResponseData.md index 31a2311c..cc161f10 100644 --- a/docs/Model/InvitationResponseData.md +++ b/docs/Model/InvitationResponseData.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**\Fastly\Model\TypeInvitation**](TypeInvitation.md) | | [optional] **attributes** | [**\Fastly\Model\Timestamps**](Timestamps.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipsForInvitation**](RelationshipsForInvitation.md) | | [optional] **id** | **string** | | [optional] [readonly] +**relationships** | [**\Fastly\Model\RelationshipsForInvitation**](RelationshipsForInvitation.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingAzureblobResponse.md b/docs/Model/LoggingAzureblobResponse.md index f5a6d534..349f8bd9 100644 --- a/docs/Model/LoggingAzureblobResponse.md +++ b/docs/Model/LoggingAzureblobResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingBigqueryAdditional.md b/docs/Model/LoggingBigqueryAdditional.md index 60ddd417..020141a7 100644 --- a/docs/Model/LoggingBigqueryAdditional.md +++ b/docs/Model/LoggingBigqueryAdditional.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. | [optional] **dataset** | **string** | Your BigQuery dataset. | [optional] **table** | **string** | Your BigQuery table. | [optional] **template_suffix** | **string** | BigQuery table name suffix template. Optional. | [optional] diff --git a/docs/Model/LoggingBigqueryResponse.md b/docs/Model/LoggingBigqueryResponse.md index 6e01b309..b44f47bd 100644 --- a/docs/Model/LoggingBigqueryResponse.md +++ b/docs/Model/LoggingBigqueryResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name of the BigQuery logging object. Used as a primary key for API access. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **user** | **string** | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] **secret_key** | **string** | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] diff --git a/docs/Model/LoggingCloudfilesResponse.md b/docs/Model/LoggingCloudfilesResponse.md index 71dc95a2..35dd6931 100644 --- a/docs/Model/LoggingCloudfilesResponse.md +++ b/docs/Model/LoggingCloudfilesResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingCommon.md b/docs/Model/LoggingCommon.md index e08307ba..870c6bad 100644 --- a/docs/Model/LoggingCommon.md +++ b/docs/Model/LoggingCommon.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingCommonResponse.md b/docs/Model/LoggingCommonResponse.md index b9d566de..ae821e07 100644 --- a/docs/Model/LoggingCommonResponse.md +++ b/docs/Model/LoggingCommonResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] diff --git a/docs/Model/LoggingCommonResponseAllOf.md b/docs/Model/LoggingCommonResponseAllOf.md index 43ae9f98..1df0a5ed 100644 --- a/docs/Model/LoggingCommonResponseAllOf.md +++ b/docs/Model/LoggingCommonResponseAllOf.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingDatadogAdditional.md b/docs/Model/LoggingDatadogAdditional.md index d01ceec9..c9a41a7f 100644 --- a/docs/Model/LoggingDatadogAdditional.md +++ b/docs/Model/LoggingDatadogAdditional.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'US3', 'US5', 'EU (legacy, same as EU1)', 'EU1', 'AP1'] [defaults to 'US'] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] **token** | **string** | The API key from your Datadog account. Required. | [optional] diff --git a/docs/Model/LoggingDatadogResponse.md b/docs/Model/LoggingDatadogResponse.md index 07ccc2ca..b2552715 100644 --- a/docs/Model/LoggingDatadogResponse.md +++ b/docs/Model/LoggingDatadogResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. | [optional] [defaults to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'US3', 'US5', 'EU (legacy, same as EU1)', 'EU1', 'AP1'] [defaults to 'US'] **token** | **string** | The API key from your Datadog account. Required. | [optional] diff --git a/docs/Model/LoggingDigitaloceanResponse.md b/docs/Model/LoggingDigitaloceanResponse.md index 1527b685..28a0ce3e 100644 --- a/docs/Model/LoggingDigitaloceanResponse.md +++ b/docs/Model/LoggingDigitaloceanResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingElasticsearchAdditional.md b/docs/Model/LoggingElasticsearchAdditional.md index 89bf7a05..02f32256 100644 --- a/docs/Model/LoggingElasticsearchAdditional.md +++ b/docs/Model/LoggingElasticsearchAdditional.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **pipeline** | **string** | The ID of the Elasticsearch ingest pipeline to apply pre-process transformations to before indexing. Learn more about creating a pipeline in the [Elasticsearch docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html). | [optional] **user** | **string** | Basic Auth username. | [optional] **password** | **string** | Basic Auth password. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingElasticsearchResponse.md b/docs/Model/LoggingElasticsearchResponse.md index bfcdb09c..4802f51c 100644 --- a/docs/Model/LoggingElasticsearchResponse.md +++ b/docs/Model/LoggingElasticsearchResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Model/LoggingFtpResponse.md b/docs/Model/LoggingFtpResponse.md index 25f26e33..aeb7c43a 100644 --- a/docs/Model/LoggingFtpResponse.md +++ b/docs/Model/LoggingFtpResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingGcsResponse.md b/docs/Model/LoggingGcsResponse.md index 5f733505..ed7d3a3d 100644 --- a/docs/Model/LoggingGcsResponse.md +++ b/docs/Model/LoggingGcsResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingGooglePubsubAdditional.md b/docs/Model/LoggingGooglePubsubAdditional.md index c2f0d89a..47fadcdf 100644 --- a/docs/Model/LoggingGooglePubsubAdditional.md +++ b/docs/Model/LoggingGooglePubsubAdditional.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **topic** | **string** | The Google Cloud Pub/Sub topic to which logs will be published. Required. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] **project_id** | **string** | Your Google Cloud Platform project ID. Required | [optional] diff --git a/docs/Model/LoggingGooglePubsubResponse.md b/docs/Model/LoggingGooglePubsubResponse.md index 2052fe3a..72f03641 100644 --- a/docs/Model/LoggingGooglePubsubResponse.md +++ b/docs/Model/LoggingGooglePubsubResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **user** | **string** | Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] **secret_key** | **string** | Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. | [optional] diff --git a/docs/Model/LoggingGrafanacloudlogsAdditional.md b/docs/Model/LoggingGrafanacloudlogsAdditional.md index 39dc3d0d..a6e7bf49 100644 --- a/docs/Model/LoggingGrafanacloudlogsAdditional.md +++ b/docs/Model/LoggingGrafanacloudlogsAdditional.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] **user** | **string** | The Grafana Cloud Logs Dataset you want to log to. | [optional] **url** | **string** | The URL of the Loki instance in your Grafana stack. | [optional] **token** | **string** | The Grafana Access Policy token with `logs:write` access scoped to your Loki instance. | [optional] diff --git a/docs/Model/LoggingGrafanacloudlogsResponse.md b/docs/Model/LoggingGrafanacloudlogsResponse.md index 13c1de99..8c37e02f 100644 --- a/docs/Model/LoggingGrafanacloudlogsResponse.md +++ b/docs/Model/LoggingGrafanacloudlogsResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **user** | **string** | The Grafana Cloud Logs Dataset you want to log to. | [optional] **url** | **string** | The URL of the Loki instance in your Grafana stack. | [optional] diff --git a/docs/Model/LoggingHerokuResponse.md b/docs/Model/LoggingHerokuResponse.md index edf9fbc3..cf7a22d1 100644 --- a/docs/Model/LoggingHerokuResponse.md +++ b/docs/Model/LoggingHerokuResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **token** | **string** | The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). | [optional] **url** | **string** | The URL to stream logs to. | [optional] diff --git a/docs/Model/LoggingHoneycombAdditional.md b/docs/Model/LoggingHoneycombAdditional.md index c4042c02..45c6878f 100644 --- a/docs/Model/LoggingHoneycombAdditional.md +++ b/docs/Model/LoggingHoneycombAdditional.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. | [optional] **dataset** | **string** | The Honeycomb Dataset you want to log to. | [optional] **token** | **string** | The Write Key from the Account page of your Honeycomb account. | [optional] diff --git a/docs/Model/LoggingHoneycombResponse.md b/docs/Model/LoggingHoneycombResponse.md index ae8f2d57..b83ee2fc 100644 --- a/docs/Model/LoggingHoneycombResponse.md +++ b/docs/Model/LoggingHoneycombResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. | [optional] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. | [optional] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **dataset** | **string** | The Honeycomb Dataset you want to log to. | [optional] **token** | **string** | The Write Key from the Account page of your Honeycomb account. | [optional] diff --git a/docs/Model/LoggingHttpsAdditional.md b/docs/Model/LoggingHttpsAdditional.md index d0fc3223..c7d5b939 100644 --- a/docs/Model/LoggingHttpsAdditional.md +++ b/docs/Model/LoggingHttpsAdditional.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **header_value** | **string** | Value of the custom header sent with the request. | [optional] [defaults to 'null'] **method** | **string** | HTTP method used for request. | [optional] [one of: 'POST', 'PUT'] [defaults to 'POST'] **json_format** | **string** | Enforces valid JSON formatting for log entries. | [optional] [one of: '0', '1', '2'] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingHttpsResponse.md b/docs/Model/LoggingHttpsResponse.md index b30ea202..61192ba4 100644 --- a/docs/Model/LoggingHttpsResponse.md +++ b/docs/Model/LoggingHttpsResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Model/LoggingKafkaResponse.md b/docs/Model/LoggingKafkaResponse.md index 2c4ab5f7..d6163b98 100644 --- a/docs/Model/LoggingKafkaResponse.md +++ b/docs/Model/LoggingKafkaResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Model/LoggingKafkaResponsePost.md b/docs/Model/LoggingKafkaResponsePost.md index d863ce78..8a2a14e2 100644 --- a/docs/Model/LoggingKafkaResponsePost.md +++ b/docs/Model/LoggingKafkaResponsePost.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **int** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: 1, 2] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Model/LoggingKinesisAdditional.md b/docs/Model/LoggingKinesisAdditional.md index f86805ee..33dc4221 100644 --- a/docs/Model/LoggingKinesisAdditional.md +++ b/docs/Model/LoggingKinesisAdditional.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | [**\Fastly\Model\LoggingPlacement**](LoggingPlacement.md) | | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **topic** | **string** | The Amazon Kinesis stream to send logs to. Required. | [optional] **region** | [**\Fastly\Model\AwsRegion**](AwsRegion.md) | | [optional] **secret_key** | **string** | The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. | [optional] diff --git a/docs/Model/LoggingKinesisResponse.md b/docs/Model/LoggingKinesisResponse.md index 6712f272..95632810 100644 --- a/docs/Model/LoggingKinesisResponse.md +++ b/docs/Model/LoggingKinesisResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | [**\Fastly\Model\LoggingPlacement**](LoggingPlacement.md) | | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **topic** | **string** | The Amazon Kinesis stream to send logs to. Required. | [optional] **region** | [**\Fastly\Model\AwsRegion**](AwsRegion.md) | | [optional] **secret_key** | **string** | The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. | [optional] diff --git a/docs/Model/LoggingLogentriesResponse.md b/docs/Model/LoggingLogentriesResponse.md index da142e2b..27a82cc3 100644 --- a/docs/Model/LoggingLogentriesResponse.md +++ b/docs/Model/LoggingLogentriesResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **port** | **int** | The port number. | [optional] [defaults to 20000] **token** | **string** | Use token based authentication. | [optional] diff --git a/docs/Model/LoggingLogglyResponse.md b/docs/Model/LoggingLogglyResponse.md index b112858b..a3900977 100644 --- a/docs/Model/LoggingLogglyResponse.md +++ b/docs/Model/LoggingLogglyResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **token** | **string** | The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). | [optional] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/LoggingLogshuttleResponse.md b/docs/Model/LoggingLogshuttleResponse.md index 94c5ac3c..e71f0423 100644 --- a/docs/Model/LoggingLogshuttleResponse.md +++ b/docs/Model/LoggingLogshuttleResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **token** | **string** | The data authentication token associated with this endpoint. | [optional] **url** | **string** | The URL to stream logs to. | [optional] diff --git a/docs/Model/LoggingNewrelicAdditional.md b/docs/Model/LoggingNewrelicAdditional.md index 9e045283..f2962970 100644 --- a/docs/Model/LoggingNewrelicAdditional.md +++ b/docs/Model/LoggingNewrelicAdditional.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] diff --git a/docs/Model/LoggingNewrelicResponse.md b/docs/Model/LoggingNewrelicResponse.md index 7dcf0ca9..ed9d8957 100644 --- a/docs/Model/LoggingNewrelicResponse.md +++ b/docs/Model/LoggingNewrelicResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] diff --git a/docs/Model/LoggingNewrelicotlpAdditional.md b/docs/Model/LoggingNewrelicotlpAdditional.md index 121f0846..339998a2 100644 --- a/docs/Model/LoggingNewrelicotlpAdditional.md +++ b/docs/Model/LoggingNewrelicotlpAdditional.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] **url** | **string** | (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. | [optional] [defaults to 'null'] diff --git a/docs/Model/LoggingNewrelicotlpResponse.md b/docs/Model/LoggingNewrelicotlpResponse.md index 1681b176..bbbf3fa9 100644 --- a/docs/Model/LoggingNewrelicotlpResponse.md +++ b/docs/Model/LoggingNewrelicotlpResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **token** | **string** | The Insert API key from the Account page of your New Relic account. Required. | [optional] **region** | **string** | The region to which to stream logs. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] diff --git a/docs/Model/LoggingOpenstackResponse.md b/docs/Model/LoggingOpenstackResponse.md index ce2fbbf3..78b97b61 100644 --- a/docs/Model/LoggingOpenstackResponse.md +++ b/docs/Model/LoggingOpenstackResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingPapertrailResponse.md b/docs/Model/LoggingPapertrailResponse.md index 39a2334d..af9603be 100644 --- a/docs/Model/LoggingPapertrailResponse.md +++ b/docs/Model/LoggingPapertrailResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **address** | **string** | A hostname or IPv4 address. | [optional] **port** | **int** | The port number. | [optional] [defaults to 514] diff --git a/docs/Model/LoggingS3Response.md b/docs/Model/LoggingS3Response.md index 9a692822..6d023aca 100644 --- a/docs/Model/LoggingS3Response.md +++ b/docs/Model/LoggingS3Response.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingScalyrResponse.md b/docs/Model/LoggingScalyrResponse.md index ca5238d6..811a64ce 100644 --- a/docs/Model/LoggingScalyrResponse.md +++ b/docs/Model/LoggingScalyrResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **region** | **string** | The region that log data will be sent to. | [optional] [one of: 'US', 'EU'] [defaults to 'US'] **token** | **string** | The token to use for authentication. | [optional] diff --git a/docs/Model/LoggingSftpResponse.md b/docs/Model/LoggingSftpResponse.md index ec3ebf67..d45a9e7a 100644 --- a/docs/Model/LoggingSftpResponse.md +++ b/docs/Model/LoggingSftpResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | **string** | How the message should be formatted. | [optional] [one of: 'classic', 'loggly', 'logplex', 'blank'] [defaults to 'classic'] **timestamp_format** | **string** | A timestamp format | [optional] [readonly] diff --git a/docs/Model/LoggingSplunkResponse.md b/docs/Model/LoggingSplunkResponse.md index f26d6d72..56bd70a6 100644 --- a/docs/Model/LoggingSplunkResponse.md +++ b/docs/Model/LoggingSplunkResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Model/LoggingSumologicResponse.md b/docs/Model/LoggingSumologicResponse.md index 09157479..7e814bb4 100644 --- a/docs/Model/LoggingSumologicResponse.md +++ b/docs/Model/LoggingSumologicResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **message_type** | [**\Fastly\Model\LoggingMessageType**](LoggingMessageType.md) | | [optional] **url** | **string** | The URL to post logs to. | [optional] diff --git a/docs/Model/LoggingSyslogResponse.md b/docs/Model/LoggingSyslogResponse.md index 4dd23c49..0f9872c8 100644 --- a/docs/Model/LoggingSyslogResponse.md +++ b/docs/Model/LoggingSyslogResponse.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **name** | **string** | The name for the real-time logging configuration. | [optional] **placement** | **string** | Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. | [optional] [one of: 'none', 'null'] **response_condition** | **string** | The name of an existing condition in the configured endpoint, or leave blank to always execute. | [optional] -**format** | **string** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**log_processing_region** | **string** | The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. | [optional] [one of: 'none', 'eu', 'us'] [defaults to 'none'] **format_version** | **string** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional] [one of: '1', '2'] [defaults to '2'] **tls_ca_cert** | **string** | A secure certificate to authenticate a server with. Must be in PEM format. | [optional] [defaults to 'null'] **tls_client_cert** | **string** | The client certificate used to make authenticated requests. Must be in PEM format. | [optional] [defaults to 'null'] diff --git a/docs/Model/PoolAdditional.md b/docs/Model/PoolAdditional.md index 1eac0ea8..338c5222 100644 --- a/docs/Model/PoolAdditional.md +++ b/docs/Model/PoolAdditional.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **healthcheck** | **string** | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] -**override_host** | **string** | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] +**override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PoolResponse.md b/docs/Model/PoolResponse.md index bf1de2cb..81765427 100644 --- a/docs/Model/PoolResponse.md +++ b/docs/Model/PoolResponse.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **healthcheck** | **string** | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] -**override_host** | **string** | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] +**override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] **between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **connect_timeout** | **string** | How long to wait for a timeout in milliseconds. | [optional] **first_byte_timeout** | **string** | How long to wait for the first byte in milliseconds. | [optional] diff --git a/docs/Model/PoolResponsePost.md b/docs/Model/PoolResponsePost.md index 15916c08..ab7affc8 100644 --- a/docs/Model/PoolResponsePost.md +++ b/docs/Model/PoolResponsePost.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **healthcheck** | **string** | Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] -**override_host** | **string** | The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] +**override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] **between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **connect_timeout** | **string** | How long to wait for a timeout in milliseconds. | [optional] **first_byte_timeout** | **string** | How long to wait for the first byte in milliseconds. | [optional] diff --git a/docs/Model/TlsCertificateDataAttributes.md b/docs/Model/TlsCertificateDataAttributes.md index 5b1e7339..127b7262 100644 --- a/docs/Model/TlsCertificateDataAttributes.md +++ b/docs/Model/TlsCertificateDataAttributes.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cert_blob** | **string** | The PEM-formatted certificate blob. Required. | [optional] **name** | **string** | A customizable name for your certificate. Defaults to the certificate's Common Name or first Subject Alternative Names (SAN) entry. Optional. | [optional] +**allow_untrusted_root** | **bool** | Indicates that the supplied certificate was not signed by a trusted CA. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrData.md b/docs/Model/TlsCsrData.md index 61460896..27687efb 100644 --- a/docs/Model/TlsCsrData.md +++ b/docs/Model/TlsCsrData.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | [**\Fastly\Model\TypeTlsCsr**](TypeTlsCsr.md) | | [optional] **attributes** | [**\Fastly\Model\TlsCsrDataAttributes**](TlsCsrDataAttributes.md) | | [optional] -**relationships** | [**\Fastly\Model\RelationshipTlsPrivateKey**](RelationshipTlsPrivateKey.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TlsCsrDataAttributes.md b/docs/Model/TlsCsrDataAttributes.md index 58ea2d85..c99ee367 100644 --- a/docs/Model/TlsCsrDataAttributes.md +++ b/docs/Model/TlsCsrDataAttributes.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **organizational_unit** | **string** | Organizational Unit (OU) - The internal division of the organization managing the certificate. | [optional] **email** | **string** | Email Address (EMAIL) - The organizational contact for this. | [optional] **key_type** | **string** | CSR Key Type. | [optional] [one of: 'RSA2048', 'ECDSA256'] +**relationships_tls_private_key_id** | **string** | Optional. An alphanumeric string identifying the private key you've uploaded for use with your TLS certificate. If left blank, Fastly will create and manage a key for you. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/BackendApi.php b/lib/Api/BackendApi.php index a2fab6f8..43458734 100644 --- a/lib/Api/BackendApi.php +++ b/lib/Api/BackendApi.php @@ -139,10 +139,10 @@ public function getConfig() * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -198,10 +198,10 @@ public function createBackend($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -345,10 +345,10 @@ public function createBackendWithHttpInfo($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -407,10 +407,10 @@ function ($response) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -495,10 +495,10 @@ function ($exception) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -1912,10 +1912,10 @@ public function listBackendsRequest($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -1972,10 +1972,10 @@ public function updateBackend($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -2120,10 +2120,10 @@ public function updateBackendWithHttpInfo($options) * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -2183,10 +2183,10 @@ function ($response) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) @@ -2272,10 +2272,10 @@ function ($exception) { * @param string $name The name of the backend. (optional) * @param string $override_host If set, will replace the client-supplied HTTP `Host` header on connections to this backend. Applied after VCL has been processed, so this setting will take precedence over changing `bereq.http.Host` in VCL. (optional) * @param int $port Port on which the backend server is listening for connections from Fastly. Setting `port` to 80 or 443 will also set `use_ssl` automatically (to false and true respectively), unless explicitly overridden by setting `use_ssl` in the same request. (optional) - * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. (optional) + * @param bool $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. (optional) * @param string $request_condition Name of a Condition, which if satisfied, will select this backend during a request. If set, will override any `auto_loadbalance` setting. By default, the first backend added to a service is selected for all requests. (optional) * @param string $share_key Value that when shared across backends will enable those backends to share the same health check. (optional) - * @param string $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). (optional) + * @param string $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). (optional) * @param string $ssl_ca_cert CA certificate attached to origin. (optional) * @param string $ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. (optional) * @param bool $ssl_check_cert Be strict on checking SSL certs. (optional, default to true) diff --git a/lib/Api/InvitationsApi.php b/lib/Api/InvitationsApi.php index 5e55d7a3..e16640ef 100644 --- a/lib/Api/InvitationsApi.php +++ b/lib/Api/InvitationsApi.php @@ -123,7 +123,7 @@ public function getConfig() * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InvitationResponse + * @return \Fastly\Model\InvitationCreateResponse */ public function createInvitation($options) { @@ -145,7 +145,7 @@ public function createInvitation($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InvitationResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InvitationCreateResponse, HTTP status code, HTTP response headers (array of strings) */ public function createInvitationWithHttpInfo($options) { @@ -200,20 +200,20 @@ public function createInvitationWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InvitationResponse' === '\SplFileObject') { + if ('\Fastly\Model\InvitationCreateResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InvitationResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InvitationCreateResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InvitationResponse'; + $returnType = '\Fastly\Model\InvitationCreateResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -231,7 +231,7 @@ public function createInvitationWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InvitationResponse', + '\Fastly\Model\InvitationCreateResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -283,7 +283,7 @@ function ($response) { */ public function createInvitationAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InvitationResponse'; + $returnType = '\Fastly\Model\InvitationCreateResponse'; $request = $this->createInvitationRequest($options); return $this->client diff --git a/lib/Api/LoggingAzureblobApi.php b/lib/Api/LoggingAzureblobApi.php index 43013171..a02a165f 100644 --- a/lib/Api/LoggingAzureblobApi.php +++ b/lib/Api/LoggingAzureblobApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -163,7 +164,8 @@ public function createLogAzure($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -290,7 +292,8 @@ public function createLogAzureWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -332,7 +335,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -400,7 +404,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to 2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -426,6 +431,7 @@ public function createLogAzureRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : 2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -499,6 +505,10 @@ public function createLogAzureRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1697,7 +1707,8 @@ public function listLogAzureRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1737,7 +1748,8 @@ public function updateLogAzure($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1865,7 +1877,8 @@ public function updateLogAzureWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1908,7 +1921,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1977,7 +1991,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2004,6 +2019,7 @@ public function updateLogAzureRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2091,6 +2107,10 @@ public function updateLogAzureRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingBigqueryApi.php b/lib/Api/LoggingBigqueryApi.php index ebe6a70e..085299a7 100644 --- a/lib/Api/LoggingBigqueryApi.php +++ b/lib/Api/LoggingBigqueryApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -159,7 +160,8 @@ public function createLogBigquery($options) * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -282,7 +284,8 @@ public function createLogBigqueryWithHttpInfo($options) * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -320,7 +323,8 @@ function ($response) { * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -384,7 +388,8 @@ function ($exception) { * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -406,6 +411,7 @@ public function createLogBigqueryRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $user = array_key_exists('user', $options) ? $options['user'] : null; $secret_key = array_key_exists('secret_key', $options) ? $options['secret_key'] : null; @@ -471,6 +477,10 @@ public function createLogBigqueryRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1653,7 +1663,8 @@ public function listLogBigqueryRequest($options) * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1689,7 +1700,8 @@ public function updateLogBigquery($options) * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1813,7 +1825,8 @@ public function updateLogBigqueryWithHttpInfo($options) * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1852,7 +1865,8 @@ function ($response) { * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1917,7 +1931,8 @@ function ($exception) { * @param string $name The name of the BigQuery logging object. Used as a primary key for API access. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1940,6 +1955,7 @@ public function updateLogBigqueryRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $user = array_key_exists('user', $options) ? $options['user'] : null; $secret_key = array_key_exists('secret_key', $options) ? $options['secret_key'] : null; @@ -2019,6 +2035,10 @@ public function updateLogBigqueryRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingCloudfilesApi.php b/lib/Api/LoggingCloudfilesApi.php index 3afb1592..2e3337cb 100644 --- a/lib/Api/LoggingCloudfilesApi.php +++ b/lib/Api/LoggingCloudfilesApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -163,7 +164,8 @@ public function createLogCloudfiles($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -290,7 +292,8 @@ public function createLogCloudfilesWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -332,7 +335,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -400,7 +404,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -426,6 +431,7 @@ public function createLogCloudfilesRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -495,6 +501,10 @@ public function createLogCloudfilesRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1693,7 +1703,8 @@ public function listLogCloudfilesRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1733,7 +1744,8 @@ public function updateLogCloudfiles($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1861,7 +1873,8 @@ public function updateLogCloudfilesWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1904,7 +1917,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1973,7 +1987,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2000,6 +2015,7 @@ public function updateLogCloudfilesRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2083,6 +2099,10 @@ public function updateLogCloudfilesRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingDatadogApi.php b/lib/Api/LoggingDatadogApi.php index 4dfab8ea..756bc93b 100644 --- a/lib/Api/LoggingDatadogApi.php +++ b/lib/Api/LoggingDatadogApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -154,7 +155,8 @@ public function createLogDatadog($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -272,7 +274,8 @@ public function createLogDatadogWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -381,6 +386,7 @@ public function createLogDatadogRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -441,6 +447,10 @@ public function createLogDatadogRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogDatadogRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -1634,7 +1645,8 @@ public function updateLogDatadog($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -1753,7 +1765,8 @@ public function updateLogDatadogWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. (optional, default to '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The API key from your Datadog account. Required. (optional) @@ -1865,6 +1880,7 @@ public function updateLogDatadogRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -1939,6 +1955,10 @@ public function updateLogDatadogRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingDigitaloceanApi.php b/lib/Api/LoggingDigitaloceanApi.php index a625a3d8..dc5147e0 100644 --- a/lib/Api/LoggingDigitaloceanApi.php +++ b/lib/Api/LoggingDigitaloceanApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -163,7 +164,8 @@ public function createLogDigocean($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -290,7 +292,8 @@ public function createLogDigoceanWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -332,7 +335,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -400,7 +404,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -426,6 +431,7 @@ public function createLogDigoceanRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -495,6 +501,10 @@ public function createLogDigoceanRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1693,7 +1703,8 @@ public function listLogDigoceanRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1733,7 +1744,8 @@ public function updateLogDigocean($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1861,7 +1873,8 @@ public function updateLogDigoceanWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1904,7 +1917,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1973,7 +1987,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2000,6 +2015,7 @@ public function updateLogDigoceanRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2083,6 +2099,10 @@ public function updateLogDigoceanRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingElasticsearchApi.php b/lib/Api/LoggingElasticsearchApi.php index 532f7f10..fa43168c 100644 --- a/lib/Api/LoggingElasticsearchApi.php +++ b/lib/Api/LoggingElasticsearchApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -163,7 +164,8 @@ public function createLogElasticsearch($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -290,7 +292,8 @@ public function createLogElasticsearchWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -332,7 +335,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -400,7 +404,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -426,6 +431,7 @@ public function createLogElasticsearchRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -495,6 +501,10 @@ public function createLogElasticsearchRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1693,7 +1703,8 @@ public function listLogElasticsearchRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1733,7 +1744,8 @@ public function updateLogElasticsearch($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1861,7 +1873,8 @@ public function updateLogElasticsearchWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1904,7 +1917,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1973,7 +1987,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -2000,6 +2015,7 @@ public function updateLogElasticsearchRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -2083,6 +2099,10 @@ public function updateLogElasticsearchRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingFtpApi.php b/lib/Api/LoggingFtpApi.php index 478436f4..6c08f62f 100644 --- a/lib/Api/LoggingFtpApi.php +++ b/lib/Api/LoggingFtpApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -165,7 +166,8 @@ public function createLogFtp($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -294,7 +296,8 @@ public function createLogFtpWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -338,7 +341,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -408,7 +412,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -436,6 +441,7 @@ public function createLogFtpRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -507,6 +513,10 @@ public function createLogFtpRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1713,7 +1723,8 @@ public function listLogFtpRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1755,7 +1766,8 @@ public function updateLogFtp($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1885,7 +1897,8 @@ public function updateLogFtpWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1930,7 +1943,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2001,7 +2015,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2030,6 +2045,7 @@ public function updateLogFtpRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2115,6 +2131,10 @@ public function updateLogFtpRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingGcsApi.php b/lib/Api/LoggingGcsApi.php index 1433667a..fcf7145d 100644 --- a/lib/Api/LoggingGcsApi.php +++ b/lib/Api/LoggingGcsApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -164,7 +165,8 @@ public function createLogGcs($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -292,7 +294,8 @@ public function createLogGcsWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -335,7 +338,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -404,7 +408,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -431,6 +436,7 @@ public function createLogGcsRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -501,6 +507,10 @@ public function createLogGcsRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1703,7 +1713,8 @@ public function listLogGcsRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1744,7 +1755,8 @@ public function updateLogGcs($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1873,7 +1885,8 @@ public function updateLogGcsWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1917,7 +1930,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1987,7 +2001,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2015,6 +2030,7 @@ public function updateLogGcsRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2099,6 +2115,10 @@ public function updateLogGcsRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingGrafanacloudlogsApi.php b/lib/Api/LoggingGrafanacloudlogsApi.php index 82c9f4b8..4950d63a 100644 --- a/lib/Api/LoggingGrafanacloudlogsApi.php +++ b/lib/Api/LoggingGrafanacloudlogsApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -156,7 +157,8 @@ public function createLogGrafanacloudlogs($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -276,7 +278,8 @@ public function createLogGrafanacloudlogsWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -311,7 +314,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -372,7 +376,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -391,6 +396,7 @@ public function createLogGrafanacloudlogsRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $user = array_key_exists('user', $options) ? $options['user'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -453,6 +459,10 @@ public function createLogGrafanacloudlogsRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1623,7 +1633,8 @@ public function listLogGrafanacloudlogsRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -1656,7 +1667,8 @@ public function updateLogGrafanacloudlogs($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -1777,7 +1789,8 @@ public function updateLogGrafanacloudlogsWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -1813,7 +1826,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -1875,7 +1889,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user The Grafana Cloud Logs Dataset you want to log to. (optional) * @param string $url The URL of the Loki instance in your Grafana stack. (optional) @@ -1895,6 +1910,7 @@ public function updateLogGrafanacloudlogsRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $user = array_key_exists('user', $options) ? $options['user'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -1971,6 +1987,10 @@ public function updateLogGrafanacloudlogsRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingHerokuApi.php b/lib/Api/LoggingHerokuApi.php index d807727a..64e96ec6 100644 --- a/lib/Api/LoggingHerokuApi.php +++ b/lib/Api/LoggingHerokuApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -154,7 +155,8 @@ public function createLogHeroku($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -272,7 +274,8 @@ public function createLogHerokuWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -381,6 +386,7 @@ public function createLogHerokuRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -441,6 +447,10 @@ public function createLogHerokuRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogHerokuRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -1634,7 +1645,8 @@ public function updateLogHeroku($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -1753,7 +1765,8 @@ public function updateLogHerokuWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://devcenter.heroku.com/articles/add-on-partner-log-integration](https://devcenter.heroku.com/articles/add-on-partner-log-integration)). (optional) * @param string $url The URL to stream logs to. (optional) @@ -1865,6 +1880,7 @@ public function updateLogHerokuRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -1939,6 +1955,10 @@ public function updateLogHerokuRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingHoneycombApi.php b/lib/Api/LoggingHoneycombApi.php index 0fd28db1..967bf2ad 100644 --- a/lib/Api/LoggingHoneycombApi.php +++ b/lib/Api/LoggingHoneycombApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -154,7 +155,8 @@ public function createLogHoneycomb($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -272,7 +274,8 @@ public function createLogHoneycombWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -381,6 +386,7 @@ public function createLogHoneycombRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $dataset = array_key_exists('dataset', $options) ? $options['dataset'] : null; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -441,6 +447,10 @@ public function createLogHoneycombRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogHoneycombRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -1634,7 +1645,8 @@ public function updateLogHoneycomb($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -1753,7 +1765,8 @@ public function updateLogHoneycombWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. (optional) + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $dataset The Honeycomb Dataset you want to log to. (optional) * @param string $token The Write Key from the Account page of your Honeycomb account. (optional) @@ -1865,6 +1880,7 @@ public function updateLogHoneycombRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : null; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $dataset = array_key_exists('dataset', $options) ? $options['dataset'] : null; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -1939,6 +1955,10 @@ public function updateLogHoneycombRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingHttpsApi.php b/lib/Api/LoggingHttpsApi.php index fa982f6c..4dd4d316 100644 --- a/lib/Api/LoggingHttpsApi.php +++ b/lib/Api/LoggingHttpsApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -165,7 +166,8 @@ public function createLogHttps($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -294,7 +296,8 @@ public function createLogHttpsWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -338,7 +341,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -408,7 +412,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -436,6 +441,7 @@ public function createLogHttpsRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -507,6 +513,10 @@ public function createLogHttpsRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1713,7 +1723,8 @@ public function listLogHttpsRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1755,7 +1766,8 @@ public function updateLogHttps($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1885,7 +1897,8 @@ public function updateLogHttpsWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1930,7 +1943,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -2001,7 +2015,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -2030,6 +2045,7 @@ public function updateLogHttpsRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -2115,6 +2131,10 @@ public function updateLogHttpsRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingKafkaApi.php b/lib/Api/LoggingKafkaApi.php index 5510e378..c409c339 100644 --- a/lib/Api/LoggingKafkaApi.php +++ b/lib/Api/LoggingKafkaApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -166,7 +167,8 @@ public function createLogKafka($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -296,7 +298,8 @@ public function createLogKafkaWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -341,7 +344,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -412,7 +416,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -441,6 +446,7 @@ public function createLogKafkaRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -513,6 +519,10 @@ public function createLogKafkaRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingKinesisApi.php b/lib/Api/LoggingKinesisApi.php index c32771be..ef02fe1a 100644 --- a/lib/Api/LoggingKinesisApi.php +++ b/lib/Api/LoggingKinesisApi.php @@ -123,7 +123,7 @@ public function getConfig() * @param int $version_id Integer identifying a service version. (required) * @param string $name The name for the real-time logging configuration. (optional) * @param \Fastly\Model\LoggingPlacement $placement placement (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') * @param string $topic The Amazon Kinesis stream to send logs to. Required. (optional) * @param \Fastly\Model\AwsRegion $region region (optional) * @param string $secret_key The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. (optional) @@ -155,7 +155,7 @@ public function createLogKinesis($options) * @param int $version_id Integer identifying a service version. (required) * @param string $name The name for the real-time logging configuration. (optional) * @param \Fastly\Model\LoggingPlacement $placement (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') * @param string $topic The Amazon Kinesis stream to send logs to. Required. (optional) * @param \Fastly\Model\AwsRegion $region (optional) * @param string $secret_key The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. (optional) @@ -275,7 +275,7 @@ public function createLogKinesisWithHttpInfo($options) * @param int $version_id Integer identifying a service version. (required) * @param string $name The name for the real-time logging configuration. (optional) * @param \Fastly\Model\LoggingPlacement $placement (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') * @param string $topic The Amazon Kinesis stream to send logs to. Required. (optional) * @param \Fastly\Model\AwsRegion $region (optional) * @param string $secret_key The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. (optional) @@ -310,7 +310,7 @@ function ($response) { * @param int $version_id Integer identifying a service version. (required) * @param string $name The name for the real-time logging configuration. (optional) * @param \Fastly\Model\LoggingPlacement $placement (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') * @param string $topic The Amazon Kinesis stream to send logs to. Required. (optional) * @param \Fastly\Model\AwsRegion $region (optional) * @param string $secret_key The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. (optional) @@ -371,7 +371,7 @@ function ($exception) { * @param int $version_id Integer identifying a service version. (required) * @param string $name The name for the real-time logging configuration. (optional) * @param \Fastly\Model\LoggingPlacement $placement (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') * @param string $topic The Amazon Kinesis stream to send logs to. Required. (optional) * @param \Fastly\Model\AwsRegion $region (optional) * @param string $secret_key The secret key associated with the target Amazon Kinesis stream. Not required if `iam_role` is specified. (optional) diff --git a/lib/Api/LoggingLogentriesApi.php b/lib/Api/LoggingLogentriesApi.php index 58b82a2c..d8704bdc 100644 --- a/lib/Api/LoggingLogentriesApi.php +++ b/lib/Api/LoggingLogentriesApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -157,7 +158,8 @@ public function createLogLogentries($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -278,7 +280,8 @@ public function createLogLogentriesWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -314,7 +317,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -376,7 +380,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -396,6 +401,7 @@ public function createLogLogentriesRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $port = array_key_exists('port', $options) ? $options['port'] : 20000; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -458,6 +464,10 @@ public function createLogLogentriesRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1643,7 +1653,8 @@ public function listLogLogentriesRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -1677,7 +1688,8 @@ public function updateLogLogentries($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -1799,7 +1811,8 @@ public function updateLogLogentriesWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -1836,7 +1849,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -1899,7 +1913,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param int $port The port number. (optional, default to 20000) * @param string $token Use token based authentication. (optional) @@ -1920,6 +1935,7 @@ public function updateLogLogentriesRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $port = array_key_exists('port', $options) ? $options['port'] : 20000; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -1996,6 +2012,10 @@ public function updateLogLogentriesRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingLogglyApi.php b/lib/Api/LoggingLogglyApi.php index f8fa217c..599d29d2 100644 --- a/lib/Api/LoggingLogglyApi.php +++ b/lib/Api/LoggingLogglyApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -153,7 +154,8 @@ public function createLogLoggly($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -270,7 +272,8 @@ public function createLogLogglyWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -302,7 +305,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -360,7 +364,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -376,6 +381,7 @@ public function createLogLogglyRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -435,6 +441,10 @@ public function createLogLogglyRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1593,7 +1603,8 @@ public function listLogLogglyRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -1623,7 +1634,8 @@ public function updateLogLoggly($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -1741,7 +1753,8 @@ public function updateLogLogglyWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -1774,7 +1787,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -1833,7 +1847,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The token to use for authentication ([https://www.loggly.com/docs/customer-token-authentication-token/](https://www.loggly.com/docs/customer-token-authentication-token/)). (optional) * @@ -1850,6 +1865,7 @@ public function updateLogLogglyRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -1923,6 +1939,10 @@ public function updateLogLogglyRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingLogshuttleApi.php b/lib/Api/LoggingLogshuttleApi.php index a7812d1d..8c0d8094 100644 --- a/lib/Api/LoggingLogshuttleApi.php +++ b/lib/Api/LoggingLogshuttleApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -154,7 +155,8 @@ public function createLogLogshuttle($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -272,7 +274,8 @@ public function createLogLogshuttleWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -381,6 +386,7 @@ public function createLogLogshuttleRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -441,6 +447,10 @@ public function createLogLogshuttleRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogLogshuttleRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -1634,7 +1645,8 @@ public function updateLogLogshuttle($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -1753,7 +1765,8 @@ public function updateLogLogshuttleWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The data authentication token associated with this endpoint. (optional) * @param string $url The URL to stream logs to. (optional) @@ -1865,6 +1880,7 @@ public function updateLogLogshuttleRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -1939,6 +1955,10 @@ public function updateLogLogshuttleRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingNewrelicApi.php b/lib/Api/LoggingNewrelicApi.php index 11ca2f51..e7353d38 100644 --- a/lib/Api/LoggingNewrelicApi.php +++ b/lib/Api/LoggingNewrelicApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -154,7 +155,8 @@ public function createLogNewrelic($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -272,7 +274,8 @@ public function createLogNewrelicWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -381,6 +386,7 @@ public function createLogNewrelicRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; @@ -441,6 +447,10 @@ public function createLogNewrelicRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogNewrelicRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1634,7 +1645,8 @@ public function updateLogNewrelic($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1753,7 +1765,8 @@ public function updateLogNewrelicWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1865,6 +1880,7 @@ public function updateLogNewrelicRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; @@ -1939,6 +1955,10 @@ public function updateLogNewrelicRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingNewrelicotlpApi.php b/lib/Api/LoggingNewrelicotlpApi.php index 8bf62826..b9f80a51 100644 --- a/lib/Api/LoggingNewrelicotlpApi.php +++ b/lib/Api/LoggingNewrelicotlpApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -155,7 +156,8 @@ public function createLogNewrelicotlp($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -274,7 +276,8 @@ public function createLogNewrelicotlpWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -308,7 +311,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -368,7 +372,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -386,6 +391,7 @@ public function createLogNewrelicotlpRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; @@ -447,6 +453,10 @@ public function createLogNewrelicotlpRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1613,7 +1623,8 @@ public function listLogNewrelicotlpRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1645,7 +1656,8 @@ public function updateLogNewrelicotlp($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1765,7 +1777,8 @@ public function updateLogNewrelicotlpWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1800,7 +1813,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1861,7 +1875,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $token The Insert API key from the Account page of your New Relic account. Required. (optional) * @param string $region The region to which to stream logs. (optional, default to 'US') @@ -1880,6 +1895,7 @@ public function updateLogNewrelicotlpRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $token = array_key_exists('token', $options) ? $options['token'] : null; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; @@ -1955,6 +1971,10 @@ public function updateLogNewrelicotlpRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingOpenstackApi.php b/lib/Api/LoggingOpenstackApi.php index 2d82c84c..2562187e 100644 --- a/lib/Api/LoggingOpenstackApi.php +++ b/lib/Api/LoggingOpenstackApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -163,7 +164,8 @@ public function createLogOpenstack($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -290,7 +292,8 @@ public function createLogOpenstackWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -332,7 +335,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -400,7 +404,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -426,6 +431,7 @@ public function createLogOpenstackRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -495,6 +501,10 @@ public function createLogOpenstackRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1693,7 +1703,8 @@ public function listLogOpenstackRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1733,7 +1744,8 @@ public function updateLogOpenstack($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1861,7 +1873,8 @@ public function updateLogOpenstackWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1904,7 +1917,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1973,7 +1987,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2000,6 +2015,7 @@ public function updateLogOpenstackRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2083,6 +2099,10 @@ public function updateLogOpenstackRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingPapertrailApi.php b/lib/Api/LoggingPapertrailApi.php index 4ee402ab..6d600de7 100644 --- a/lib/Api/LoggingPapertrailApi.php +++ b/lib/Api/LoggingPapertrailApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -154,7 +155,8 @@ public function createLogPapertrail($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -272,7 +274,8 @@ public function createLogPapertrailWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -381,6 +386,7 @@ public function createLogPapertrailRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $address = array_key_exists('address', $options) ? $options['address'] : null; $port = array_key_exists('port', $options) ? $options['port'] : 514; @@ -441,6 +447,10 @@ public function createLogPapertrailRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogPapertrailRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -1634,7 +1645,8 @@ public function updateLogPapertrail($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -1753,7 +1765,8 @@ public function updateLogPapertrailWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $address A hostname or IPv4 address. (optional) * @param int $port The port number. (optional, default to 514) @@ -1865,6 +1880,7 @@ public function updateLogPapertrailRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $address = array_key_exists('address', $options) ? $options['address'] : null; $port = array_key_exists('port', $options) ? $options['port'] : 514; @@ -1939,6 +1955,10 @@ public function updateLogPapertrailRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingPubsubApi.php b/lib/Api/LoggingPubsubApi.php index 88d3f89c..76041ef0 100644 --- a/lib/Api/LoggingPubsubApi.php +++ b/lib/Api/LoggingPubsubApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -157,7 +158,8 @@ public function createLogGcpPubsub($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -278,7 +280,8 @@ public function createLogGcpPubsubWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -314,7 +317,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -376,7 +380,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -396,6 +401,7 @@ public function createLogGcpPubsubRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $user = array_key_exists('user', $options) ? $options['user'] : null; $secret_key = array_key_exists('secret_key', $options) ? $options['secret_key'] : null; @@ -459,6 +465,10 @@ public function createLogGcpPubsubRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1633,7 +1643,8 @@ public function listLogGcpPubsubRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1667,7 +1678,8 @@ public function updateLogGcpPubsub($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1789,7 +1801,8 @@ public function updateLogGcpPubsubWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1826,7 +1839,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1889,7 +1903,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $user Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) * @param string $secret_key Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified. (optional) @@ -1910,6 +1925,7 @@ public function updateLogGcpPubsubRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $user = array_key_exists('user', $options) ? $options['user'] : null; $secret_key = array_key_exists('secret_key', $options) ? $options['secret_key'] : null; @@ -1987,6 +2003,10 @@ public function updateLogGcpPubsubRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingS3Api.php b/lib/Api/LoggingS3Api.php index d66f1864..9e4b81e8 100644 --- a/lib/Api/LoggingS3Api.php +++ b/lib/Api/LoggingS3Api.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -169,7 +170,8 @@ public function createLogAwsS3($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -302,7 +304,8 @@ public function createLogAwsS3WithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -350,7 +353,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -424,7 +428,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -456,6 +461,7 @@ public function createLogAwsS3Request($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -535,6 +541,10 @@ public function createLogAwsS3Request($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1757,7 +1767,8 @@ public function listLogAwsS3Request($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1803,7 +1814,8 @@ public function updateLogAwsS3($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1937,7 +1949,8 @@ public function updateLogAwsS3WithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1986,7 +1999,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2061,7 +2075,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2094,6 +2109,7 @@ public function updateLogAwsS3Request($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2187,6 +2203,10 @@ public function updateLogAwsS3Request($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingScalyrApi.php b/lib/Api/LoggingScalyrApi.php index 9dda0aba..540827f7 100644 --- a/lib/Api/LoggingScalyrApi.php +++ b/lib/Api/LoggingScalyrApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -155,7 +156,8 @@ public function createLogScalyr($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -274,7 +276,8 @@ public function createLogScalyrWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -308,7 +311,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -368,7 +372,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -386,6 +391,7 @@ public function createLogScalyrRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -447,6 +453,10 @@ public function createLogScalyrRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1613,7 +1623,8 @@ public function listLogScalyrRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -1645,7 +1656,8 @@ public function updateLogScalyr($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -1765,7 +1777,8 @@ public function updateLogScalyrWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -1800,7 +1813,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -1861,7 +1875,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $region The region that log data will be sent to. (optional, default to 'US') * @param string $token The token to use for authentication. (optional) @@ -1880,6 +1895,7 @@ public function updateLogScalyrRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $region = array_key_exists('region', $options) ? $options['region'] : 'US'; $token = array_key_exists('token', $options) ? $options['token'] : null; @@ -1955,6 +1971,10 @@ public function updateLogScalyrRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingSftpApi.php b/lib/Api/LoggingSftpApi.php index 5afe204f..6aec9f13 100644 --- a/lib/Api/LoggingSftpApi.php +++ b/lib/Api/LoggingSftpApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -165,7 +166,8 @@ public function createLogSftp($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -294,7 +296,8 @@ public function createLogSftpWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -338,7 +341,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -408,7 +412,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -436,6 +441,7 @@ public function createLogSftpRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -507,6 +513,10 @@ public function createLogSftpRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1713,7 +1723,8 @@ public function listLogSftpRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1755,7 +1766,8 @@ public function updateLogSftp($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1885,7 +1897,8 @@ public function updateLogSftpWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -1930,7 +1943,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2001,7 +2015,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $message_type How the message should be formatted. (optional, default to 'classic') * @param string $timestamp_format A timestamp format (optional) @@ -2030,6 +2045,7 @@ public function updateLogSftpRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : 'classic'; $timestamp_format = array_key_exists('timestamp_format', $options) ? $options['timestamp_format'] : null; @@ -2115,6 +2131,10 @@ public function updateLogSftpRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingSplunkApi.php b/lib/Api/LoggingSplunkApi.php index 01f76001..44a0bd03 100644 --- a/lib/Api/LoggingSplunkApi.php +++ b/lib/Api/LoggingSplunkApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -161,7 +162,8 @@ public function createLogSplunk($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -286,7 +288,8 @@ public function createLogSplunkWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -326,7 +329,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -392,7 +396,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -416,6 +421,7 @@ public function createLogSplunkRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -483,6 +489,10 @@ public function createLogSplunkRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1673,7 +1683,8 @@ public function listLogSplunkRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1711,7 +1722,8 @@ public function updateLogSplunk($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1837,7 +1849,8 @@ public function updateLogSplunkWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1878,7 +1891,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1945,7 +1959,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1970,6 +1985,7 @@ public function updateLogSplunkRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -2051,6 +2067,10 @@ public function updateLogSplunkRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingSumologicApi.php b/lib/Api/LoggingSumologicApi.php index 1088b216..b4cf5a9d 100644 --- a/lib/Api/LoggingSumologicApi.php +++ b/lib/Api/LoggingSumologicApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -154,7 +155,8 @@ public function createLogSumologic($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -272,7 +274,8 @@ public function createLogSumologicWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -305,7 +308,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -364,7 +368,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -381,6 +386,7 @@ public function createLogSumologicRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -441,6 +447,10 @@ public function createLogSumologicRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1603,7 +1613,8 @@ public function listLogSumologicRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -1634,7 +1645,8 @@ public function updateLogSumologic($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -1753,7 +1765,8 @@ public function updateLogSumologicWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -1787,7 +1800,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -1847,7 +1861,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param \Fastly\Model\LoggingMessageType $message_type (optional) * @param string $url The URL to post logs to. (optional) @@ -1865,6 +1880,7 @@ public function updateLogSumologicRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $message_type = array_key_exists('message_type', $options) ? $options['message_type'] : null; $url = array_key_exists('url', $options) ? $options['url'] : null; @@ -1939,6 +1955,10 @@ public function updateLogSumologicRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/LoggingSyslogApi.php b/lib/Api/LoggingSyslogApi.php index 4c2c7260..03834587 100644 --- a/lib/Api/LoggingSyslogApi.php +++ b/lib/Api/LoggingSyslogApi.php @@ -124,7 +124,8 @@ public function getConfig() * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -163,7 +164,8 @@ public function createLogSyslog($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -290,7 +292,8 @@ public function createLogSyslogWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -332,7 +335,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -400,7 +404,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -426,6 +431,7 @@ public function createLogSyslogRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -495,6 +501,10 @@ public function createLogSyslogRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } @@ -1693,7 +1703,8 @@ public function listLogSyslogRequest($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1733,7 +1744,8 @@ public function updateLogSyslog($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1861,7 +1873,8 @@ public function updateLogSyslogWithHttpInfo($options) * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1904,7 +1917,8 @@ function ($response) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -1973,7 +1987,8 @@ function ($exception) { * @param string $name The name for the real-time logging configuration. (optional) * @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`. (optional) * @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional) - * @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). (optional, default to '%h %l %u %t "%r" %>s %b') + * @param string $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. (optional, default to 'none') * @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (optional, default to self::FORMAT_VERSION_v2) * @param string $tls_ca_cert A secure certificate to authenticate a server with. Must be in PEM format. (optional, default to 'null') * @param string $tls_client_cert The client certificate used to make authenticated requests. Must be in PEM format. (optional, default to 'null') @@ -2000,6 +2015,7 @@ public function updateLogSyslogRequest($options) $placement = array_key_exists('placement', $options) ? $options['placement'] : null; $response_condition = array_key_exists('response_condition', $options) ? $options['response_condition'] : null; $format = array_key_exists('format', $options) ? $options['format'] : '%h %l %u %t "%r" %>s %b'; + $log_processing_region = array_key_exists('log_processing_region', $options) ? $options['log_processing_region'] : 'none'; $format_version = array_key_exists('format_version', $options) ? $options['format_version'] : self::FORMAT_VERSION_v2; $tls_ca_cert = array_key_exists('tls_ca_cert', $options) ? $options['tls_ca_cert'] : 'null'; $tls_client_cert = array_key_exists('tls_client_cert', $options) ? $options['tls_client_cert'] : 'null'; @@ -2083,6 +2099,10 @@ public function updateLogSyslogRequest($options) $formParams['format'] = ObjectSerializer::toFormValue($format); } // form params + if ($log_processing_region !== null) { + $formParams['log_processing_region'] = ObjectSerializer::toFormValue($log_processing_region); + } + // form params if ($format_version !== null) { $formParams['format_version'] = ObjectSerializer::toFormValue($format_version); } diff --git a/lib/Api/PoolApi.php b/lib/Api/PoolApi.php index 5a32cf66..673ed25e 100644 --- a/lib/Api/PoolApi.php +++ b/lib/Api/PoolApi.php @@ -141,7 +141,7 @@ public function getConfig() * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -191,7 +191,7 @@ public function createServerPool($options) * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -329,7 +329,7 @@ public function createServerPoolWithHttpInfo($options) * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -382,7 +382,7 @@ function ($response) { * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -461,7 +461,7 @@ function ($exception) { * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -1827,7 +1827,7 @@ public function listServerPoolsRequest($options) * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -1878,7 +1878,7 @@ public function updateServerPool($options) * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -2017,7 +2017,7 @@ public function updateServerPoolWithHttpInfo($options) * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -2071,7 +2071,7 @@ function ($response) { * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) @@ -2151,7 +2151,7 @@ function ($exception) { * @param string $healthcheck Name of the healthcheck to use with this pool. Can be empty and could be reused across multiple backend and pools. (optional) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) - * @param string $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') + * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) diff --git a/lib/Configuration.php b/lib/Configuration.php index 58b3501c..b21709f3 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/10.0.0'; + protected $userAgent = 'fastly-php/10.1.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 10.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 10.1.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/Backend.php b/lib/Model/Backend.php index 3922ff68..0abaeac0 100644 --- a/lib/Model/Backend.php +++ b/lib/Model/Backend.php @@ -858,7 +858,7 @@ public function getPreferIpv6() /** * Sets prefer_ipv6 * - * @param bool|null $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. + * @param bool|null $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. * * @return self */ @@ -935,7 +935,7 @@ public function getShield() /** * Sets shield * - * @param string|null $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). + * @param string|null $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). * * @return self */ diff --git a/lib/Model/BackendResponse.php b/lib/Model/BackendResponse.php index 7eefd204..b1ba9121 100644 --- a/lib/Model/BackendResponse.php +++ b/lib/Model/BackendResponse.php @@ -894,7 +894,7 @@ public function getPreferIpv6() /** * Sets prefer_ipv6 * - * @param bool|null $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. + * @param bool|null $prefer_ipv6 Prefer IPv6 connections to origins for hostname backends. Default is 'false' for Delivery services and 'true' for Compute services. * * @return self */ @@ -971,7 +971,7 @@ public function getShield() /** * Sets shield * - * @param string|null $shield Identifier of the POP to use as a [shield](https://docs.fastly.com/en/guides/shielding). + * @param string|null $shield Identifier of the POP to use as a [shield](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding/). * * @return self */ diff --git a/lib/Model/Invitation.php b/lib/Model/Invitation.php index 9f3b144d..c728cd7d 100644 --- a/lib/Model/Invitation.php +++ b/lib/Model/Invitation.php @@ -53,7 +53,7 @@ class Invitation implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\InvitationData' + 'data' => '\Fastly\Model\InvitationCreateData' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\InvitationData|null + * @return \Fastly\Model\InvitationCreateData|null */ public function getData() { @@ -212,7 +212,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\InvitationData|null $data data + * @param \Fastly\Model\InvitationCreateData|null $data data * * @return self */ diff --git a/lib/Model/InvitationCreateData.php b/lib/Model/InvitationCreateData.php new file mode 100644 index 00000000..f07aff8b --- /dev/null +++ b/lib/Model/InvitationCreateData.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InvitationCreateData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'invitation_create_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'type' => '\Fastly\Model\TypeInvitation', + 'attributes' => '\Fastly\Model\InvitationDataAttributes', + 'relationships' => '\Fastly\Model\RelationshipServiceInvitationsCreate' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'type' => null, + 'attributes' => null, + 'relationships' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'attributes' => 'attributes', + 'relationships' => 'relationships' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'attributes' => 'setAttributes', + 'relationships' => 'setRelationships' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'attributes' => 'getAttributes', + 'relationships' => 'getRelationships' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['relationships'] = $data['relationships'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \Fastly\Model\TypeInvitation|null + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \Fastly\Model\TypeInvitation|null $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets attributes + * + * @return \Fastly\Model\InvitationDataAttributes|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \Fastly\Model\InvitationDataAttributes|null $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets relationships + * + * @return \Fastly\Model\RelationshipServiceInvitationsCreate|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \Fastly\Model\RelationshipServiceInvitationsCreate|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InvitationCreateDataAllOf.php b/lib/Model/InvitationCreateDataAllOf.php new file mode 100644 index 00000000..0a3fd887 --- /dev/null +++ b/lib/Model/InvitationCreateDataAllOf.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InvitationCreateDataAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'invitation_create_data_allOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'relationships' => '\Fastly\Model\RelationshipServiceInvitationsCreate' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'relationships' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'relationships' => 'relationships' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'relationships' => 'setRelationships' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'relationships' => 'getRelationships' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['relationships'] = $data['relationships'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets relationships + * + * @return \Fastly\Model\RelationshipServiceInvitationsCreate|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \Fastly\Model\RelationshipServiceInvitationsCreate|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InvitationResponse.php b/lib/Model/InvitationCreateResponse.php similarity index 96% rename from lib/Model/InvitationResponse.php rename to lib/Model/InvitationCreateResponse.php index d0d4c021..3b334f3c 100644 --- a/lib/Model/InvitationResponse.php +++ b/lib/Model/InvitationCreateResponse.php @@ -1,6 +1,6 @@ '\Fastly\Model\TypeInvitation', - 'attributes' => '\Fastly\Model\InvitationDataAttributes', - 'relationships' => '\Fastly\Model\RelationshipServiceInvitationsCreate' + 'attributes' => '\Fastly\Model\InvitationDataAttributes' ]; /** @@ -67,8 +66,7 @@ class InvitationData implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'type' => null, - 'attributes' => null, - 'relationships' => null + 'attributes' => null ]; /** @@ -99,8 +97,7 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'type' => 'type', - 'attributes' => 'attributes', - 'relationships' => 'relationships' + 'attributes' => 'attributes' ]; /** @@ -110,8 +107,7 @@ public static function fastlyFormats() */ protected static $setters = [ 'type' => 'setType', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' + 'attributes' => 'setAttributes' ]; /** @@ -121,8 +117,7 @@ public static function fastlyFormats() */ protected static $getters = [ 'type' => 'getType', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' + 'attributes' => 'getAttributes' ]; /** @@ -184,7 +179,6 @@ public function __construct(array $data = null) { $this->container['type'] = $data['type'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; } /** @@ -258,30 +252,6 @@ public function setAttributes($attributes) return $this; } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipServiceInvitationsCreate|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipServiceInvitationsCreate|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/InvitationResponseData.php b/lib/Model/InvitationResponseData.php index 22b9218f..3ca33d3e 100644 --- a/lib/Model/InvitationResponseData.php +++ b/lib/Model/InvitationResponseData.php @@ -55,8 +55,8 @@ class InvitationResponseData implements ModelInterface, ArrayAccess, \JsonSerial protected static $fastlyTypes = [ 'type' => '\Fastly\Model\TypeInvitation', 'attributes' => '\Fastly\Model\Timestamps', - 'relationships' => '\Fastly\Model\RelationshipsForInvitation', - 'id' => 'string' + 'id' => 'string', + 'relationships' => '\Fastly\Model\RelationshipsForInvitation' ]; /** @@ -69,8 +69,8 @@ class InvitationResponseData implements ModelInterface, ArrayAccess, \JsonSerial protected static $fastlyFormats = [ 'type' => null, 'attributes' => null, - 'relationships' => null, - 'id' => null + 'id' => null, + 'relationships' => null ]; /** @@ -102,8 +102,8 @@ public static function fastlyFormats() protected static $attributeMap = [ 'type' => 'type', 'attributes' => 'attributes', - 'relationships' => 'relationships', - 'id' => 'id' + 'id' => 'id', + 'relationships' => 'relationships' ]; /** @@ -114,8 +114,8 @@ public static function fastlyFormats() protected static $setters = [ 'type' => 'setType', 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships', - 'id' => 'setId' + 'id' => 'setId', + 'relationships' => 'setRelationships' ]; /** @@ -126,8 +126,8 @@ public static function fastlyFormats() protected static $getters = [ 'type' => 'getType', 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships', - 'id' => 'getId' + 'id' => 'getId', + 'relationships' => 'getRelationships' ]; /** @@ -189,8 +189,8 @@ public function __construct(array $data = null) { $this->container['type'] = $data['type'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['relationships'] = $data['relationships'] ?? null; } /** @@ -266,49 +266,49 @@ public function setAttributes($attributes) } /** - * Gets relationships + * Gets id * - * @return \Fastly\Model\RelationshipsForInvitation|null + * @return string|null */ - public function getRelationships() + public function getId() { - return $this->container['relationships']; + return $this->container['id']; } /** - * Sets relationships + * Sets id * - * @param \Fastly\Model\RelationshipsForInvitation|null $relationships relationships + * @param string|null $id id * * @return self */ - public function setRelationships($relationships) + public function setId($id) { - $this->container['relationships'] = $relationships; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets relationships * - * @return string|null + * @return \Fastly\Model\RelationshipsForInvitation|null */ - public function getId() + public function getRelationships() { - return $this->container['id']; + return $this->container['relationships']; } /** - * Sets id + * Sets relationships * - * @param string|null $id id + * @param \Fastly\Model\RelationshipsForInvitation|null $relationships relationships * * @return self */ - public function setId($id) + public function setRelationships($relationships) { - $this->container['id'] = $id; + $this->container['relationships'] = $relationships; return $this; } diff --git a/lib/Model/LoggingAzureblobResponse.php b/lib/Model/LoggingAzureblobResponse.php index e604a024..298bbbad 100644 --- a/lib/Model/LoggingAzureblobResponse.php +++ b/lib/Model/LoggingAzureblobResponse.php @@ -57,6 +57,7 @@ class LoggingAzureblobResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -88,6 +89,7 @@ class LoggingAzureblobResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -138,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -167,6 +170,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -196,6 +200,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -258,6 +263,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -281,6 +289,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -342,6 +364,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -379,6 +402,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -520,7 +552,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -531,6 +563,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingBigqueryAdditional.php b/lib/Model/LoggingBigqueryAdditional.php index 8b25c83a..5ffa3169 100644 --- a/lib/Model/LoggingBigqueryAdditional.php +++ b/lib/Model/LoggingBigqueryAdditional.php @@ -266,7 +266,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. * * @return self */ diff --git a/lib/Model/LoggingBigqueryResponse.php b/lib/Model/LoggingBigqueryResponse.php index 84f776c7..e38292e4 100644 --- a/lib/Model/LoggingBigqueryResponse.php +++ b/lib/Model/LoggingBigqueryResponse.php @@ -57,6 +57,7 @@ class LoggingBigqueryResponse implements ModelInterface, ArrayAccess, \JsonSeria 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'user' => 'string', 'secret_key' => 'string', @@ -84,6 +85,7 @@ class LoggingBigqueryResponse implements ModelInterface, ArrayAccess, \JsonSeria 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'user' => null, 'secret_key' => null, @@ -130,6 +132,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'user' => 'user', 'secret_key' => 'secret_key', @@ -155,6 +158,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'user' => 'setUser', 'secret_key' => 'setSecretKey', @@ -180,6 +184,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'user' => 'getUser', 'secret_key' => 'getSecretKey', @@ -238,6 +243,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -254,6 +262,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -286,6 +308,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? null; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['user'] = $data['user'] ?? null; $this->container['secret_key'] = $data['secret_key'] ?? null; @@ -319,6 +342,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -438,7 +470,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce JSON that matches the schema of your BigQuery table. * * @return self */ @@ -449,6 +481,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingCloudfilesResponse.php b/lib/Model/LoggingCloudfilesResponse.php index 8f9556cf..8d5eaf6d 100644 --- a/lib/Model/LoggingCloudfilesResponse.php +++ b/lib/Model/LoggingCloudfilesResponse.php @@ -57,6 +57,7 @@ class LoggingCloudfilesResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -88,6 +89,7 @@ class LoggingCloudfilesResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -138,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -167,6 +170,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -196,6 +200,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -258,6 +263,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -288,6 +296,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -367,6 +389,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -404,6 +427,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -550,7 +582,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -561,6 +593,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingCommon.php b/lib/Model/LoggingCommon.php index d0073b7a..59345510 100644 --- a/lib/Model/LoggingCommon.php +++ b/lib/Model/LoggingCommon.php @@ -56,7 +56,8 @@ class LoggingCommon implements ModelInterface, ArrayAccess, \JsonSerializable 'name' => 'string', 'placement' => 'string', 'response_condition' => 'string', - 'format' => 'string' + 'format' => 'string', + 'log_processing_region' => 'string' ]; /** @@ -70,7 +71,8 @@ class LoggingCommon implements ModelInterface, ArrayAccess, \JsonSerializable 'name' => null, 'placement' => null, 'response_condition' => null, - 'format' => null + 'format' => null, + 'log_processing_region' => null ]; /** @@ -103,7 +105,8 @@ public static function fastlyFormats() 'name' => 'name', 'placement' => 'placement', 'response_condition' => 'response_condition', - 'format' => 'format' + 'format' => 'format', + 'log_processing_region' => 'log_processing_region' ]; /** @@ -115,7 +118,8 @@ public static function fastlyFormats() 'name' => 'setName', 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', - 'format' => 'setFormat' + 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion' ]; /** @@ -127,7 +131,8 @@ public static function fastlyFormats() 'name' => 'getName', 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', - 'format' => 'getFormat' + 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion' ]; /** @@ -173,6 +178,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; /** * Gets allowable values of the enum @@ -187,6 +195,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Associative array for storing property values * @@ -206,6 +228,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; } /** @@ -226,6 +249,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -336,7 +368,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -346,6 +378,40 @@ public function setFormat($format) return $this; } + + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoggingCommonResponse.php b/lib/Model/LoggingCommonResponse.php index 2083aaed..93410f9f 100644 --- a/lib/Model/LoggingCommonResponse.php +++ b/lib/Model/LoggingCommonResponse.php @@ -57,6 +57,7 @@ class LoggingCommonResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string' ]; @@ -72,6 +73,7 @@ class LoggingCommonResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null ]; @@ -106,6 +108,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version' ]; @@ -119,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion' ]; @@ -132,6 +136,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion' ]; @@ -178,6 +183,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -194,6 +202,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -226,6 +248,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; } @@ -247,6 +270,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -366,7 +398,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -377,6 +409,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingCommonResponseAllOf.php b/lib/Model/LoggingCommonResponseAllOf.php index 70a9120c..84668923 100644 --- a/lib/Model/LoggingCommonResponseAllOf.php +++ b/lib/Model/LoggingCommonResponseAllOf.php @@ -56,7 +56,8 @@ class LoggingCommonResponseAllOf implements ModelInterface, ArrayAccess, \JsonSe 'name' => 'string', 'placement' => 'string', 'response_condition' => 'string', - 'format' => 'string' + 'format' => 'string', + 'log_processing_region' => 'string' ]; /** @@ -70,7 +71,8 @@ class LoggingCommonResponseAllOf implements ModelInterface, ArrayAccess, \JsonSe 'name' => null, 'placement' => null, 'response_condition' => null, - 'format' => null + 'format' => null, + 'log_processing_region' => null ]; /** @@ -103,7 +105,8 @@ public static function fastlyFormats() 'name' => 'name', 'placement' => 'placement', 'response_condition' => 'response_condition', - 'format' => 'format' + 'format' => 'format', + 'log_processing_region' => 'log_processing_region' ]; /** @@ -115,7 +118,8 @@ public static function fastlyFormats() 'name' => 'setName', 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', - 'format' => 'setFormat' + 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion' ]; /** @@ -127,7 +131,8 @@ public static function fastlyFormats() 'name' => 'getName', 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', - 'format' => 'getFormat' + 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion' ]; /** @@ -173,6 +178,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; /** * Gets allowable values of the enum @@ -187,6 +195,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Associative array for storing property values * @@ -206,6 +228,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; } /** @@ -226,6 +249,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -336,7 +368,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -346,6 +378,40 @@ public function setFormat($format) return $this; } + + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoggingDatadogAdditional.php b/lib/Model/LoggingDatadogAdditional.php index d65fd8a3..9b83ab3c 100644 --- a/lib/Model/LoggingDatadogAdditional.php +++ b/lib/Model/LoggingDatadogAdditional.php @@ -290,7 +290,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. * * @return self */ diff --git a/lib/Model/LoggingDatadogResponse.php b/lib/Model/LoggingDatadogResponse.php index 50bed1c2..a0b58f02 100644 --- a/lib/Model/LoggingDatadogResponse.php +++ b/lib/Model/LoggingDatadogResponse.php @@ -57,6 +57,7 @@ class LoggingDatadogResponse implements ModelInterface, ArrayAccess, \JsonSerial 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'region' => 'string', 'token' => 'string', @@ -79,6 +80,7 @@ class LoggingDatadogResponse implements ModelInterface, ArrayAccess, \JsonSerial 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'region' => null, 'token' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'region' => 'region', 'token' => 'token', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'region' => 'setRegion', 'token' => 'setToken', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'region' => 'getRegion', 'token' => 'getToken', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const REGION_US = 'US'; @@ -235,6 +243,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -284,6 +306,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '{"ddsource":"fastly","service":"%{req.service_id}V","date":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_start":"%{begin:%Y-%m-%dT%H:%M:%S%Z}t","time_end":"%{end:%Y-%m-%dT%H:%M:%S%Z}t","http":{"request_time_ms":"%D","method":"%m","url":"%{json.escape(req.url)}V","useragent":"%{User-Agent}i","referer":"%{Referer}i","protocol":"%H","request_x_forwarded_for":"%{X-Forwarded-For}i","status_code":"%s"},"network":{"client":{"ip":"%h","name":"%{client.as.name}V","number":"%{client.as.number}V","connection_speed":"%{client.geo.conn_speed}V"},"destination":{"ip":"%A"},"geoip":{"geo_city":"%{client.geo.city.utf8}V","geo_country_code":"%{client.geo.country_code}V","geo_continent_code":"%{client.geo.continent_code}V","geo_region":"%{client.geo.region}V"},"bytes_written":"%B","bytes_read":"%{req.body_bytes_read}V"},"host":"%{Fastly-Orig-Host}i","origin_host":"%v","is_ipv6":"%{if(req.is_ipv6, \"true\", \"false\")}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","tls_client_protocol":"%{json.escape(tls.client.protocol)}V","tls_client_servername":"%{json.escape(tls.client.servername)}V","tls_client_cipher":"%{json.escape(tls.client.cipher)}V","tls_client_cipher_sha":"%{json.escape(tls.client.ciphers_sha)}V","tls_client_tlsexts_sha":"%{json.escape(tls.client.tlsexts_sha)}V","is_h2":"%{if(fastly_info.is_h2, \"true\", \"false\")}V","is_h2_push":"%{if(fastly_info.h2.is_push, \"true\", \"false\")}V","h2_stream_id":"%{fastly_info.h2.stream_id}V","request_accept_content":"%{Accept}i","request_accept_language":"%{Accept-Language}i","request_accept_encoding":"%{Accept-Encoding}i","request_accept_charset":"%{Accept-Charset}i","request_connection":"%{Connection}i","request_dnt":"%{DNT}i","request_forwarded":"%{Forwarded}i","request_via":"%{Via}i","request_cache_control":"%{Cache-Control}i","request_x_requested_with":"%{X-Requested-With}i","request_x_att_device_id":"%{X-ATT-Device-Id}i","content_type":"%{Content-Type}o","is_cacheable":"%{if(fastly_info.state~\"^(HIT|MISS)$\", \"true\", \"false\")}V","response_age":"%{Age}o","response_cache_control":"%{Cache-Control}o","response_expires":"%{Expires}o","response_last_modified":"%{Last-Modified}o","response_tsv":"%{TSV}o","server_datacenter":"%{server.datacenter}V","req_header_size":"%{req.header_bytes_read}V","resp_header_size":"%{resp.header_bytes_written}V","socket_cwnd":"%{client.socket.cwnd}V","socket_nexthop":"%{client.socket.nexthop}V","socket_tcpi_rcv_mss":"%{client.socket.tcpi_rcv_mss}V","socket_tcpi_snd_mss":"%{client.socket.tcpi_snd_mss}V","socket_tcpi_rtt":"%{client.socket.tcpi_rtt}V","socket_tcpi_rttvar":"%{client.socket.tcpi_rttvar}V","socket_tcpi_rcv_rtt":"%{client.socket.tcpi_rcv_rtt}V","socket_tcpi_rcv_space":"%{client.socket.tcpi_rcv_space}V","socket_tcpi_last_data_sent":"%{client.socket.tcpi_last_data_sent}V","socket_tcpi_total_retrans":"%{client.socket.tcpi_total_retrans}V","socket_tcpi_delta_retrans":"%{client.socket.tcpi_delta_retrans}V","socket_ploss":"%{client.socket.ploss}V"}'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['region'] = $data['region'] ?? 'US'; $this->container['token'] = $data['token'] ?? null; @@ -312,6 +335,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -440,7 +472,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Datadog can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Datadog can ingest. * * @return self */ @@ -451,6 +483,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingDigitaloceanResponse.php b/lib/Model/LoggingDigitaloceanResponse.php index aac8d3c5..40c9f48c 100644 --- a/lib/Model/LoggingDigitaloceanResponse.php +++ b/lib/Model/LoggingDigitaloceanResponse.php @@ -57,6 +57,7 @@ class LoggingDigitaloceanResponse implements ModelInterface, ArrayAccess, \JsonS 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -88,6 +89,7 @@ class LoggingDigitaloceanResponse implements ModelInterface, ArrayAccess, \JsonS 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -138,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -167,6 +170,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -196,6 +200,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -258,6 +263,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -281,6 +289,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -342,6 +364,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -379,6 +402,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -516,7 +548,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -527,6 +559,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingElasticsearchAdditional.php b/lib/Model/LoggingElasticsearchAdditional.php index 669d801c..7233215c 100644 --- a/lib/Model/LoggingElasticsearchAdditional.php +++ b/lib/Model/LoggingElasticsearchAdditional.php @@ -362,7 +362,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. * * @return self */ diff --git a/lib/Model/LoggingElasticsearchResponse.php b/lib/Model/LoggingElasticsearchResponse.php index 66eb73a0..6acdafd7 100644 --- a/lib/Model/LoggingElasticsearchResponse.php +++ b/lib/Model/LoggingElasticsearchResponse.php @@ -57,6 +57,7 @@ class LoggingElasticsearchResponse implements ModelInterface, ArrayAccess, \Json 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'tls_ca_cert' => 'string', 'tls_client_cert' => 'string', @@ -88,6 +89,7 @@ class LoggingElasticsearchResponse implements ModelInterface, ArrayAccess, \Json 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'tls_ca_cert' => null, 'tls_client_cert' => null, @@ -138,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'tls_ca_cert' => 'tls_ca_cert', 'tls_client_cert' => 'tls_client_cert', @@ -167,6 +170,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'tls_ca_cert' => 'setTlsCaCert', 'tls_client_cert' => 'setTlsClientCert', @@ -196,6 +200,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'tls_ca_cert' => 'getTlsCaCert', 'tls_client_cert' => 'getTlsClientCert', @@ -258,6 +263,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -274,6 +282,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -306,6 +328,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? null; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['tls_ca_cert'] = $data['tls_ca_cert'] ?? 'null'; $this->container['tls_client_cert'] = $data['tls_client_cert'] ?? 'null'; @@ -343,6 +366,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -462,7 +494,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Elasticsearch can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Elasticsearch can ingest. * * @return self */ @@ -473,6 +505,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingFtpResponse.php b/lib/Model/LoggingFtpResponse.php index 2e4c9be5..83f7748b 100644 --- a/lib/Model/LoggingFtpResponse.php +++ b/lib/Model/LoggingFtpResponse.php @@ -57,6 +57,7 @@ class LoggingFtpResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -90,6 +91,7 @@ class LoggingFtpResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -142,6 +144,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -173,6 +176,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -204,6 +208,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -268,6 +273,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -291,6 +299,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -352,6 +374,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -391,6 +414,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -528,7 +560,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -539,6 +571,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingGcsResponse.php b/lib/Model/LoggingGcsResponse.php index 6f352298..0919a4c1 100644 --- a/lib/Model/LoggingGcsResponse.php +++ b/lib/Model/LoggingGcsResponse.php @@ -57,6 +57,7 @@ class LoggingGcsResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -89,6 +90,7 @@ class LoggingGcsResponse implements ModelInterface, ArrayAccess, \JsonSerializab 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -140,6 +142,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -170,6 +173,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -200,6 +204,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -263,6 +268,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -286,6 +294,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -347,6 +369,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -385,6 +408,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -522,7 +554,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -533,6 +565,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingGooglePubsubAdditional.php b/lib/Model/LoggingGooglePubsubAdditional.php index 8ace2af9..e5800621 100644 --- a/lib/Model/LoggingGooglePubsubAdditional.php +++ b/lib/Model/LoggingGooglePubsubAdditional.php @@ -248,7 +248,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ diff --git a/lib/Model/LoggingGooglePubsubResponse.php b/lib/Model/LoggingGooglePubsubResponse.php index b3b1006b..01a06831 100644 --- a/lib/Model/LoggingGooglePubsubResponse.php +++ b/lib/Model/LoggingGooglePubsubResponse.php @@ -57,6 +57,7 @@ class LoggingGooglePubsubResponse implements ModelInterface, ArrayAccess, \JsonS 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'user' => 'string', 'secret_key' => 'string', @@ -82,6 +83,7 @@ class LoggingGooglePubsubResponse implements ModelInterface, ArrayAccess, \JsonS 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'user' => null, 'secret_key' => null, @@ -126,6 +128,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'user' => 'user', 'secret_key' => 'secret_key', @@ -149,6 +152,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'user' => 'setUser', 'secret_key' => 'setSecretKey', @@ -172,6 +176,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'user' => 'getUser', 'secret_key' => 'getSecretKey', @@ -228,6 +233,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -244,6 +252,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -276,6 +298,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['user'] = $data['user'] ?? null; $this->container['secret_key'] = $data['secret_key'] ?? null; @@ -307,6 +330,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -426,7 +458,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -437,6 +469,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingGrafanacloudlogsAdditional.php b/lib/Model/LoggingGrafanacloudlogsAdditional.php index eb4209ba..8799aa06 100644 --- a/lib/Model/LoggingGrafanacloudlogsAdditional.php +++ b/lib/Model/LoggingGrafanacloudlogsAdditional.php @@ -236,7 +236,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ diff --git a/lib/Model/LoggingGrafanacloudlogsResponse.php b/lib/Model/LoggingGrafanacloudlogsResponse.php index 26414426..992bc4dc 100644 --- a/lib/Model/LoggingGrafanacloudlogsResponse.php +++ b/lib/Model/LoggingGrafanacloudlogsResponse.php @@ -57,6 +57,7 @@ class LoggingGrafanacloudlogsResponse implements ModelInterface, ArrayAccess, \J 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'user' => 'string', 'url' => 'string', @@ -81,6 +82,7 @@ class LoggingGrafanacloudlogsResponse implements ModelInterface, ArrayAccess, \J 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'user' => null, 'url' => null, @@ -124,6 +126,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'user' => 'user', 'url' => 'url', @@ -146,6 +149,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'user' => 'setUser', 'url' => 'setUrl', @@ -168,6 +172,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'user' => 'getUser', 'url' => 'getUrl', @@ -223,6 +228,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -239,6 +247,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -271,6 +293,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? null; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['user'] = $data['user'] ?? null; $this->container['url'] = $data['url'] ?? null; @@ -301,6 +324,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -420,7 +452,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -431,6 +463,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingHerokuResponse.php b/lib/Model/LoggingHerokuResponse.php index cc3c5642..d52be0ca 100644 --- a/lib/Model/LoggingHerokuResponse.php +++ b/lib/Model/LoggingHerokuResponse.php @@ -57,6 +57,7 @@ class LoggingHerokuResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'token' => 'string', 'url' => 'string', @@ -79,6 +80,7 @@ class LoggingHerokuResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'token' => null, 'url' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'token' => 'token', 'url' => 'url', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'token' => 'setToken', 'url' => 'setUrl', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'token' => 'getToken', 'url' => 'getUrl', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -229,6 +237,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -261,6 +283,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['token'] = $data['token'] ?? null; $this->container['url'] = $data['url'] ?? null; @@ -289,6 +312,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -408,7 +440,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -419,6 +451,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingHoneycombAdditional.php b/lib/Model/LoggingHoneycombAdditional.php index ff9a53a7..920e8c01 100644 --- a/lib/Model/LoggingHoneycombAdditional.php +++ b/lib/Model/LoggingHoneycombAdditional.php @@ -224,7 +224,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. * * @return self */ diff --git a/lib/Model/LoggingHoneycombResponse.php b/lib/Model/LoggingHoneycombResponse.php index 70e51791..04fb3034 100644 --- a/lib/Model/LoggingHoneycombResponse.php +++ b/lib/Model/LoggingHoneycombResponse.php @@ -57,6 +57,7 @@ class LoggingHoneycombResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'dataset' => 'string', 'token' => 'string', @@ -79,6 +80,7 @@ class LoggingHoneycombResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'dataset' => null, 'token' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'dataset' => 'dataset', 'token' => 'token', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'dataset' => 'setDataset', 'token' => 'setToken', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'dataset' => 'getDataset', 'token' => 'getToken', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -229,6 +237,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -261,6 +283,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? null; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['dataset'] = $data['dataset'] ?? null; $this->container['token'] = $data['token'] ?? null; @@ -289,6 +312,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -408,7 +440,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that Honeycomb can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that Honeycomb can ingest. * * @return self */ @@ -419,6 +451,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingHttpsAdditional.php b/lib/Model/LoggingHttpsAdditional.php index 3ce85019..20a976e0 100644 --- a/lib/Model/LoggingHttpsAdditional.php +++ b/lib/Model/LoggingHttpsAdditional.php @@ -552,7 +552,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ diff --git a/lib/Model/LoggingHttpsResponse.php b/lib/Model/LoggingHttpsResponse.php index ff891772..1677bc73 100644 --- a/lib/Model/LoggingHttpsResponse.php +++ b/lib/Model/LoggingHttpsResponse.php @@ -57,6 +57,7 @@ class LoggingHttpsResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'tls_ca_cert' => 'string', 'tls_client_cert' => 'string', @@ -90,6 +91,7 @@ class LoggingHttpsResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'tls_ca_cert' => null, 'tls_client_cert' => null, @@ -142,6 +144,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'tls_ca_cert' => 'tls_ca_cert', 'tls_client_cert' => 'tls_client_cert', @@ -173,6 +176,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'tls_ca_cert' => 'setTlsCaCert', 'tls_client_cert' => 'setTlsClientCert', @@ -204,6 +208,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'tls_ca_cert' => 'getTlsCaCert', 'tls_client_cert' => 'getTlsClientCert', @@ -268,6 +273,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const METHOD_POST = 'POST'; @@ -289,6 +297,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -348,6 +370,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['tls_ca_cert'] = $data['tls_ca_cert'] ?? 'null'; $this->container['tls_client_cert'] = $data['tls_client_cert'] ?? 'null'; @@ -387,6 +410,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -524,7 +556,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -535,6 +567,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingKafkaResponse.php b/lib/Model/LoggingKafkaResponse.php index 702ce21e..adc7a06a 100644 --- a/lib/Model/LoggingKafkaResponse.php +++ b/lib/Model/LoggingKafkaResponse.php @@ -57,6 +57,7 @@ class LoggingKafkaResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'tls_ca_cert' => 'string', 'tls_client_cert' => 'string', @@ -91,6 +92,7 @@ class LoggingKafkaResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'tls_ca_cert' => null, 'tls_client_cert' => null, @@ -144,6 +146,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'tls_ca_cert' => 'tls_ca_cert', 'tls_client_cert' => 'tls_client_cert', @@ -176,6 +179,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'tls_ca_cert' => 'setTlsCaCert', 'tls_client_cert' => 'setTlsClientCert', @@ -208,6 +212,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'tls_ca_cert' => 'getTlsCaCert', 'tls_client_cert' => 'getTlsClientCert', @@ -273,6 +278,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const COMPRESSION_CODEC_GZIP = 'gzip'; @@ -299,6 +307,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -374,6 +396,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['tls_ca_cert'] = $data['tls_ca_cert'] ?? 'null'; $this->container['tls_client_cert'] = $data['tls_client_cert'] ?? 'null'; @@ -414,6 +437,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -560,7 +592,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -571,6 +603,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingKafkaResponsePost.php b/lib/Model/LoggingKafkaResponsePost.php index 8524721b..f05008fe 100644 --- a/lib/Model/LoggingKafkaResponsePost.php +++ b/lib/Model/LoggingKafkaResponsePost.php @@ -57,6 +57,7 @@ class LoggingKafkaResponsePost implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'int', 'tls_ca_cert' => 'string', 'tls_client_cert' => 'string', @@ -91,6 +92,7 @@ class LoggingKafkaResponsePost implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'tls_ca_cert' => null, 'tls_client_cert' => null, @@ -144,6 +146,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'tls_ca_cert' => 'tls_ca_cert', 'tls_client_cert' => 'tls_client_cert', @@ -176,6 +179,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'tls_ca_cert' => 'setTlsCaCert', 'tls_client_cert' => 'setTlsClientCert', @@ -208,6 +212,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'tls_ca_cert' => 'getTlsCaCert', 'tls_client_cert' => 'getTlsClientCert', @@ -273,6 +278,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = 1; const FORMAT_VERSION_v2 = 2; const COMPRESSION_CODEC_GZIP = 'gzip'; @@ -299,6 +307,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -374,6 +396,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? self::FORMAT_VERSION_v2; $this->container['tls_ca_cert'] = $data['tls_ca_cert'] ?? 'null'; $this->container['tls_client_cert'] = $data['tls_client_cert'] ?? 'null'; @@ -414,6 +437,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -560,7 +592,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -571,6 +603,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingKinesisAdditional.php b/lib/Model/LoggingKinesisAdditional.php index 85fa4121..2e948c45 100644 --- a/lib/Model/LoggingKinesisAdditional.php +++ b/lib/Model/LoggingKinesisAdditional.php @@ -302,7 +302,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ diff --git a/lib/Model/LoggingKinesisResponse.php b/lib/Model/LoggingKinesisResponse.php index 54fd4f8d..2ae53ee7 100644 --- a/lib/Model/LoggingKinesisResponse.php +++ b/lib/Model/LoggingKinesisResponse.php @@ -362,7 +362,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ diff --git a/lib/Model/LoggingLogentriesResponse.php b/lib/Model/LoggingLogentriesResponse.php index 62400e99..def97a25 100644 --- a/lib/Model/LoggingLogentriesResponse.php +++ b/lib/Model/LoggingLogentriesResponse.php @@ -57,6 +57,7 @@ class LoggingLogentriesResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'port' => 'int', 'token' => 'string', @@ -81,6 +82,7 @@ class LoggingLogentriesResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'port' => null, 'token' => null, @@ -124,6 +126,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'port' => 'port', 'token' => 'token', @@ -146,6 +149,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'port' => 'setPort', 'token' => 'setToken', @@ -168,6 +172,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'port' => 'getPort', 'token' => 'getToken', @@ -223,6 +228,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const REGION_US = 'US'; @@ -246,6 +254,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -296,6 +318,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['port'] = $data['port'] ?? 20000; $this->container['token'] = $data['token'] ?? null; @@ -326,6 +349,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -454,7 +486,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -465,6 +497,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingLogglyResponse.php b/lib/Model/LoggingLogglyResponse.php index 02844707..d929cc1b 100644 --- a/lib/Model/LoggingLogglyResponse.php +++ b/lib/Model/LoggingLogglyResponse.php @@ -57,6 +57,7 @@ class LoggingLogglyResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'token' => 'string', 'created_at' => '\DateTime', @@ -78,6 +79,7 @@ class LoggingLogglyResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'token' => null, 'created_at' => 'date-time', @@ -118,6 +120,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'token' => 'token', 'created_at' => 'created_at', @@ -137,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'token' => 'setToken', 'created_at' => 'setCreatedAt', @@ -156,6 +160,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'token' => 'getToken', 'created_at' => 'getCreatedAt', @@ -208,6 +213,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -224,6 +232,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -256,6 +278,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['token'] = $data['token'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; @@ -283,6 +306,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -402,7 +434,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -413,6 +445,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingLogshuttleResponse.php b/lib/Model/LoggingLogshuttleResponse.php index dffe5b72..d0079f4f 100644 --- a/lib/Model/LoggingLogshuttleResponse.php +++ b/lib/Model/LoggingLogshuttleResponse.php @@ -57,6 +57,7 @@ class LoggingLogshuttleResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'token' => 'string', 'url' => 'string', @@ -79,6 +80,7 @@ class LoggingLogshuttleResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'token' => null, 'url' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'token' => 'token', 'url' => 'url', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'token' => 'setToken', 'url' => 'setUrl', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'token' => 'getToken', 'url' => 'getUrl', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -229,6 +237,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -261,6 +283,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['token'] = $data['token'] ?? null; $this->container['url'] = $data['url'] ?? null; @@ -289,6 +312,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -408,7 +440,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -419,6 +451,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingNewrelicAdditional.php b/lib/Model/LoggingNewrelicAdditional.php index a70bac38..15db147d 100644 --- a/lib/Model/LoggingNewrelicAdditional.php +++ b/lib/Model/LoggingNewrelicAdditional.php @@ -248,7 +248,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. * * @return self */ diff --git a/lib/Model/LoggingNewrelicResponse.php b/lib/Model/LoggingNewrelicResponse.php index fe096da0..0146fadc 100644 --- a/lib/Model/LoggingNewrelicResponse.php +++ b/lib/Model/LoggingNewrelicResponse.php @@ -57,6 +57,7 @@ class LoggingNewrelicResponse implements ModelInterface, ArrayAccess, \JsonSeria 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'token' => 'string', 'region' => 'string', @@ -79,6 +80,7 @@ class LoggingNewrelicResponse implements ModelInterface, ArrayAccess, \JsonSeria 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'token' => null, 'region' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'token' => 'token', 'region' => 'region', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'token' => 'setToken', 'region' => 'setRegion', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'token' => 'getToken', 'region' => 'getRegion', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const REGION_US = 'US'; @@ -231,6 +239,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -276,6 +298,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['token'] = $data['token'] ?? null; $this->container['region'] = $data['region'] ?? 'US'; @@ -304,6 +327,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -432,7 +464,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest. + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). Must produce valid JSON that New Relic Logs can ingest. * * @return self */ @@ -443,6 +475,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingNewrelicotlpAdditional.php b/lib/Model/LoggingNewrelicotlpAdditional.php index 87379259..cc040e19 100644 --- a/lib/Model/LoggingNewrelicotlpAdditional.php +++ b/lib/Model/LoggingNewrelicotlpAdditional.php @@ -254,7 +254,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ diff --git a/lib/Model/LoggingNewrelicotlpResponse.php b/lib/Model/LoggingNewrelicotlpResponse.php index 9cbfb9e1..afb4f5f6 100644 --- a/lib/Model/LoggingNewrelicotlpResponse.php +++ b/lib/Model/LoggingNewrelicotlpResponse.php @@ -57,6 +57,7 @@ class LoggingNewrelicotlpResponse implements ModelInterface, ArrayAccess, \JsonS 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'token' => 'string', 'region' => 'string', @@ -80,6 +81,7 @@ class LoggingNewrelicotlpResponse implements ModelInterface, ArrayAccess, \JsonS 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'token' => null, 'region' => null, @@ -122,6 +124,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'token' => 'token', 'region' => 'region', @@ -143,6 +146,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'token' => 'setToken', 'region' => 'setRegion', @@ -164,6 +168,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'token' => 'getToken', 'region' => 'getRegion', @@ -218,6 +223,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const REGION_US = 'US'; @@ -236,6 +244,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -281,6 +303,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%S}t","time_elapsed":"%{time.elapsed.usec}V","is_tls":"%{if(req.is_ssl, \"true\", \"false\")}V","client_ip":"%{req.http.Fastly-Client-IP}V","geo_city":"%{client.geo.city}V","geo_country_code":"%{client.geo.country_code}V","request":"%{req.request}V","host":"%{req.http.Fastly-Orig-Host}V","url":"%{json.escape(req.url)}V","request_referer":"%{json.escape(req.http.Referer)}V","request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_accept_language":"%{json.escape(req.http.Accept-Language)}V","request_accept_charset":"%{json.escape(req.http.Accept-Charset)}V","cache_status":"%{regsub(fastly_info.state, \"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\", \"\\2\\3\") }V"}'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['token'] = $data['token'] ?? null; $this->container['region'] = $data['region'] ?? 'US'; @@ -310,6 +333,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -438,7 +470,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -449,6 +481,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingOpenstackResponse.php b/lib/Model/LoggingOpenstackResponse.php index 7c750af4..904c23cf 100644 --- a/lib/Model/LoggingOpenstackResponse.php +++ b/lib/Model/LoggingOpenstackResponse.php @@ -57,6 +57,7 @@ class LoggingOpenstackResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -88,6 +89,7 @@ class LoggingOpenstackResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -138,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -167,6 +170,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -196,6 +200,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -258,6 +263,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -281,6 +289,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -342,6 +364,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -379,6 +402,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -516,7 +548,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -527,6 +559,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingPapertrailResponse.php b/lib/Model/LoggingPapertrailResponse.php index dd8cfd21..f8ed3a9d 100644 --- a/lib/Model/LoggingPapertrailResponse.php +++ b/lib/Model/LoggingPapertrailResponse.php @@ -57,6 +57,7 @@ class LoggingPapertrailResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'address' => 'string', 'port' => 'int', @@ -79,6 +80,7 @@ class LoggingPapertrailResponse implements ModelInterface, ArrayAccess, \JsonSer 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'address' => null, 'port' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'address' => 'address', 'port' => 'port', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'address' => 'setAddress', 'port' => 'setPort', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'address' => 'getAddress', 'port' => 'getPort', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -229,6 +237,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -261,6 +283,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['address'] = $data['address'] ?? null; $this->container['port'] = $data['port'] ?? 514; @@ -289,6 +312,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -408,7 +440,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -419,6 +451,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingS3Response.php b/lib/Model/LoggingS3Response.php index 11ef4480..d9f21be1 100644 --- a/lib/Model/LoggingS3Response.php +++ b/lib/Model/LoggingS3Response.php @@ -57,6 +57,7 @@ class LoggingS3Response implements ModelInterface, ArrayAccess, \JsonSerializabl 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -94,6 +95,7 @@ class LoggingS3Response implements ModelInterface, ArrayAccess, \JsonSerializabl 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -150,6 +152,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -185,6 +188,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -220,6 +224,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -288,6 +293,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -311,6 +319,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -372,6 +394,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -415,6 +438,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -556,7 +588,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -567,6 +599,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingScalyrResponse.php b/lib/Model/LoggingScalyrResponse.php index 98004000..244086af 100644 --- a/lib/Model/LoggingScalyrResponse.php +++ b/lib/Model/LoggingScalyrResponse.php @@ -57,6 +57,7 @@ class LoggingScalyrResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'region' => 'string', 'token' => 'string', @@ -80,6 +81,7 @@ class LoggingScalyrResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'region' => null, 'token' => null, @@ -122,6 +124,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'region' => 'region', 'token' => 'token', @@ -143,6 +146,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'region' => 'setRegion', 'token' => 'setToken', @@ -164,6 +168,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'region' => 'getRegion', 'token' => 'getToken', @@ -218,6 +223,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const REGION_US = 'US'; @@ -236,6 +244,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -281,6 +303,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['region'] = $data['region'] ?? 'US'; $this->container['token'] = $data['token'] ?? null; @@ -310,6 +333,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -438,7 +470,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -449,6 +481,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingSftpResponse.php b/lib/Model/LoggingSftpResponse.php index 75f451d7..4ad5ae0a 100644 --- a/lib/Model/LoggingSftpResponse.php +++ b/lib/Model/LoggingSftpResponse.php @@ -57,6 +57,7 @@ class LoggingSftpResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => 'string', 'timestamp_format' => 'string', @@ -90,6 +91,7 @@ class LoggingSftpResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'timestamp_format' => null, @@ -142,6 +144,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'timestamp_format' => 'timestamp_format', @@ -173,6 +176,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'timestamp_format' => 'setTimestampFormat', @@ -204,6 +208,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'timestamp_format' => 'getTimestampFormat', @@ -268,6 +273,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; const MESSAGE_TYPE_CLASSIC = 'classic'; @@ -291,6 +299,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -352,6 +374,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? 'classic'; $this->container['timestamp_format'] = $data['timestamp_format'] ?? null; @@ -391,6 +414,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -528,7 +560,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -539,6 +571,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingSplunkResponse.php b/lib/Model/LoggingSplunkResponse.php index 3a298675..6baa4571 100644 --- a/lib/Model/LoggingSplunkResponse.php +++ b/lib/Model/LoggingSplunkResponse.php @@ -57,6 +57,7 @@ class LoggingSplunkResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'tls_ca_cert' => 'string', 'tls_client_cert' => 'string', @@ -86,6 +87,7 @@ class LoggingSplunkResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'tls_ca_cert' => null, 'tls_client_cert' => null, @@ -134,6 +136,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'tls_ca_cert' => 'tls_ca_cert', 'tls_client_cert' => 'tls_client_cert', @@ -161,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'tls_ca_cert' => 'setTlsCaCert', 'tls_client_cert' => 'setTlsClientCert', @@ -188,6 +192,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'tls_ca_cert' => 'getTlsCaCert', 'tls_client_cert' => 'getTlsClientCert', @@ -248,6 +253,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -264,6 +272,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -296,6 +318,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['tls_ca_cert'] = $data['tls_ca_cert'] ?? 'null'; $this->container['tls_client_cert'] = $data['tls_client_cert'] ?? 'null'; @@ -331,6 +354,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -450,7 +482,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -461,6 +493,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingSumologicResponse.php b/lib/Model/LoggingSumologicResponse.php index cf0dba82..08d5b5b8 100644 --- a/lib/Model/LoggingSumologicResponse.php +++ b/lib/Model/LoggingSumologicResponse.php @@ -57,6 +57,7 @@ class LoggingSumologicResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'message_type' => '\Fastly\Model\LoggingMessageType', 'url' => 'string', @@ -79,6 +80,7 @@ class LoggingSumologicResponse implements ModelInterface, ArrayAccess, \JsonSeri 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'message_type' => null, 'url' => null, @@ -120,6 +122,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'message_type' => 'message_type', 'url' => 'url', @@ -140,6 +143,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'message_type' => 'setMessageType', 'url' => 'setUrl', @@ -160,6 +164,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'message_type' => 'getMessageType', 'url' => 'getUrl', @@ -213,6 +218,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -229,6 +237,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -261,6 +283,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['message_type'] = $data['message_type'] ?? null; $this->container['url'] = $data['url'] ?? null; @@ -289,6 +312,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -408,7 +440,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -419,6 +451,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/LoggingSyslogResponse.php b/lib/Model/LoggingSyslogResponse.php index 0fc56378..183565dc 100644 --- a/lib/Model/LoggingSyslogResponse.php +++ b/lib/Model/LoggingSyslogResponse.php @@ -57,6 +57,7 @@ class LoggingSyslogResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => 'string', 'response_condition' => 'string', 'format' => 'string', + 'log_processing_region' => 'string', 'format_version' => 'string', 'tls_ca_cert' => 'string', 'tls_client_cert' => 'string', @@ -88,6 +89,7 @@ class LoggingSyslogResponse implements ModelInterface, ArrayAccess, \JsonSeriali 'placement' => null, 'response_condition' => null, 'format' => null, + 'log_processing_region' => null, 'format_version' => null, 'tls_ca_cert' => null, 'tls_client_cert' => null, @@ -138,6 +140,7 @@ public static function fastlyFormats() 'placement' => 'placement', 'response_condition' => 'response_condition', 'format' => 'format', + 'log_processing_region' => 'log_processing_region', 'format_version' => 'format_version', 'tls_ca_cert' => 'tls_ca_cert', 'tls_client_cert' => 'tls_client_cert', @@ -167,6 +170,7 @@ public static function fastlyFormats() 'placement' => 'setPlacement', 'response_condition' => 'setResponseCondition', 'format' => 'setFormat', + 'log_processing_region' => 'setLogProcessingRegion', 'format_version' => 'setFormatVersion', 'tls_ca_cert' => 'setTlsCaCert', 'tls_client_cert' => 'setTlsClientCert', @@ -196,6 +200,7 @@ public static function fastlyFormats() 'placement' => 'getPlacement', 'response_condition' => 'getResponseCondition', 'format' => 'getFormat', + 'log_processing_region' => 'getLogProcessingRegion', 'format_version' => 'getFormatVersion', 'tls_ca_cert' => 'getTlsCaCert', 'tls_client_cert' => 'getTlsClientCert', @@ -258,6 +263,9 @@ public function getModelName() const PLACEMENT_NONE = 'none'; const PLACEMENT_NULL = 'null'; + const LOG_PROCESSING_REGION_NONE = 'none'; + const LOG_PROCESSING_REGION_EU = 'eu'; + const LOG_PROCESSING_REGION_US = 'us'; const FORMAT_VERSION_v1 = '1'; const FORMAT_VERSION_v2 = '2'; @@ -274,6 +282,20 @@ public function getPlacementAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getLogProcessingRegionAllowableValues() + { + return [ + self::LOG_PROCESSING_REGION_NONE, + self::LOG_PROCESSING_REGION_EU, + self::LOG_PROCESSING_REGION_US, + ]; + } + /** * Gets allowable values of the enum * @@ -306,6 +328,7 @@ public function __construct(array $data = null) $this->container['placement'] = $data['placement'] ?? null; $this->container['response_condition'] = $data['response_condition'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['log_processing_region'] = $data['log_processing_region'] ?? 'none'; $this->container['format_version'] = $data['format_version'] ?? '2'; $this->container['tls_ca_cert'] = $data['tls_ca_cert'] ?? 'null'; $this->container['tls_client_cert'] = $data['tls_client_cert'] ?? 'null'; @@ -343,6 +366,15 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($this->container['log_processing_region']) && !in_array($this->container['log_processing_region'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'log_processing_region', must be one of '%s'", + $this->container['log_processing_region'], + implode("', '", $allowedValues) + ); + } + $allowedValues = $this->getFormatVersionAllowableValues(); if (!is_null($this->container['format_version']) && !in_array($this->container['format_version'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -462,7 +494,7 @@ public function getFormat() /** * Sets format * - * @param string|null $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). + * @param string|null $format A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). * * @return self */ @@ -473,6 +505,40 @@ public function setFormat($format) return $this; } + /** + * Gets log_processing_region + * + * @return string|null + */ + public function getLogProcessingRegion() + { + return $this->container['log_processing_region']; + } + + /** + * Sets log_processing_region + * + * @param string|null $log_processing_region The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global. + * + * @return self + */ + public function setLogProcessingRegion($log_processing_region) + { + $allowedValues = $this->getLogProcessingRegionAllowableValues(); + if (!is_null($log_processing_region) && !in_array($log_processing_region, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'log_processing_region', must be one of '%s'", + $log_processing_region, + implode("', '", $allowedValues) + ) + ); + } + $this->container['log_processing_region'] = $log_processing_region; + + return $this; + } + /** * Gets format_version * diff --git a/lib/Model/PoolAdditional.php b/lib/Model/PoolAdditional.php index 169ca460..d43d8aad 100644 --- a/lib/Model/PoolAdditional.php +++ b/lib/Model/PoolAdditional.php @@ -548,7 +548,7 @@ public function getOverrideHost() /** * Sets override_host * - * @param string|null $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. + * @param string|null $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. * * @return self */ diff --git a/lib/Model/PoolResponse.php b/lib/Model/PoolResponse.php index 9106fbd5..bae93c52 100644 --- a/lib/Model/PoolResponse.php +++ b/lib/Model/PoolResponse.php @@ -924,7 +924,7 @@ public function getOverrideHost() /** * Sets override_host * - * @param string|null $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. + * @param string|null $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. * * @return self */ diff --git a/lib/Model/PoolResponsePost.php b/lib/Model/PoolResponsePost.php index e3b308f4..2cf636e9 100644 --- a/lib/Model/PoolResponsePost.php +++ b/lib/Model/PoolResponsePost.php @@ -924,7 +924,7 @@ public function getOverrideHost() /** * Sets override_host * - * @param string|null $override_host The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. + * @param string|null $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. * * @return self */ diff --git a/lib/Model/TlsCertificateDataAttributes.php b/lib/Model/TlsCertificateDataAttributes.php index ac41b7ea..0acb8118 100644 --- a/lib/Model/TlsCertificateDataAttributes.php +++ b/lib/Model/TlsCertificateDataAttributes.php @@ -54,7 +54,8 @@ class TlsCertificateDataAttributes implements ModelInterface, ArrayAccess, \Json */ protected static $fastlyTypes = [ 'cert_blob' => 'string', - 'name' => 'string' + 'name' => 'string', + 'allow_untrusted_root' => 'bool' ]; /** @@ -66,7 +67,8 @@ class TlsCertificateDataAttributes implements ModelInterface, ArrayAccess, \Json */ protected static $fastlyFormats = [ 'cert_blob' => null, - 'name' => null + 'name' => null, + 'allow_untrusted_root' => null ]; /** @@ -97,7 +99,8 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'cert_blob' => 'cert_blob', - 'name' => 'name' + 'name' => 'name', + 'allow_untrusted_root' => 'allow_untrusted_root' ]; /** @@ -107,7 +110,8 @@ public static function fastlyFormats() */ protected static $setters = [ 'cert_blob' => 'setCertBlob', - 'name' => 'setName' + 'name' => 'setName', + 'allow_untrusted_root' => 'setAllowUntrustedRoot' ]; /** @@ -117,7 +121,8 @@ public static function fastlyFormats() */ protected static $getters = [ 'cert_blob' => 'getCertBlob', - 'name' => 'getName' + 'name' => 'getName', + 'allow_untrusted_root' => 'getAllowUntrustedRoot' ]; /** @@ -179,6 +184,7 @@ public function __construct(array $data = null) { $this->container['cert_blob'] = $data['cert_blob'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['allow_untrusted_root'] = $data['allow_untrusted_root'] ?? null; } /** @@ -252,6 +258,30 @@ public function setName($name) return $this; } + + /** + * Gets allow_untrusted_root + * + * @return bool|null + */ + public function getAllowUntrustedRoot() + { + return $this->container['allow_untrusted_root']; + } + + /** + * Sets allow_untrusted_root + * + * @param bool|null $allow_untrusted_root Indicates that the supplied certificate was not signed by a trusted CA. + * + * @return self + */ + public function setAllowUntrustedRoot($allow_untrusted_root) + { + $this->container['allow_untrusted_root'] = $allow_untrusted_root; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TlsCsrData.php b/lib/Model/TlsCsrData.php index 567d8c68..cae9b38e 100644 --- a/lib/Model/TlsCsrData.php +++ b/lib/Model/TlsCsrData.php @@ -54,8 +54,7 @@ class TlsCsrData implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyTypes = [ 'type' => '\Fastly\Model\TypeTlsCsr', - 'attributes' => '\Fastly\Model\TlsCsrDataAttributes', - 'relationships' => '\Fastly\Model\RelationshipTlsPrivateKey' + 'attributes' => '\Fastly\Model\TlsCsrDataAttributes' ]; /** @@ -67,8 +66,7 @@ class TlsCsrData implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'type' => null, - 'attributes' => null, - 'relationships' => null + 'attributes' => null ]; /** @@ -99,8 +97,7 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'type' => 'type', - 'attributes' => 'attributes', - 'relationships' => 'relationships' + 'attributes' => 'attributes' ]; /** @@ -110,8 +107,7 @@ public static function fastlyFormats() */ protected static $setters = [ 'type' => 'setType', - 'attributes' => 'setAttributes', - 'relationships' => 'setRelationships' + 'attributes' => 'setAttributes' ]; /** @@ -121,8 +117,7 @@ public static function fastlyFormats() */ protected static $getters = [ 'type' => 'getType', - 'attributes' => 'getAttributes', - 'relationships' => 'getRelationships' + 'attributes' => 'getAttributes' ]; /** @@ -184,7 +179,6 @@ public function __construct(array $data = null) { $this->container['type'] = $data['type'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; - $this->container['relationships'] = $data['relationships'] ?? null; } /** @@ -258,30 +252,6 @@ public function setAttributes($attributes) return $this; } - - /** - * Gets relationships - * - * @return \Fastly\Model\RelationshipTlsPrivateKey|null - */ - public function getRelationships() - { - return $this->container['relationships']; - } - - /** - * Sets relationships - * - * @param \Fastly\Model\RelationshipTlsPrivateKey|null $relationships relationships - * - * @return self - */ - public function setRelationships($relationships) - { - $this->container['relationships'] = $relationships; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TlsCsrDataAttributes.php b/lib/Model/TlsCsrDataAttributes.php index e5d8d034..1dd6ddfb 100644 --- a/lib/Model/TlsCsrDataAttributes.php +++ b/lib/Model/TlsCsrDataAttributes.php @@ -63,7 +63,8 @@ class TlsCsrDataAttributes implements ModelInterface, ArrayAccess, \JsonSerializ 'organization' => 'string', 'organizational_unit' => 'string', 'email' => 'string', - 'key_type' => 'string' + 'key_type' => 'string', + 'relationships_tls_private_key_id' => 'string' ]; /** @@ -84,7 +85,8 @@ class TlsCsrDataAttributes implements ModelInterface, ArrayAccess, \JsonSerializ 'organization' => null, 'organizational_unit' => null, 'email' => 'email', - 'key_type' => null + 'key_type' => null, + 'relationships_tls_private_key_id' => null ]; /** @@ -124,7 +126,8 @@ public static function fastlyFormats() 'organization' => 'organization', 'organizational_unit' => 'organizational_unit', 'email' => 'email', - 'key_type' => 'key_type' + 'key_type' => 'key_type', + 'relationships_tls_private_key_id' => 'relationships.tls_private_key.id' ]; /** @@ -143,7 +146,8 @@ public static function fastlyFormats() 'organization' => 'setOrganization', 'organizational_unit' => 'setOrganizationalUnit', 'email' => 'setEmail', - 'key_type' => 'setKeyType' + 'key_type' => 'setKeyType', + 'relationships_tls_private_key_id' => 'setRelationshipsTlsPrivateKeyId' ]; /** @@ -162,7 +166,8 @@ public static function fastlyFormats() 'organization' => 'getOrganization', 'organizational_unit' => 'getOrganizationalUnit', 'email' => 'getEmail', - 'key_type' => 'getKeyType' + 'key_type' => 'getKeyType', + 'relationships_tls_private_key_id' => 'getRelationshipsTlsPrivateKeyId' ]; /** @@ -248,6 +253,7 @@ public function __construct(array $data = null) $this->container['organizational_unit'] = $data['organizational_unit'] ?? null; $this->container['email'] = $data['email'] ?? null; $this->container['key_type'] = $data['key_type'] ?? null; + $this->container['relationships_tls_private_key_id'] = $data['relationships_tls_private_key_id'] ?? null; } /** @@ -559,6 +565,30 @@ public function setKeyType($key_type) return $this; } + + /** + * Gets relationships_tls_private_key_id + * + * @return string|null + */ + public function getRelationshipsTlsPrivateKeyId() + { + return $this->container['relationships_tls_private_key_id']; + } + + /** + * Sets relationships_tls_private_key_id + * + * @param string|null $relationships_tls_private_key_id Optional. An alphanumeric string identifying the private key you've uploaded for use with your TLS certificate. If left blank, Fastly will create and manage a key for you. + * + * @return self + */ + public function setRelationshipsTlsPrivateKeyId($relationships_tls_private_key_id) + { + $this->container['relationships_tls_private_key_id'] = $relationships_tls_private_key_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/sig.json b/sig.json index 48c02df4..05e32a55 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "bb3cb969", "D": "cabf600c"} +{"G": "bb3cb969", "D": "6e6e26c6"} From 69849b5d8bc7dfa0199ed48e6305f02149260b26 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 29 Aug 2025 05:41:10 +0000 Subject: [PATCH 6/8] Generated v11.0.0 --- CHANGELOG.md | 25 + README.md | 18 +- docs/Api/BackendApi.md | 32 +- docs/Api/DdosProtectionApi.md | 37 + docs/Api/HistoricalApi.md | 2 + docs/Api/KvStoreApi.md | 2 + docs/Api/LogExplorerApi.md | 2 +- docs/Api/NgwafReportsApi.md | 96 ++ docs/Api/ObservabilityTimeseriesApi.md | 67 ++ docs/Api/ObservabilityTimeseriesForLogsApi.md | 67 -- docs/Api/PoolApi.md | 8 +- docs/Api/TlsSubscriptionsApi.md | 4 +- docs/Model/AttackReport.md | 19 + docs/Model/AttackSignal.md | 12 + docs/Model/AttackSource.md | 13 + docs/Model/Backend.md | 8 +- docs/Model/BackendResponse.md | 8 +- docs/Model/DdosProtectionAttributeStats.md | 2 +- docs/Model/DdosProtectionInvalidRequest.md | 13 + ...bute.md => DdosProtectionNotAuthorized.md} | 4 +- docs/Model/DdosProtectionRule.md | 2 +- docs/Model/DdosProtectionRuleAllOf.md | 2 +- docs/Model/DdosProtectionRulePatch.md | 10 + ...onseMetaFilters.md => ListAttackReport.md} | 5 +- ...ctionAction.md => ListAttackReportMeta.md} | 3 +- ...esultDimensions.md => ListSignalReport.md} | 4 +- docs/Model/LogTimeseriesFilterFieldItem.md | 12 - docs/Model/LogTimeseriesGetResponse.md | 11 - docs/Model/LogTimeseriesGetResponseMeta.md | 14 - docs/Model/LogTimeseriesResult.md | 11 - docs/Model/LogTimeseriesValueField.md | 9 - docs/Model/PoolResponse.md | 2 +- docs/Model/PoolResponseCommon.md | 2 +- docs/Model/PoolResponsePost.md | 2 +- docs/Model/SignalReport.md | 13 + docs/Model/TimeseriesGetResponse.md | 11 + docs/Model/TimeseriesMeta.md | 13 + docs/Model/TimeseriesResult.md | 11 + docs/Model/TopWorkspace.md | 12 + lib/Api/BackendApi.php | 92 +- lib/Api/DdosProtectionApi.php | 414 ++++++++ lib/Api/HistoricalApi.php | 13 + lib/Api/KvStoreApi.php | 17 + lib/Api/NgwafReportsApi.php | 991 ++++++++++++++++++ ...Api.php => ObservabilityTimeseriesApi.php} | 148 ++- lib/Api/PoolApi.php | 20 +- lib/Api/TlsSubscriptionsApi.php | 13 - lib/Configuration.php | 4 +- lib/Model/AttackReport.php | 614 +++++++++++ lib/Model/AttackSignal.php | 383 +++++++ lib/Model/AttackSource.php | 416 ++++++++ lib/Model/Backend.php | 8 +- lib/Model/BackendResponse.php | 8 +- lib/Model/DdosProtectionAction.php | 63 -- lib/Model/DdosProtectionAttributeStats.php | 6 +- ...m.php => DdosProtectionInvalidRequest.php} | 173 +-- lib/Model/DdosProtectionNotAuthorized.php | 376 +++++++ lib/Model/DdosProtectionRule.php | 8 +- lib/Model/DdosProtectionRuleAllOf.php | 8 +- ...ilters.php => DdosProtectionRulePatch.php} | 37 +- lib/Model/DdosProtectionTrafficAttribute.php | 72 -- ...esGetResponse.php => ListAttackReport.php} | 20 +- ...alueField.php => ListAttackReportMeta.php} | 44 +- ...ultDimensions.php => ListSignalReport.php} | 36 +- lib/Model/PoolResponse.php | 2 +- lib/Model/PoolResponseCommon.php | 2 +- lib/Model/PoolResponsePost.php | 2 +- lib/Model/SignalReport.php | 404 +++++++ lib/Model/TimeseriesGetResponse.php | 344 ++++++ ...GetResponseMeta.php => TimeseriesMeta.php} | 118 +-- ...eseriesResult.php => TimeseriesResult.php} | 16 +- lib/Model/TopWorkspace.php | 375 +++++++ sig.json | 2 +- 73 files changed, 5150 insertions(+), 687 deletions(-) create mode 100644 docs/Api/NgwafReportsApi.md create mode 100644 docs/Api/ObservabilityTimeseriesApi.md delete mode 100644 docs/Api/ObservabilityTimeseriesForLogsApi.md create mode 100644 docs/Model/AttackReport.md create mode 100644 docs/Model/AttackSignal.md create mode 100644 docs/Model/AttackSource.md create mode 100644 docs/Model/DdosProtectionInvalidRequest.md rename docs/Model/{DdosProtectionTrafficAttribute.md => DdosProtectionNotAuthorized.md} (61%) create mode 100644 docs/Model/DdosProtectionRulePatch.md rename docs/Model/{LogTimeseriesGetResponseMetaFilters.md => ListAttackReport.md} (50%) rename docs/Model/{DdosProtectionAction.md => ListAttackReportMeta.md} (64%) rename docs/Model/{LogTimeseriesResultDimensions.md => ListSignalReport.md} (66%) delete mode 100644 docs/Model/LogTimeseriesFilterFieldItem.md delete mode 100644 docs/Model/LogTimeseriesGetResponse.md delete mode 100644 docs/Model/LogTimeseriesGetResponseMeta.md delete mode 100644 docs/Model/LogTimeseriesResult.md delete mode 100644 docs/Model/LogTimeseriesValueField.md create mode 100644 docs/Model/SignalReport.md create mode 100644 docs/Model/TimeseriesGetResponse.md create mode 100644 docs/Model/TimeseriesMeta.md create mode 100644 docs/Model/TimeseriesResult.md create mode 100644 docs/Model/TopWorkspace.md create mode 100644 lib/Api/NgwafReportsApi.php rename lib/Api/{ObservabilityTimeseriesForLogsApi.php => ObservabilityTimeseriesApi.php} (80%) create mode 100644 lib/Model/AttackReport.php create mode 100644 lib/Model/AttackSignal.php create mode 100644 lib/Model/AttackSource.php delete mode 100644 lib/Model/DdosProtectionAction.php rename lib/Model/{LogTimeseriesFilterFieldItem.php => DdosProtectionInvalidRequest.php} (65%) create mode 100644 lib/Model/DdosProtectionNotAuthorized.php rename lib/Model/{LogTimeseriesGetResponseMetaFilters.php => DdosProtectionRulePatch.php} (84%) delete mode 100644 lib/Model/DdosProtectionTrafficAttribute.php rename lib/Model/{LogTimeseriesGetResponse.php => ListAttackReport.php} (91%) rename lib/Model/{LogTimeseriesValueField.php => ListAttackReportMeta.php} (86%) rename lib/Model/{LogTimeseriesResultDimensions.php => ListSignalReport.php} (89%) create mode 100644 lib/Model/SignalReport.php create mode 100644 lib/Model/TimeseriesGetResponse.php rename lib/Model/{LogTimeseriesGetResponseMeta.php => TimeseriesMeta.php} (73%) rename lib/Model/{LogTimeseriesResult.php => TimeseriesResult.php} (93%) create mode 100644 lib/Model/TopWorkspace.php diff --git a/CHANGELOG.md b/CHANGELOG.md index bf6feb2b..8d6c4b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## [v11.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v11.0.0) (2025-08-28) + +**Breaking Changes:** + +- removed(ddos_protection): Remove enum configs `ddos_protection_action` and ``ddos_protection_traffic_attribute`. +- changed(backend): Added default values to `tcp_keepalive_interval`, `tcp_keepalive_probes`, and `tcp_keepalive_time` properties. +- removed(tls_subscriptions): Remove `force` parameter from TLS subscriptions. + + +**Enhancements:** + +- feat(ngwaf_reports): Add Get attacks report endpoint. +- feat(kv_store): Add `name` parameter to the List KV stores endpoint. +- feat(historical): Add `services` parameter to the Historical Stats API endpoint. +- feat(ddos_protection): Add PATCH endpoint in the Fastly DDoS Protection Events API allowing customers to update the DDoS rules action to `log`, `block`, `default`, or `off`. +- feat(observability_timeseries): Add Observability Timeseries API for data visualized in the Sustainability dashboard. + + +**Documentation:** + +- doc(backend, pool): Describe difference in behavior of `between_bytes_timeout` between + Deliver and Compute services. +- doc(ddos_protection): Update GET API docs describing that they can be accessed by any user role as long as the service belongs to the customer. + + ## [v10.1.0](https://github.com/fastly/fastly-php/releases/tag/release/v10.1.0) (2025-07-07) **Bug fixes:** diff --git a/README.md b/README.md index 36413976..511a5ff1 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,7 @@ Class | Method | Description [*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionEventList**](docs/Api/DdosProtectionApi.md#ddosprotectioneventlist) | Get events [*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionEventRuleList**](docs/Api/DdosProtectionApi.md#ddosprotectioneventrulelist) | Get all rules for an event [*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionRuleGet**](docs/Api/DdosProtectionApi.md#ddosprotectionruleget) | Get a rule by ID +[*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionRulePatch**](docs/Api/DdosProtectionApi.md#ddosprotectionrulepatch) | Update rule [*DdosProtectionApi*](docs/Api/DdosProtectionApi.md) | [**ddosProtectionTrafficStatsRuleGet**](docs/Api/DdosProtectionApi.md#ddosprotectiontrafficstatsruleget) | Get traffic stats for a rule [*DictionaryApi*](docs/Api/DictionaryApi.md) | [**createDictionary**](docs/Api/DictionaryApi.md#createdictionary) | Create a dictionary [*DictionaryApi*](docs/Api/DictionaryApi.md) | [**deleteDictionary**](docs/Api/DictionaryApi.md#deletedictionary) | Delete a dictionary @@ -421,6 +422,8 @@ Class | Method | Description [*MutualAuthenticationApi*](docs/Api/MutualAuthenticationApi.md) | [**getMutualAuthentication**](docs/Api/MutualAuthenticationApi.md#getmutualauthentication) | Get a Mutual Authentication [*MutualAuthenticationApi*](docs/Api/MutualAuthenticationApi.md) | [**listMutualAuthentications**](docs/Api/MutualAuthenticationApi.md#listmutualauthentications) | List Mutual Authentications [*MutualAuthenticationApi*](docs/Api/MutualAuthenticationApi.md) | [**patchMutualAuthentication**](docs/Api/MutualAuthenticationApi.md#patchmutualauthentication) | Update a Mutual Authentication +[*NgwafReportsApi*](docs/Api/NgwafReportsApi.md) | [**getAttacksReport**](docs/Api/NgwafReportsApi.md#getattacksreport) | Get attacks report +[*NgwafReportsApi*](docs/Api/NgwafReportsApi.md) | [**getSignalsReport**](docs/Api/NgwafReportsApi.md#getsignalsreport) | Get signals report [*ObjectStorageAccessKeysApi*](docs/Api/ObjectStorageAccessKeysApi.md) | [**createAccessKey**](docs/Api/ObjectStorageAccessKeysApi.md#createaccesskey) | Create an access key [*ObjectStorageAccessKeysApi*](docs/Api/ObjectStorageAccessKeysApi.md) | [**deleteAccessKey**](docs/Api/ObjectStorageAccessKeysApi.md#deleteaccesskey) | Delete an access key [*ObjectStorageAccessKeysApi*](docs/Api/ObjectStorageAccessKeysApi.md) | [**getAccessKey**](docs/Api/ObjectStorageAccessKeysApi.md#getaccesskey) | Get an access key @@ -431,7 +434,7 @@ Class | Method | Description [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**getDashboard**](docs/Api/ObservabilityCustomDashboardsApi.md#getdashboard) | Retrieve a dashboard by ID [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**listDashboards**](docs/Api/ObservabilityCustomDashboardsApi.md#listdashboards) | List all custom dashboards [*ObservabilityCustomDashboardsApi*](docs/Api/ObservabilityCustomDashboardsApi.md) | [**updateDashboard**](docs/Api/ObservabilityCustomDashboardsApi.md#updatedashboard) | Update an existing dashboard -[*ObservabilityTimeseriesForLogsApi*](docs/Api/ObservabilityTimeseriesForLogsApi.md) | [**logTimeseriesGet**](docs/Api/ObservabilityTimeseriesForLogsApi.md#logtimeseriesget) | Retrieve log data as time series +[*ObservabilityTimeseriesApi*](docs/Api/ObservabilityTimeseriesApi.md) | [**timeseriesGet**](docs/Api/ObservabilityTimeseriesApi.md#timeseriesget) | Retrieve observability data as a time series [*OriginInspectorHistoricalApi*](docs/Api/OriginInspectorHistoricalApi.md) | [**getOriginInspectorHistorical**](docs/Api/OriginInspectorHistoricalApi.md#getorigininspectorhistorical) | Get historical origin data for a service [*OriginInspectorRealtimeApi*](docs/Api/OriginInspectorRealtimeApi.md) | [**getOriginInspectorLast120Seconds**](docs/Api/OriginInspectorRealtimeApi.md#getorigininspectorlast120seconds) | Get real-time origin data for the last 120 seconds [*OriginInspectorRealtimeApi*](docs/Api/OriginInspectorRealtimeApi.md) | [**getOriginInspectorLastMaxEntries**](docs/Api/OriginInspectorRealtimeApi.md#getorigininspectorlastmaxentries) | Get a limited number of real-time origin data entries @@ -656,10 +659,17 @@ The fastly-php API client currently does not support the following endpoints: - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) - [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/domain-management/v1/domains/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) +- [`/domain-management/v1/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/domains/v1/tools/status`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/domains/v1/tools/suggest`](https://www.fastly.com/documentation/reference/api/) (GET) -- [`/domains/v1/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) -- [`/domains/v1`](https://www.fastly.com/documentation/reference/api/) (GET, POST) +- [`/ngwaf/v1/lists/{listId}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (DELETE, GET, PATCH) +- [`/ngwaf/v1/lists`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (GET, POST) +- [`/ngwaf/v1/signals/{signal_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/signals) (DELETE, GET, PATCH) +- [`/ngwaf/v1/signals`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/signals) (GET, POST) +- [`/ngwaf/v1/timeseries`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/timeseries) (GET) +- [`/ngwaf/v1/workspaces/{workspaceId}/lists/{listId}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (DELETE, GET, PATCH) +- [`/ngwaf/v1/workspaces/{workspaceId}/lists`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (GET, POST) - [`/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}/signing-key`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (GET, POST) - [`/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (DELETE, GET, PATCH) - [`/ngwaf/v1/workspaces/{workspace_id}/alerts`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (GET, POST) @@ -682,6 +692,8 @@ The fastly-php API client currently does not support the following endpoints: - [`/notifications/integrations/{integration_id}`](https://developer.fastly.com/reference/api/observability/notification) (DELETE, GET, PATCH) - [`/notifications/integrations`](https://developer.fastly.com/reference/api/observability/notification) (GET, POST) - [`/notifications/mailinglist-confirmations`](https://developer.fastly.com/reference/api/observability/notification) (POST) +- [`/observability/timeseries`](https://www.fastly.com/documentation/reference/api/observability/timeseries/logs/) (GET) +- [`/observability/timeseries`](https://www.fastly.com/documentation/reference/api/observability/timeseries/sustainability/) (GET) - [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) - [`/security/workspaces/{workspace_id}/events/{event_id}`](https://www.fastly.com/documentation/reference/api/security/events) (GET, PATCH) - [`/security/workspaces/{workspace_id}/events`](https://www.fastly.com/documentation/reference/api/security/events) (GET) diff --git a/docs/Api/BackendApi.md b/docs/Api/BackendApi.md index d63a41ef..77c68b50 100644 --- a/docs/Api/BackendApi.md +++ b/docs/Api/BackendApi.md @@ -38,7 +38,7 @@ Create a backend for a particular service and version. $options['version_id'] = 56; // int | Integer identifying a service version. $options['address'] = 'address_example'; // string | A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. $options['auto_loadbalance'] = True; // bool | Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. -$options['between_bytes_timeout'] = 56; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. +$options['between_bytes_timeout'] = 56; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. $options['client_cert'] = 'client_cert_example'; // string | Unused. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['connect_timeout'] = 56; // int | Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. @@ -67,9 +67,9 @@ $options['ssl_client_key'] = 'ssl_client_key_example'; // string | Client key at $options['ssl_hostname'] = 'ssl_hostname_example'; // string | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. $options['ssl_sni_hostname'] = 'ssl_sni_hostname_example'; // string | Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. $options['tcp_keepalive_enable'] = True; // bool | Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. -$options['tcp_keepalive_interval'] = 56; // int | Interval in seconds between subsequent keepalive probes. -$options['tcp_keepalive_probes'] = 56; // int | Number of unacknowledged probes to send before considering the connection dead. -$options['tcp_keepalive_time'] = 56; // int | Interval in seconds between the last data packet sent and the first keepalive probe. +$options['tcp_keepalive_interval'] = 10; // int | Interval in seconds between subsequent keepalive probes. +$options['tcp_keepalive_probes'] = 3; // int | Number of unacknowledged probes to send before considering the connection dead. +$options['tcp_keepalive_time'] = 300; // int | Interval in seconds between the last data packet sent and the first keepalive probe. $options['use_ssl'] = True; // bool | Whether or not to require TLS for connections to this backend. $options['weight'] = 56; // int | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. @@ -90,7 +90,7 @@ Name | Type | Description | Notes **version_id** | **int** | Integer identifying a service version. | **address** | **string** | A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. | [optional] **auto_loadbalance** | **bool** | Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. | [optional] -**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **client_cert** | **string** | Unused. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **connect_timeout** | **int** | Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. | [optional] @@ -119,9 +119,9 @@ Name | Type | Description | Notes **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] **ssl_sni_hostname** | **string** | Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. | [optional] **tcp_keepalive_enable** | **bool** | Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. | [optional] -**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] -**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] -**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] +**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] [defaults to 10] +**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] [defaults to 3] +**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] [defaults to 300] **use_ssl** | **bool** | Whether or not to require TLS for connections to this backend. | [optional] **weight** | **int** | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. | [optional] @@ -259,7 +259,7 @@ $options['version_id'] = 56; // int | Integer identifying a service version. $options['backend_name'] = 'backend_name_example'; // string | The name of the backend. $options['address'] = 'address_example'; // string | A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. $options['auto_loadbalance'] = True; // bool | Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. -$options['between_bytes_timeout'] = 56; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. +$options['between_bytes_timeout'] = 56; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. $options['client_cert'] = 'client_cert_example'; // string | Unused. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['connect_timeout'] = 56; // int | Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. @@ -288,9 +288,9 @@ $options['ssl_client_key'] = 'ssl_client_key_example'; // string | Client key at $options['ssl_hostname'] = 'ssl_hostname_example'; // string | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. $options['ssl_sni_hostname'] = 'ssl_sni_hostname_example'; // string | Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. $options['tcp_keepalive_enable'] = True; // bool | Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. -$options['tcp_keepalive_interval'] = 56; // int | Interval in seconds between subsequent keepalive probes. -$options['tcp_keepalive_probes'] = 56; // int | Number of unacknowledged probes to send before considering the connection dead. -$options['tcp_keepalive_time'] = 56; // int | Interval in seconds between the last data packet sent and the first keepalive probe. +$options['tcp_keepalive_interval'] = 10; // int | Interval in seconds between subsequent keepalive probes. +$options['tcp_keepalive_probes'] = 3; // int | Number of unacknowledged probes to send before considering the connection dead. +$options['tcp_keepalive_time'] = 300; // int | Interval in seconds between the last data packet sent and the first keepalive probe. $options['use_ssl'] = True; // bool | Whether or not to require TLS for connections to this backend. $options['weight'] = 56; // int | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. @@ -312,7 +312,7 @@ Name | Type | Description | Notes **backend_name** | **string** | The name of the backend. | **address** | **string** | A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. | [optional] **auto_loadbalance** | **bool** | Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. | [optional] -**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **client_cert** | **string** | Unused. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **connect_timeout** | **int** | Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. | [optional] @@ -341,9 +341,9 @@ Name | Type | Description | Notes **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] **ssl_sni_hostname** | **string** | Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. | [optional] **tcp_keepalive_enable** | **bool** | Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. | [optional] -**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] -**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] -**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] +**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] [defaults to 10] +**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] [defaults to 3] +**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] [defaults to 300] **use_ssl** | **bool** | Whether or not to require TLS for connections to this backend. | [optional] **weight** | **int** | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. | [optional] diff --git a/docs/Api/DdosProtectionApi.md b/docs/Api/DdosProtectionApi.md index 76c8ed68..aba009d3 100644 --- a/docs/Api/DdosProtectionApi.md +++ b/docs/Api/DdosProtectionApi.md @@ -21,6 +21,7 @@ Method | HTTP request | Description [**ddosProtectionEventList()**](DdosProtectionApi.md#ddosProtectionEventList) | **GET** /ddos-protection/v1/events | Get events [**ddosProtectionEventRuleList()**](DdosProtectionApi.md#ddosProtectionEventRuleList) | **GET** /ddos-protection/v1/events/{event_id}/rules | Get all rules for an event [**ddosProtectionRuleGet()**](DdosProtectionApi.md#ddosProtectionRuleGet) | **GET** /ddos-protection/v1/rules/{rule_id} | Get a rule by ID +[**ddosProtectionRulePatch()**](DdosProtectionApi.md#ddosProtectionRulePatch) | **PATCH** /ddos-protection/v1/rules/{rule_id} | Update rule [**ddosProtectionTrafficStatsRuleGet()**](DdosProtectionApi.md#ddosProtectionTrafficStatsRuleGet) | **GET** /ddos-protection/v1/events/{event_id}/rules/{rule_id}/traffic-stats | Get traffic stats for a rule @@ -174,6 +175,42 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) +## `ddosProtectionRulePatch()` + +```php +ddosProtectionRulePatch($options): \Fastly\Model\DdosProtectionRule // Update rule +``` + +Update rule. + +### Example +```php + $options['rule_id'] = 'rule_id_example'; // string | Unique ID of the rule. +$options['ddos_protection_rule_patch'] = new \Fastly\Model\DdosProtectionRulePatch(); // \Fastly\Model\DdosProtectionRulePatch + +try { + $result = $apiInstance->ddosProtectionRulePatch($options); +} catch (Exception $e) { + echo 'Exception when calling DdosProtectionApi->ddosProtectionRulePatch: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**rule_id** | **string** | Unique ID of the rule. | +**ddos_protection_rule_patch** | [**\Fastly\Model\DdosProtectionRulePatch**](../Model/DdosProtectionRulePatch.md) | | [optional] + +### Return type + +[**\Fastly\Model\DdosProtectionRule**](../Model/DdosProtectionRule.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + ## `ddosProtectionTrafficStatsRuleGet()` ```php diff --git a/docs/Api/HistoricalApi.md b/docs/Api/HistoricalApi.md index a9f8aa87..4d91bb60 100644 --- a/docs/Api/HistoricalApi.md +++ b/docs/Api/HistoricalApi.md @@ -42,6 +42,7 @@ Fetches historical stats for each of your Fastly services and groups the results $options['to'] = 2020-04-09T18:14:30Z; // string | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. $options['by'] = day; // string | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. $options['region'] = usa; // string | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. +$options['services'] = 'services_example'; // string | Limit the query to only the specified, comma-separated list of services. try { $result = $apiInstance->getHistStats($options); @@ -60,6 +61,7 @@ Name | Type | Description | Notes **to** | **string** | Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. | [optional] [defaults to 'now'] **by** | **string** | Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. | [optional] [one of: 'hour', 'minute', 'day'] [defaults to 'day'] **region** | **string** | Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'mexico', 'southamerica_std'] +**services** | **string** | Limit the query to only the specified, comma-separated list of services. | [optional] ### Return type diff --git a/docs/Api/KvStoreApi.md b/docs/Api/KvStoreApi.md index 960574c3..5c9f6823 100644 --- a/docs/Api/KvStoreApi.md +++ b/docs/Api/KvStoreApi.md @@ -139,6 +139,7 @@ List all KV stores. ```php $options['cursor'] = 'cursor_example'; // string $options['limit'] = 1000; // int +$options['name'] = 'name_example'; // string | Returns a one-element array containing the details for the named KV store. try { $result = $apiInstance->kvStoreList($options); @@ -155,6 +156,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **cursor** | **string** | | [optional] **limit** | **int** | | [optional] [defaults to 1000] +**name** | **string** | Returns a one-element array containing the details for the named KV store. | [optional] ### Return type diff --git a/docs/Api/LogExplorerApi.md b/docs/Api/LogExplorerApi.md index efbccc76..273e3c1a 100644 --- a/docs/Api/LogExplorerApi.md +++ b/docs/Api/LogExplorerApi.md @@ -30,7 +30,7 @@ Retrieves log records. ### Example ```php - $options['service_id'] = 'service_id_example'; // string + $options['service_id'] = 1jlmtMz1ncwA0KC3TBGD0X; // string $options['start'] = 'start_example'; // string $options['end'] = 'end_example'; // string $options['limit'] = 3.4; // float diff --git a/docs/Api/NgwafReportsApi.md b/docs/Api/NgwafReportsApi.md new file mode 100644 index 00000000..b1e4db2b --- /dev/null +++ b/docs/Api/NgwafReportsApi.md @@ -0,0 +1,96 @@ +# Fastly\Api\NgwafReportsApi + + +```php +$apiInstance = new Fastly\Api\NgwafReportsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**getAttacksReport()**](NgwafReportsApi.md#getAttacksReport) | **GET** /ngwaf/v1/reports/attacks | Get attacks report +[**getSignalsReport()**](NgwafReportsApi.md#getSignalsReport) | **GET** /ngwaf/v1/reports/signals | Get signals report + + +## `getAttacksReport()` + +```php +getAttacksReport($options): \Fastly\Model\ListAttackReport // Get attacks report +``` + +Get attacks report + +### Example +```php + $options['from'] = 2019-08-20T18:07:33Z; // \DateTime | The start of a time range in RFC 3339 format. +$options['to'] = 2019-08-21T18:07:33Z; // \DateTime | The end of a time range in RFC 3339 format. Defaults to the current time. + +try { + $result = $apiInstance->getAttacksReport($options); +} catch (Exception $e) { + echo 'Exception when calling NgwafReportsApi->getAttacksReport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**from** | **\DateTime** | The start of a time range in RFC 3339 format. | +**to** | **\DateTime** | The end of a time range in RFC 3339 format. Defaults to the current time. | [optional] + +### Return type + +[**\Fastly\Model\ListAttackReport**](../Model/ListAttackReport.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getSignalsReport()` + +```php +getSignalsReport($options): \Fastly\Model\ListSignalReport // Get signals report +``` + +Get signals report + +### Example +```php + $options['from'] = 2019-08-20T18:07:33Z; // \DateTime | The start of a time range in RFC 3339 format. +$options['to'] = 2019-08-21T18:07:33Z; // \DateTime | The end of a time range in RFC 3339 format. Defaults to the current time. +$options['signal_type'] = all; // string | The type of signal + +try { + $result = $apiInstance->getSignalsReport($options); +} catch (Exception $e) { + echo 'Exception when calling NgwafReportsApi->getSignalsReport: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**from** | **\DateTime** | The start of a time range in RFC 3339 format. | +**to** | **\DateTime** | The end of a time range in RFC 3339 format. Defaults to the current time. | [optional] +**signal_type** | **string** | The type of signal | [optional] [one of: 'account', 'anomaly', 'attack', 'bot', 'all'] + +### Return type + +[**\Fastly\Model\ListSignalReport**](../Model/ListSignalReport.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ObservabilityTimeseriesApi.md b/docs/Api/ObservabilityTimeseriesApi.md new file mode 100644 index 00000000..90d9d810 --- /dev/null +++ b/docs/Api/ObservabilityTimeseriesApi.md @@ -0,0 +1,67 @@ +# Fastly\Api\ObservabilityTimeseriesApi + + +```php +$apiInstance = new Fastly\Api\ObservabilityTimeseriesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**timeseriesGet()**](ObservabilityTimeseriesApi.md#timeseriesGet) | **GET** /observability/timeseries | Retrieve observability data as a time series + + +## `timeseriesGet()` + +```php +timeseriesGet($options): \Fastly\Model\TimeseriesGetResponse // Retrieve observability data as a time series +``` + +Retrieves observability data as a time series. + +### Example +```php + $options['source'] = logs; // string +$options['from'] = 2024-01-03T16:00:00Z; // string +$options['to'] = 2024-01-03T18:00:00Z; // string +$options['granularity'] = hour; // string +$options['dimensions'] = 'dimensions_example'; // string +$options['filter'] = filter[response_status]=200; // string +$options['series'] = avg[response_time],p99[response_time]; // string + +try { + $result = $apiInstance->timeseriesGet($options); +} catch (Exception $e) { + echo 'Exception when calling ObservabilityTimeseriesApi->timeseriesGet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**source** | **string** | | [one of: 'logs', 'sustainability'] +**from** | **string** | | +**to** | **string** | | +**granularity** | **string** | | +**dimensions** | **string** | | [optional] +**filter** | **string** | | [optional] +**series** | **string** | | + +### Return type + +[**\Fastly\Model\TimeseriesGetResponse**](../Model/TimeseriesGetResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/ObservabilityTimeseriesForLogsApi.md b/docs/Api/ObservabilityTimeseriesForLogsApi.md deleted file mode 100644 index 56406435..00000000 --- a/docs/Api/ObservabilityTimeseriesForLogsApi.md +++ /dev/null @@ -1,67 +0,0 @@ -# Fastly\Api\ObservabilityTimeseriesForLogsApi - - -```php -$apiInstance = new Fastly\Api\ObservabilityTimeseriesForLogsApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -``` - -## Methods - -> [!NOTE] -> All URIs are relative to `https://api.fastly.com` - -Method | HTTP request | Description ------- | ------------ | ----------- -[**logTimeseriesGet()**](ObservabilityTimeseriesForLogsApi.md#logTimeseriesGet) | **GET** /observability/timeseries | Retrieve log data as time series - - -## `logTimeseriesGet()` - -```php -logTimeseriesGet($options): \Fastly\Model\LogTimeseriesGetResponse // Retrieve log data as time series -``` - -Retrieves log data as time series. - -### Example -```php - $options['source'] = 'source_example'; // string -$options['service_id'] = 'service_id_example'; // string -$options['start'] = 'start_example'; // string -$options['end'] = 'end_example'; // string -$options['granularity'] = 'granularity_example'; // string -$options['filter'] = 'filter_example'; // string -$options['series'] = 'series_example'; // string - -try { - $result = $apiInstance->logTimeseriesGet($options); -} catch (Exception $e) { - echo 'Exception when calling ObservabilityTimeseriesForLogsApi->logTimeseriesGet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**source** | **string** | | -**service_id** | **string** | | -**start** | **string** | | -**end** | **string** | | -**granularity** | **string** | | [one of: 'second', 'minute', 'hour', 'day'] -**filter** | **string** | | [optional] -**series** | **string** | | - -### Return type - -[**\Fastly\Model\LogTimeseriesGetResponse**](../Model/LogTimeseriesGetResponse.md) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) diff --git a/docs/Api/PoolApi.md b/docs/Api/PoolApi.md index 3b64a6e3..14b793b0 100644 --- a/docs/Api/PoolApi.md +++ b/docs/Api/PoolApi.md @@ -57,7 +57,7 @@ $options['healthcheck'] = 'healthcheck_example'; // string | Name of the healthc $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['type'] = 'type_example'; // string | What type of load balance group to use. $options['override_host'] = 'null'; // string | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. -$options['between_bytes_timeout'] = 10000; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. +$options['between_bytes_timeout'] = 10000; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. $options['connect_timeout'] = 56; // int | How long to wait for a timeout in milliseconds. Optional. $options['first_byte_timeout'] = 56; // int | How long to wait for the first byte in milliseconds. Optional. $options['max_conn_default'] = 200; // int | Maximum number of connections. Optional. @@ -100,7 +100,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] **override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] -**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] [defaults to 10000] +**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] [defaults to 10000] **connect_timeout** | **int** | How long to wait for a timeout in milliseconds. Optional. | [optional] **first_byte_timeout** | **int** | How long to wait for the first byte in milliseconds. Optional. | [optional] **max_conn_default** | **int** | Maximum number of connections. Optional. | [optional] [defaults to 200] @@ -260,7 +260,7 @@ $options['healthcheck'] = 'healthcheck_example'; // string | Name of the healthc $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['type'] = 'type_example'; // string | What type of load balance group to use. $options['override_host'] = 'null'; // string | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. -$options['between_bytes_timeout'] = 10000; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. +$options['between_bytes_timeout'] = 10000; // int | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. $options['connect_timeout'] = 56; // int | How long to wait for a timeout in milliseconds. Optional. $options['first_byte_timeout'] = 56; // int | How long to wait for the first byte in milliseconds. Optional. $options['max_conn_default'] = 200; // int | Maximum number of connections. Optional. @@ -304,7 +304,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] **override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] -**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] [defaults to 10000] +**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] [defaults to 10000] **connect_timeout** | **int** | How long to wait for a timeout in milliseconds. Optional. | [optional] **first_byte_timeout** | **int** | How long to wait for the first byte in milliseconds. Optional. | [optional] **max_conn_default** | **int** | Maximum number of connections. Optional. | [optional] [defaults to 200] diff --git a/docs/Api/TlsSubscriptionsApi.md b/docs/Api/TlsSubscriptionsApi.md index 3ac6c420..df9563e0 100644 --- a/docs/Api/TlsSubscriptionsApi.md +++ b/docs/Api/TlsSubscriptionsApi.md @@ -74,8 +74,7 @@ Create a new TLS subscription. This response includes a list of possible challen ### Example ```php - $options['force'] = true; // bool | A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. -$options['tls_subscription'] = {"data":{"type":"tls_subscription","attributes":{"certificate_authority":"certainly"},"relationships":{"tls_domains":{"data":[{"type":"tls_domain","id":"DOMAIN_NAME"}]},"tls_configuration":{"data":{"type":"tls_configuration","id":"t7CguUGZzb2W9Euo5FoKa"}}}}}; // \Fastly\Model\TlsSubscription + $options['tls_subscription'] = {"data":{"type":"tls_subscription","attributes":{"certificate_authority":"certainly"},"relationships":{"tls_domains":{"data":[{"type":"tls_domain","id":"DOMAIN_NAME"}]},"tls_configuration":{"data":{"type":"tls_configuration","id":"t7CguUGZzb2W9Euo5FoKa"}}}}}; // \Fastly\Model\TlsSubscription try { $result = $apiInstance->createTlsSub($options); @@ -90,7 +89,6 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**force** | **bool** | A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. | [optional] **tls_subscription** | [**\Fastly\Model\TlsSubscription**](../Model/TlsSubscription.md) | | [optional] ### Return type diff --git a/docs/Model/AttackReport.md b/docs/Model/AttackReport.md new file mode 100644 index 00000000..e05749c9 --- /dev/null +++ b/docs/Model/AttackReport.md @@ -0,0 +1,19 @@ +# # AttackReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the workspace. | +**name** | **string** | Name of the workspace. | +**total_count** | **int** | Total request count | +**blocked_count** | **int** | Blocked request count | +**flagged_count** | **int** | Flagged request count | +**attack_count** | **int** | Attack request count | +**all_flagged_ip_count** | **int** | Count of IPs that have been flagged | +**flagged_ip_count** | **int** | Count of currently flagged IPs | +**top_attack_signals** | [**\Fastly\Model\AttackSignal[]**](AttackSignal.md) | | +**top_attack_sources** | [**\Fastly\Model\AttackSource[]**](AttackSource.md) | | + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttackSignal.md b/docs/Model/AttackSignal.md new file mode 100644 index 00000000..3d200397 --- /dev/null +++ b/docs/Model/AttackSignal.md @@ -0,0 +1,12 @@ +# # AttackSignal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tag_name** | **string** | Name of the attack signal tag | +**tag_count** | **int** | Count of requests with this attack signal | +**total_count** | **int** | Total number of attacks considered | + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AttackSource.md b/docs/Model/AttackSource.md new file mode 100644 index 00000000..387ea913 --- /dev/null +++ b/docs/Model/AttackSource.md @@ -0,0 +1,13 @@ +# # AttackSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_code** | **string** | Country code of the attack source | +**country_name** | **string** | Name of the country | +**request_count** | **int** | Number of requests from this country | +**total_count** | **int** | Total number of attacks considered | + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Backend.md b/docs/Model/Backend.md index 9be08451..e73fedf9 100644 --- a/docs/Model/Backend.md +++ b/docs/Model/Backend.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **string** | A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. | [optional] **auto_loadbalance** | **bool** | Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. | [optional] -**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **client_cert** | **string** | Unused. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **connect_timeout** | **int** | Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. | [optional] @@ -35,9 +35,9 @@ Name | Type | Description | Notes **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] **ssl_sni_hostname** | **string** | Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. | [optional] **tcp_keepalive_enable** | **bool** | Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. | [optional] -**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] -**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] -**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] +**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] [defaults to 10] +**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] [defaults to 3] +**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] [defaults to 300] **use_ssl** | **bool** | Whether or not to require TLS for connections to this backend. | [optional] **weight** | **int** | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. | [optional] diff --git a/docs/Model/BackendResponse.md b/docs/Model/BackendResponse.md index cb535fa5..1c31dd81 100644 --- a/docs/Model/BackendResponse.md +++ b/docs/Model/BackendResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **string** | A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. | [optional] **auto_loadbalance** | **bool** | Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. | [optional] -**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **int** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **client_cert** | **string** | Unused. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **connect_timeout** | **int** | Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. | [optional] @@ -35,9 +35,9 @@ Name | Type | Description | Notes **ssl_hostname** | **string** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] **ssl_sni_hostname** | **string** | Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. | [optional] **tcp_keepalive_enable** | **bool** | Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. | [optional] -**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] -**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] -**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] +**tcp_keepalive_interval** | **int** | Interval in seconds between subsequent keepalive probes. | [optional] [defaults to 10] +**tcp_keepalive_probes** | **int** | Number of unacknowledged probes to send before considering the connection dead. | [optional] [defaults to 3] +**tcp_keepalive_time** | **int** | Interval in seconds between the last data packet sent and the first keepalive probe. | [optional] [defaults to 300] **use_ssl** | **bool** | Whether or not to require TLS for connections to this backend. | [optional] **weight** | **int** | Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. | [optional] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/DdosProtectionAttributeStats.md b/docs/Model/DdosProtectionAttributeStats.md index e5badbda..003c04e6 100644 --- a/docs/Model/DdosProtectionAttributeStats.md +++ b/docs/Model/DdosProtectionAttributeStats.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | [**\Fastly\Model\DdosProtectionTrafficAttribute**](DdosProtectionTrafficAttribute.md) | | [optional] +**name** | **string** | Name of an attribute type used in traffic stats. Currently, supported values are source_ip, country_code, host, asn, source_ip_prefix, user_agent, method_path. | [optional] **values** | [**\Fastly\Model\DdosProtectionAttributeValue[]**](DdosProtectionAttributeValue.md) | Values for traffic attribute. | [optional] diff --git a/docs/Model/DdosProtectionInvalidRequest.md b/docs/Model/DdosProtectionInvalidRequest.md new file mode 100644 index 00000000..7a15c186 --- /dev/null +++ b/docs/Model/DdosProtectionInvalidRequest.md @@ -0,0 +1,13 @@ +# # DdosProtectionInvalidRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | | +**status** | **int** | | [one of: 400] +**detail** | **string** | | +**errors** | [**\Fastly\Model\DdosProtectionErrorErrors[]**](DdosProtectionErrorErrors.md) | | + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionTrafficAttribute.md b/docs/Model/DdosProtectionNotAuthorized.md similarity index 61% rename from docs/Model/DdosProtectionTrafficAttribute.md rename to docs/Model/DdosProtectionNotAuthorized.md index 1f929842..bcb618d5 100644 --- a/docs/Model/DdosProtectionTrafficAttribute.md +++ b/docs/Model/DdosProtectionNotAuthorized.md @@ -1,9 +1,11 @@ -# # DdosProtectionTrafficAttribute +# # DdosProtectionNotAuthorized ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**title** | **string** | | [optional] +**status** | **int** | | [optional] [one of: 403] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionRule.md b/docs/Model/DdosProtectionRule.md index 8a8889fb..d6f6a94a 100644 --- a/docs/Model/DdosProtectionRule.md +++ b/docs/Model/DdosProtectionRule.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **id** | **string** | Unique ID of the rule. | [optional] **name** | **string** | A human-readable name for the rule. | [optional] -**action** | [**\Fastly\Model\DdosProtectionAction**](DdosProtectionAction.md) | | [optional] +**action** | **string** | Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. | [optional] [defaults to 'default'] **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **service_id** | **string** | Alphanumeric string identifying the service. | [optional] **source_ip** | **string** | Source IP address attribute. | [optional] diff --git a/docs/Model/DdosProtectionRuleAllOf.md b/docs/Model/DdosProtectionRuleAllOf.md index d0a76c5f..9d05380e 100644 --- a/docs/Model/DdosProtectionRuleAllOf.md +++ b/docs/Model/DdosProtectionRuleAllOf.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | Unique ID of the rule. | [optional] **name** | **string** | A human-readable name for the rule. | [optional] -**action** | [**\Fastly\Model\DdosProtectionAction**](DdosProtectionAction.md) | | [optional] +**action** | **string** | Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. | [optional] [defaults to 'default'] **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **service_id** | **string** | Alphanumeric string identifying the service. | [optional] **source_ip** | **string** | Source IP address attribute. | [optional] diff --git a/docs/Model/DdosProtectionRulePatch.md b/docs/Model/DdosProtectionRulePatch.md new file mode 100644 index 00000000..254abf7f --- /dev/null +++ b/docs/Model/DdosProtectionRulePatch.md @@ -0,0 +1,10 @@ +# # DdosProtectionRulePatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **string** | Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. | [optional] [defaults to 'default'] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesGetResponseMetaFilters.md b/docs/Model/ListAttackReport.md similarity index 50% rename from docs/Model/LogTimeseriesGetResponseMetaFilters.md rename to docs/Model/ListAttackReport.md index d33b0486..d83a5b38 100644 --- a/docs/Model/LogTimeseriesGetResponseMetaFilters.md +++ b/docs/Model/ListAttackReport.md @@ -1,10 +1,11 @@ -# # LogTimeseriesGetResponseMetaFilters +# # ListAttackReport ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**filter_fields** | [**\Fastly\Model\LogTimeseriesFilterFieldItem[]**](LogTimeseriesFilterFieldItem.md) | | [optional] +**data** | [**\Fastly\Model\AttackReport[]**](AttackReport.md) | | [optional] +**meta** | [**\Fastly\Model\ListAttackReportMeta**](ListAttackReportMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionAction.md b/docs/Model/ListAttackReportMeta.md similarity index 64% rename from docs/Model/DdosProtectionAction.md rename to docs/Model/ListAttackReportMeta.md index dc44c175..97a3cd5e 100644 --- a/docs/Model/DdosProtectionAction.md +++ b/docs/Model/ListAttackReportMeta.md @@ -1,9 +1,10 @@ -# # DdosProtectionAction +# # ListAttackReportMeta ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**total** | **int** | The count of attack reports matching the filter. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesResultDimensions.md b/docs/Model/ListSignalReport.md similarity index 66% rename from docs/Model/LogTimeseriesResultDimensions.md rename to docs/Model/ListSignalReport.md index 51db9fb4..3703e589 100644 --- a/docs/Model/LogTimeseriesResultDimensions.md +++ b/docs/Model/ListSignalReport.md @@ -1,10 +1,10 @@ -# # LogTimeseriesResultDimensions +# # ListSignalReport ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **string** | | [optional] +**data** | [**\Fastly\Model\SignalReport[]**](SignalReport.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesFilterFieldItem.md b/docs/Model/LogTimeseriesFilterFieldItem.md deleted file mode 100644 index 4f7e0eb9..00000000 --- a/docs/Model/LogTimeseriesFilterFieldItem.md +++ /dev/null @@ -1,12 +0,0 @@ -# # LogTimeseriesFilterFieldItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**field** | **string** | The log field to which this filter should be applied. | [optional] -**operator** | **string** | The comparison operator used for this filter. | [optional] [one of: 'eq', 'ends-with', 'in', 'not_in', 'gt', 'gte', 'lt', 'lte'] -**value** | [**\Fastly\Model\LogTimeseriesValueField**](LogTimeseriesValueField.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesGetResponse.md b/docs/Model/LogTimeseriesGetResponse.md deleted file mode 100644 index d84013c0..00000000 --- a/docs/Model/LogTimeseriesGetResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# # LogTimeseriesGetResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\LogTimeseriesResult[]**](LogTimeseriesResult.md) | | [optional] -**meta** | [**\Fastly\Model\LogTimeseriesGetResponseMeta**](LogTimeseriesGetResponseMeta.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesGetResponseMeta.md b/docs/Model/LogTimeseriesGetResponseMeta.md deleted file mode 100644 index fdef07de..00000000 --- a/docs/Model/LogTimeseriesGetResponseMeta.md +++ /dev/null @@ -1,14 +0,0 @@ -# # LogTimeseriesGetResponseMeta - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**service_id** | **string** | ID of the service for which data was returned. | [optional] -**start** | **string** | Start time for the query as supplied in the request. | [optional] -**end** | **string** | End time for the query as supplied in the request. | [optional] -**granularity** | **string** | The granularity of the time buckets in the response. | [optional] -**filters** | [**\Fastly\Model\LogTimeseriesGetResponseMetaFilters**](LogTimeseriesGetResponseMetaFilters.md) | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesResult.md b/docs/Model/LogTimeseriesResult.md deleted file mode 100644 index fd33d8e8..00000000 --- a/docs/Model/LogTimeseriesResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# # LogTimeseriesResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dimensions** | [**\Fastly\Model\LogTimeseriesResultDimensions**](LogTimeseriesResultDimensions.md) | | [optional] -**values** | **array<string,object>** | | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LogTimeseriesValueField.md b/docs/Model/LogTimeseriesValueField.md deleted file mode 100644 index 26ff50a7..00000000 --- a/docs/Model/LogTimeseriesValueField.md +++ /dev/null @@ -1,9 +0,0 @@ -# # LogTimeseriesValueField - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PoolResponse.md b/docs/Model/PoolResponse.md index 81765427..f4772630 100644 --- a/docs/Model/PoolResponse.md +++ b/docs/Model/PoolResponse.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] **override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] -**between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **connect_timeout** | **string** | How long to wait for a timeout in milliseconds. | [optional] **first_byte_timeout** | **string** | How long to wait for the first byte in milliseconds. | [optional] **max_conn_default** | **string** | Maximum number of connections. | [optional] [defaults to '200'] diff --git a/docs/Model/PoolResponseCommon.md b/docs/Model/PoolResponseCommon.md index 7889f2d4..40998aa6 100644 --- a/docs/Model/PoolResponseCommon.md +++ b/docs/Model/PoolResponseCommon.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **connect_timeout** | **string** | How long to wait for a timeout in milliseconds. | [optional] **first_byte_timeout** | **string** | How long to wait for the first byte in milliseconds. | [optional] **max_conn_default** | **string** | Maximum number of connections. | [optional] [defaults to '200'] diff --git a/docs/Model/PoolResponsePost.md b/docs/Model/PoolResponsePost.md index ab7affc8..331b7283 100644 --- a/docs/Model/PoolResponsePost.md +++ b/docs/Model/PoolResponsePost.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **comment** | **string** | A freeform descriptive note. | [optional] **type** | **string** | What type of load balance group to use. | [optional] [one of: 'random', 'hash', 'client'] **override_host** | **string** | The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. | [optional] [defaults to 'null'] -**between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] +**between_bytes_timeout** | **string** | Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. | [optional] **connect_timeout** | **string** | How long to wait for a timeout in milliseconds. | [optional] **first_byte_timeout** | **string** | How long to wait for the first byte in milliseconds. | [optional] **max_conn_default** | **string** | Maximum number of connections. | [optional] [defaults to '200'] diff --git a/docs/Model/SignalReport.md b/docs/Model/SignalReport.md new file mode 100644 index 00000000..e80a66f1 --- /dev/null +++ b/docs/Model/SignalReport.md @@ -0,0 +1,13 @@ +# # SignalReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the attack type. | [optional] +**display_name** | **string** | Display name of the attack type. | [optional] +**count** | **int** | Total count of attacks of this type. | [optional] +**top_workspaces** | [**\Fastly\Model\TopWorkspace[]**](TopWorkspace.md) | Top workspaces affected by this attack type. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeseriesGetResponse.md b/docs/Model/TimeseriesGetResponse.md new file mode 100644 index 00000000..645f8ef0 --- /dev/null +++ b/docs/Model/TimeseriesGetResponse.md @@ -0,0 +1,11 @@ +# # TimeseriesGetResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\TimeseriesResult[]**](TimeseriesResult.md) | | [optional] +**meta** | [**\Fastly\Model\TimeseriesMeta**](TimeseriesMeta.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeseriesMeta.md b/docs/Model/TimeseriesMeta.md new file mode 100644 index 00000000..a16191a0 --- /dev/null +++ b/docs/Model/TimeseriesMeta.md @@ -0,0 +1,13 @@ +# # TimeseriesMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | Start time for the query as supplied in the request. | [optional] +**to** | **string** | End time for the query as supplied in the request. | [optional] +**granularity** | **string** | The granularity of the time buckets in the response. | [optional] +**limit** | **string** | Maximum number of results returned in the request. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TimeseriesResult.md b/docs/Model/TimeseriesResult.md new file mode 100644 index 00000000..168a250d --- /dev/null +++ b/docs/Model/TimeseriesResult.md @@ -0,0 +1,11 @@ +# # TimeseriesResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | **array<string,object>** | An object containing each requested dimension and time as properties. | [optional] +**values** | **array<string,object>** | An object containing each requested series as a property. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TopWorkspace.md b/docs/Model/TopWorkspace.md new file mode 100644 index 00000000..56c90584 --- /dev/null +++ b/docs/Model/TopWorkspace.md @@ -0,0 +1,12 @@ +# # TopWorkspace + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | ID of the workspace. | [optional] +**name** | **string** | Name of the workspace. | [optional] +**count** | **int** | Count of attacks on this workspace for the specific attack type. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/BackendApi.php b/lib/Api/BackendApi.php index 43458734..af2bb6cd 100644 --- a/lib/Api/BackendApi.php +++ b/lib/Api/BackendApi.php @@ -123,7 +123,7 @@ public function getConfig() * @param int $version_id Integer identifying a service version. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -152,9 +152,9 @@ public function getConfig() * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -182,7 +182,7 @@ public function createBackend($options) * @param int $version_id Integer identifying a service version. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -211,9 +211,9 @@ public function createBackend($options) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -329,7 +329,7 @@ public function createBackendWithHttpInfo($options) * @param int $version_id Integer identifying a service version. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -358,9 +358,9 @@ public function createBackendWithHttpInfo($options) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -391,7 +391,7 @@ function ($response) { * @param int $version_id Integer identifying a service version. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -420,9 +420,9 @@ function ($response) { * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -479,7 +479,7 @@ function ($exception) { * @param int $version_id Integer identifying a service version. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -508,9 +508,9 @@ function ($exception) { * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -553,9 +553,9 @@ public function createBackendRequest($options) $ssl_hostname = array_key_exists('ssl_hostname', $options) ? $options['ssl_hostname'] : null; $ssl_sni_hostname = array_key_exists('ssl_sni_hostname', $options) ? $options['ssl_sni_hostname'] : null; $tcp_keepalive_enable = array_key_exists('tcp_keepalive_enable', $options) ? $options['tcp_keepalive_enable'] : null; - $tcp_keepalive_interval = array_key_exists('tcp_keepalive_interval', $options) ? $options['tcp_keepalive_interval'] : null; - $tcp_keepalive_probes = array_key_exists('tcp_keepalive_probes', $options) ? $options['tcp_keepalive_probes'] : null; - $tcp_keepalive_time = array_key_exists('tcp_keepalive_time', $options) ? $options['tcp_keepalive_time'] : null; + $tcp_keepalive_interval = array_key_exists('tcp_keepalive_interval', $options) ? $options['tcp_keepalive_interval'] : 10; + $tcp_keepalive_probes = array_key_exists('tcp_keepalive_probes', $options) ? $options['tcp_keepalive_probes'] : 3; + $tcp_keepalive_time = array_key_exists('tcp_keepalive_time', $options) ? $options['tcp_keepalive_time'] : 300; $use_ssl = array_key_exists('use_ssl', $options) ? $options['use_ssl'] : null; $weight = array_key_exists('weight', $options) ? $options['weight'] : null; @@ -1896,7 +1896,7 @@ public function listBackendsRequest($options) * @param string $backend_name The name of the backend. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -1925,9 +1925,9 @@ public function listBackendsRequest($options) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -1956,7 +1956,7 @@ public function updateBackend($options) * @param string $backend_name The name of the backend. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -1985,9 +1985,9 @@ public function updateBackend($options) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -2104,7 +2104,7 @@ public function updateBackendWithHttpInfo($options) * @param string $backend_name The name of the backend. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -2133,9 +2133,9 @@ public function updateBackendWithHttpInfo($options) * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -2167,7 +2167,7 @@ function ($response) { * @param string $backend_name The name of the backend. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -2196,9 +2196,9 @@ function ($response) { * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -2256,7 +2256,7 @@ function ($exception) { * @param string $backend_name The name of the backend. (required) * @param string $address A hostname, IPv4, or IPv6 address for the backend. This is the preferred way to specify the location of your backend. (optional) * @param bool $auto_loadbalance Whether or not this backend should be automatically load balanced. If true, all backends with this setting that don't have a `request_condition` will be selected based on their `weight`. (optional) - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional) * @param string $client_cert Unused. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $connect_timeout Maximum duration in milliseconds to wait for a connection to this backend to be established. If exceeded, the connection is aborted and a synthetic `503` response will be presented instead. May be set at runtime using `bereq.connect_timeout`. (optional) @@ -2285,9 +2285,9 @@ function ($exception) { * @param string $ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. (optional) * @param string $ssl_sni_hostname Overrides `ssl_hostname`, but only for SNI in the handshake. Does not affect cert validation at all. (optional) * @param bool $tcp_keepalive_enable Whether to enable TCP keepalives for backend connections. Varnish defaults to using keepalives if this is unspecified. (optional) - * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional) - * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional) - * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional) + * @param int $tcp_keepalive_interval Interval in seconds between subsequent keepalive probes. (optional, default to 10) + * @param int $tcp_keepalive_probes Number of unacknowledged probes to send before considering the connection dead. (optional, default to 3) + * @param int $tcp_keepalive_time Interval in seconds between the last data packet sent and the first keepalive probe. (optional, default to 300) * @param bool $use_ssl Whether or not to require TLS for connections to this backend. (optional) * @param int $weight Weight used to load balance this backend against others. May be any positive integer. If `auto_loadbalance` is true, the chance of this backend being selected is equal to its own weight over the sum of all weights for backends that have `auto_loadbalance` set to true. (optional) * @@ -2331,9 +2331,9 @@ public function updateBackendRequest($options) $ssl_hostname = array_key_exists('ssl_hostname', $options) ? $options['ssl_hostname'] : null; $ssl_sni_hostname = array_key_exists('ssl_sni_hostname', $options) ? $options['ssl_sni_hostname'] : null; $tcp_keepalive_enable = array_key_exists('tcp_keepalive_enable', $options) ? $options['tcp_keepalive_enable'] : null; - $tcp_keepalive_interval = array_key_exists('tcp_keepalive_interval', $options) ? $options['tcp_keepalive_interval'] : null; - $tcp_keepalive_probes = array_key_exists('tcp_keepalive_probes', $options) ? $options['tcp_keepalive_probes'] : null; - $tcp_keepalive_time = array_key_exists('tcp_keepalive_time', $options) ? $options['tcp_keepalive_time'] : null; + $tcp_keepalive_interval = array_key_exists('tcp_keepalive_interval', $options) ? $options['tcp_keepalive_interval'] : 10; + $tcp_keepalive_probes = array_key_exists('tcp_keepalive_probes', $options) ? $options['tcp_keepalive_probes'] : 3; + $tcp_keepalive_time = array_key_exists('tcp_keepalive_time', $options) ? $options['tcp_keepalive_time'] : 300; $use_ssl = array_key_exists('use_ssl', $options) ? $options['use_ssl'] : null; $weight = array_key_exists('weight', $options) ? $options['weight'] : null; diff --git a/lib/Api/DdosProtectionApi.php b/lib/Api/DdosProtectionApi.php index 878a552b..99b5578e 100644 --- a/lib/Api/DdosProtectionApi.php +++ b/lib/Api/DdosProtectionApi.php @@ -1681,6 +1681,420 @@ public function ddosProtectionRuleGetRequest($options) ); } + /** + * Operation ddosProtectionRulePatch + * + * Update rule + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $rule_id Unique ID of the rule. (required) + * @param \Fastly\Model\DdosProtectionRulePatch $ddos_protection_rule_patch ddos_protection_rule_patch (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DdosProtectionRule|DdosProtectionError|DdosProtectionError|DdosProtectionError|DdosProtectionError + */ + public function ddosProtectionRulePatch($options) + { + list($response) = $this->ddosProtectionRulePatchWithHttpInfo($options); + return $response; + } + + /** + * Operation ddosProtectionRulePatchWithHttpInfo + * + * Update rule + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $rule_id Unique ID of the rule. (required) + * @param \Fastly\Model\DdosProtectionRulePatch $ddos_protection_rule_patch (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DdosProtectionRule|DdosProtectionError|DdosProtectionError|DdosProtectionError|DdosProtectionError, HTTP status code, HTTP response headers (array of strings) + */ + public function ddosProtectionRulePatchWithHttpInfo($options) + { + $request = $this->ddosProtectionRulePatchRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DdosProtectionRule' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DdosProtectionRule', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('DdosProtectionError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'DdosProtectionError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DdosProtectionRule'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DdosProtectionRule', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'DdosProtectionError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation ddosProtectionRulePatchAsync + * + * Update rule + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $rule_id Unique ID of the rule. (required) + * @param \Fastly\Model\DdosProtectionRulePatch $ddos_protection_rule_patch (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ddosProtectionRulePatchAsync($options) + { + return $this->ddosProtectionRulePatchAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation ddosProtectionRulePatchAsyncWithHttpInfo + * + * Update rule + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $rule_id Unique ID of the rule. (required) + * @param \Fastly\Model\DdosProtectionRulePatch $ddos_protection_rule_patch (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function ddosProtectionRulePatchAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DdosProtectionRule'; + $request = $this->ddosProtectionRulePatchRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'ddosProtectionRulePatch' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $rule_id Unique ID of the rule. (required) + * @param \Fastly\Model\DdosProtectionRulePatch $ddos_protection_rule_patch (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function ddosProtectionRulePatchRequest($options) + { + // unbox the parameters from the associative array + $rule_id = array_key_exists('rule_id', $options) ? $options['rule_id'] : null; + $ddos_protection_rule_patch = array_key_exists('ddos_protection_rule_patch', $options) ? $options['ddos_protection_rule_patch'] : null; + + // verify the required parameter 'rule_id' is set + if ($rule_id === null || (is_array($rule_id) && count($rule_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rule_id when calling ddosProtectionRulePatch' + ); + } + + $resourcePath = '/ddos-protection/v1/rules/{rule_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($rule_id !== null) { + $resourcePath = str_replace( + '{' . 'rule_id' . '}', + ObjectSerializer::toPathValue($rule_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'application/problem+json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($ddos_protection_rule_patch)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($ddos_protection_rule_patch)); + } else { + $httpBody = $ddos_protection_rule_patch; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation ddosProtectionTrafficStatsRuleGet * diff --git a/lib/Api/HistoricalApi.php b/lib/Api/HistoricalApi.php index 83b5acc0..97ad796d 100644 --- a/lib/Api/HistoricalApi.php +++ b/lib/Api/HistoricalApi.php @@ -123,6 +123,7 @@ public function getConfig() * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) + * @param string $services Limit the query to only the specified, comma-separated list of services. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -148,6 +149,7 @@ public function getHistStats($options) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) + * @param string $services Limit the query to only the specified, comma-separated list of services. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -261,6 +263,7 @@ public function getHistStatsWithHttpInfo($options) * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) + * @param string $services Limit the query to only the specified, comma-separated list of services. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -289,6 +292,7 @@ function ($response) { * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) + * @param string $services Limit the query to only the specified, comma-separated list of services. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -343,6 +347,7 @@ function ($exception) { * @param string $to Timestamp that defines the end of the window for which to fetch statistics. Accepts the same formats as `from`. (optional, default to 'now') * @param string $by Duration of sample windows. One of: * `hour` - Group data by hour. * `minute` - Group data by minute. * `day` - Group data by day. (optional, default to 'day') * @param string $region Limit query to a specific geographic region. One of: * `usa` - North America. * `europe` - Europe. * `anzac` - Australia and New Zealand. * `asia` - Asia. * `asia_india` - India. * `asia_southkorea` - South Korea. * `africa_std` - Africa. * `mexico` - Mexico. * `southamerica_std` - South America. (optional) + * @param string $services Limit the query to only the specified, comma-separated list of services. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -354,6 +359,7 @@ public function getHistStatsRequest($options) $to = array_key_exists('to', $options) ? $options['to'] : 'now'; $by = array_key_exists('by', $options) ? $options['by'] : 'day'; $region = array_key_exists('region', $options) ? $options['region'] : null; + $services = array_key_exists('services', $options) ? $options['services'] : null; $resourcePath = '/stats'; @@ -407,6 +413,13 @@ public function getHistStatsRequest($options) $queryParams['region'] = ObjectSerializer::toString($region); } } + // query params + if (is_array($services)) { + $services = ObjectSerializer::serializeCollection($services, 'form', true); + } + if ($services !== null) { + $queryParams['services'] = ObjectSerializer::toString($services); + } diff --git a/lib/Api/KvStoreApi.php b/lib/Api/KvStoreApi.php index a3e30f58..8f62ddd5 100644 --- a/lib/Api/KvStoreApi.php +++ b/lib/Api/KvStoreApi.php @@ -1051,6 +1051,7 @@ public function kvStoreGetRequest($options) * * @param string $cursor cursor (optional) * @param int $limit limit (optional, default to 1000) + * @param string $name Returns a one-element array containing the details for the named KV store. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1074,6 +1075,7 @@ public function kvStoreList($options) * * @param string $cursor (optional) * @param int $limit (optional, default to 1000) + * @param string $name Returns a one-element array containing the details for the named KV store. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1185,6 +1187,7 @@ public function kvStoreListWithHttpInfo($options) * * @param string $cursor (optional) * @param int $limit (optional, default to 1000) + * @param string $name Returns a one-element array containing the details for the named KV store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1211,6 +1214,7 @@ function ($response) { * * @param string $cursor (optional) * @param int $limit (optional, default to 1000) + * @param string $name Returns a one-element array containing the details for the named KV store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1263,6 +1267,7 @@ function ($exception) { * * @param string $cursor (optional) * @param int $limit (optional, default to 1000) + * @param string $name Returns a one-element array containing the details for the named KV store. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1272,6 +1277,7 @@ public function kvStoreListRequest($options) // unbox the parameters from the associative array $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; $limit = array_key_exists('limit', $options) ? $options['limit'] : 1000; + $name = array_key_exists('name', $options) ? $options['name'] : null; if ($limit !== null && $limit < 1) { throw new \InvalidArgumentException('invalid value for "$limit" when calling KvStoreApi.kvStoreList, must be bigger than or equal to 1.'); @@ -1307,6 +1313,17 @@ public function kvStoreListRequest($options) $queryParams['limit'] = ObjectSerializer::toString($limit); } } + // query params + if ($name !== null) { + if('form' === 'form' && is_array($name)) { + foreach($name as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['name'] = ObjectSerializer::toString($name); + } + } diff --git a/lib/Api/NgwafReportsApi.php b/lib/Api/NgwafReportsApi.php new file mode 100644 index 00000000..96f0e0c7 --- /dev/null +++ b/lib/Api/NgwafReportsApi.php @@ -0,0 +1,991 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getAttacksReport + * + * Get attacks report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ListAttackReport|object|object|object|object + */ + public function getAttacksReport($options) + { + list($response) = $this->getAttacksReportWithHttpInfo($options); + return $response; + } + + /** + * Operation getAttacksReportWithHttpInfo + * + * Get attacks report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ListAttackReport|object|object|object|object, HTTP status code, HTTP response headers (array of strings) + */ + public function getAttacksReportWithHttpInfo($options) + { + $request = $this->getAttacksReportRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ListAttackReport' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ListAttackReport', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 429: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ListAttackReport'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ListAttackReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getAttacksReportAsync + * + * Get attacks report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAttacksReportAsync($options) + { + return $this->getAttacksReportAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAttacksReportAsyncWithHttpInfo + * + * Get attacks report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getAttacksReportAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ListAttackReport'; + $request = $this->getAttacksReportRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAttacksReport' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAttacksReportRequest($options) + { + // unbox the parameters from the associative array + $from = array_key_exists('from', $options) ? $options['from'] : null; + $to = array_key_exists('to', $options) ? $options['to'] : null; + + // verify the required parameter 'from' is set + if ($from === null || (is_array($from) && count($from) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $from when calling getAttacksReport' + ); + } + + $resourcePath = '/ngwaf/v1/reports/attacks'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($from !== null) { + if('form' === 'form' && is_array($from)) { + foreach($from as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['from'] = ObjectSerializer::toString($from); + } + } + // query params + if ($to !== null) { + if('form' === 'form' && is_array($to)) { + foreach($to as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['to'] = ObjectSerializer::toString($to); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'application/problem+json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getSignalsReport + * + * Get signals report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * @param string $signal_type The type of signal (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ListSignalReport|object|object|object|object + */ + public function getSignalsReport($options) + { + list($response) = $this->getSignalsReportWithHttpInfo($options); + return $response; + } + + /** + * Operation getSignalsReportWithHttpInfo + * + * Get signals report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * @param string $signal_type The type of signal (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ListSignalReport|object|object|object|object, HTTP status code, HTTP response headers (array of strings) + */ + public function getSignalsReportWithHttpInfo($options) + { + $request = $this->getSignalsReportRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ListSignalReport' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ListSignalReport', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 403: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 429: + if ('object' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, 'object', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ListSignalReport'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ListSignalReport', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'object', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getSignalsReportAsync + * + * Get signals report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * @param string $signal_type The type of signal (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSignalsReportAsync($options) + { + return $this->getSignalsReportAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getSignalsReportAsyncWithHttpInfo + * + * Get signals report + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * @param string $signal_type The type of signal (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getSignalsReportAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ListSignalReport'; + $request = $this->getSignalsReportRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getSignalsReport' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \DateTime $from The start of a time range in RFC 3339 format. (required) + * @param \DateTime $to The end of a time range in RFC 3339 format. Defaults to the current time. (optional) + * @param string $signal_type The type of signal (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getSignalsReportRequest($options) + { + // unbox the parameters from the associative array + $from = array_key_exists('from', $options) ? $options['from'] : null; + $to = array_key_exists('to', $options) ? $options['to'] : null; + $signal_type = array_key_exists('signal_type', $options) ? $options['signal_type'] : null; + + // verify the required parameter 'from' is set + if ($from === null || (is_array($from) && count($from) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $from when calling getSignalsReport' + ); + } + + $resourcePath = '/ngwaf/v1/reports/signals'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($from !== null) { + if('form' === 'form' && is_array($from)) { + foreach($from as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['from'] = ObjectSerializer::toString($from); + } + } + // query params + if ($to !== null) { + if('form' === 'form' && is_array($to)) { + foreach($to as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['to'] = ObjectSerializer::toString($to); + } + } + // query params + if ($signal_type !== null) { + if('form' === 'form' && is_array($signal_type)) { + foreach($signal_type as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['signal_type'] = ObjectSerializer::toString($signal_type); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'application/problem+json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'application/problem+json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/ObservabilityTimeseriesForLogsApi.php b/lib/Api/ObservabilityTimeseriesApi.php similarity index 80% rename from lib/Api/ObservabilityTimeseriesForLogsApi.php rename to lib/Api/ObservabilityTimeseriesApi.php index 19bbd783..2a44f3e8 100644 --- a/lib/Api/ObservabilityTimeseriesForLogsApi.php +++ b/lib/Api/ObservabilityTimeseriesApi.php @@ -1,6 +1,6 @@ logTimeseriesGetWithHttpInfo($options); + list($response) = $this->timeseriesGetWithHttpInfo($options); return $response; } /** - * Operation logTimeseriesGetWithHttpInfo + * Operation timeseriesGetWithHttpInfo * - * Retrieve log data as time series + * Retrieve observability data as a time series * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -148,20 +148,20 @@ public function logTimeseriesGet($options) * URL: https://api.fastly.com * * @param string $source (required) - * @param string $service_id (required) - * @param string $start (required) - * @param string $end (required) + * @param string $from (required) + * @param string $to (required) * @param string $granularity (required) + * @param string $dimensions (optional) * @param string $filter (optional) * @param string $series (required) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\LogTimeseriesGetResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\TimeseriesGetResponse, HTTP status code, HTTP response headers (array of strings) */ - public function logTimeseriesGetWithHttpInfo($options) + public function timeseriesGetWithHttpInfo($options) { - $request = $this->logTimeseriesGetRequest($options); + $request = $this->timeseriesGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -212,20 +212,20 @@ public function logTimeseriesGetWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\LogTimeseriesGetResponse' === '\SplFileObject') { + if ('\Fastly\Model\TimeseriesGetResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\LogTimeseriesGetResponse', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\TimeseriesGetResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\LogTimeseriesGetResponse'; + $returnType = '\Fastly\Model\TimeseriesGetResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -243,7 +243,7 @@ public function logTimeseriesGetWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\LogTimeseriesGetResponse', + '\Fastly\Model\TimeseriesGetResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -254,9 +254,9 @@ public function logTimeseriesGetWithHttpInfo($options) } /** - * Operation logTimeseriesGetAsync + * Operation timeseriesGetAsync * - * Retrieve log data as time series + * Retrieve observability data as a time series * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -264,19 +264,19 @@ public function logTimeseriesGetWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $source (required) - * @param string $service_id (required) - * @param string $start (required) - * @param string $end (required) + * @param string $from (required) + * @param string $to (required) * @param string $granularity (required) + * @param string $dimensions (optional) * @param string $filter (optional) * @param string $series (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function logTimeseriesGetAsync($options) + public function timeseriesGetAsync($options) { - return $this->logTimeseriesGetAsyncWithHttpInfo($options) + return $this->timeseriesGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -285,9 +285,9 @@ function ($response) { } /** - * Operation logTimeseriesGetAsyncWithHttpInfo + * Operation timeseriesGetAsyncWithHttpInfo * - * Retrieve log data as time series + * Retrieve observability data as a time series * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -295,20 +295,20 @@ function ($response) { * URL: https://api.fastly.com * * @param string $source (required) - * @param string $service_id (required) - * @param string $start (required) - * @param string $end (required) + * @param string $from (required) + * @param string $to (required) * @param string $granularity (required) + * @param string $dimensions (optional) * @param string $filter (optional) * @param string $series (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function logTimeseriesGetAsyncWithHttpInfo($options) + public function timeseriesGetAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\LogTimeseriesGetResponse'; - $request = $this->logTimeseriesGetRequest($options); + $returnType = '\Fastly\Model\TimeseriesGetResponse'; + $request = $this->timeseriesGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -344,7 +344,7 @@ function ($exception) { } /** - * Create request for operation 'logTimeseriesGet' + * Create request for operation 'timeseriesGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -352,61 +352,55 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $source (required) - * @param string $service_id (required) - * @param string $start (required) - * @param string $end (required) + * @param string $from (required) + * @param string $to (required) * @param string $granularity (required) + * @param string $dimensions (optional) * @param string $filter (optional) * @param string $series (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function logTimeseriesGetRequest($options) + public function timeseriesGetRequest($options) { // unbox the parameters from the associative array $source = array_key_exists('source', $options) ? $options['source'] : null; - $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; - $start = array_key_exists('start', $options) ? $options['start'] : null; - $end = array_key_exists('end', $options) ? $options['end'] : null; + $from = array_key_exists('from', $options) ? $options['from'] : null; + $to = array_key_exists('to', $options) ? $options['to'] : null; $granularity = array_key_exists('granularity', $options) ? $options['granularity'] : null; + $dimensions = array_key_exists('dimensions', $options) ? $options['dimensions'] : null; $filter = array_key_exists('filter', $options) ? $options['filter'] : null; $series = array_key_exists('series', $options) ? $options['series'] : null; // verify the required parameter 'source' is set if ($source === null || (is_array($source) && count($source) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $source when calling logTimeseriesGet' + 'Missing the required parameter $source when calling timeseriesGet' ); } - // verify the required parameter 'service_id' is set - if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + // verify the required parameter 'from' is set + if ($from === null || (is_array($from) && count($from) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $service_id when calling logTimeseriesGet' + 'Missing the required parameter $from when calling timeseriesGet' ); } - // verify the required parameter 'start' is set - if ($start === null || (is_array($start) && count($start) === 0)) { + // verify the required parameter 'to' is set + if ($to === null || (is_array($to) && count($to) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $start when calling logTimeseriesGet' - ); - } - // verify the required parameter 'end' is set - if ($end === null || (is_array($end) && count($end) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $end when calling logTimeseriesGet' + 'Missing the required parameter $to when calling timeseriesGet' ); } // verify the required parameter 'granularity' is set if ($granularity === null || (is_array($granularity) && count($granularity) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $granularity when calling logTimeseriesGet' + 'Missing the required parameter $granularity when calling timeseriesGet' ); } // verify the required parameter 'series' is set if ($series === null || (is_array($series) && count($series) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $series when calling logTimeseriesGet' + 'Missing the required parameter $series when calling timeseriesGet' ); } @@ -429,47 +423,47 @@ public function logTimeseriesGetRequest($options) } } // query params - if ($service_id !== null) { - if('form' === 'form' && is_array($service_id)) { - foreach($service_id as $key => $value) { + if ($from !== null) { + if('form' === 'form' && is_array($from)) { + foreach($from as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['service_id'] = ObjectSerializer::toString($service_id); + $queryParams['from'] = ObjectSerializer::toString($from); } } // query params - if ($start !== null) { - if('form' === 'form' && is_array($start)) { - foreach($start as $key => $value) { + if ($to !== null) { + if('form' === 'form' && is_array($to)) { + foreach($to as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['start'] = ObjectSerializer::toString($start); + $queryParams['to'] = ObjectSerializer::toString($to); } } // query params - if ($end !== null) { - if('form' === 'form' && is_array($end)) { - foreach($end as $key => $value) { + if ($granularity !== null) { + if('form' === 'form' && is_array($granularity)) { + foreach($granularity as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['end'] = ObjectSerializer::toString($end); + $queryParams['granularity'] = ObjectSerializer::toString($granularity); } } // query params - if ($granularity !== null) { - if('form' === 'form' && is_array($granularity)) { - foreach($granularity as $key => $value) { + if ($dimensions !== null) { + if('form' === 'form' && is_array($dimensions)) { + foreach($dimensions as $key => $value) { $queryParams[$key] = ObjectSerializer::toString($value); } } else { - $queryParams['granularity'] = ObjectSerializer::toString($granularity); + $queryParams['dimensions'] = ObjectSerializer::toString($dimensions); } } // query params diff --git a/lib/Api/PoolApi.php b/lib/Api/PoolApi.php index 673ed25e..cb1be3ef 100644 --- a/lib/Api/PoolApi.php +++ b/lib/Api/PoolApi.php @@ -142,7 +142,7 @@ public function getConfig() * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -192,7 +192,7 @@ public function createServerPool($options) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -330,7 +330,7 @@ public function createServerPoolWithHttpInfo($options) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -383,7 +383,7 @@ function ($response) { * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -462,7 +462,7 @@ function ($exception) { * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -1828,7 +1828,7 @@ public function listServerPoolsRequest($options) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -1879,7 +1879,7 @@ public function updateServerPool($options) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -2018,7 +2018,7 @@ public function updateServerPoolWithHttpInfo($options) * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -2072,7 +2072,7 @@ function ($response) { * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) @@ -2152,7 +2152,7 @@ function ($exception) { * @param string $comment A freeform descriptive note. (optional) * @param string $type What type of load balance group to use. (optional) * @param string $override_host The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting. (optional, default to 'null') - * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) + * @param int $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. (optional, default to 10000) * @param int $connect_timeout How long to wait for a timeout in milliseconds. Optional. (optional) * @param int $first_byte_timeout How long to wait for the first byte in milliseconds. Optional. (optional) * @param int $max_conn_default Maximum number of connections. Optional. (optional, default to 200) diff --git a/lib/Api/TlsSubscriptionsApi.php b/lib/Api/TlsSubscriptionsApi.php index 58497762..358a1282 100644 --- a/lib/Api/TlsSubscriptionsApi.php +++ b/lib/Api/TlsSubscriptionsApi.php @@ -473,7 +473,6 @@ public function createGlobalsignEmailChallengeRequest($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param bool $force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. (optional) * @param \Fastly\Model\TlsSubscription $tls_subscription tls_subscription (optional) * * @throws \Fastly\ApiException on non-2xx response @@ -496,7 +495,6 @@ public function createTlsSub($options) * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param bool $force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. (optional) * @param \Fastly\Model\TlsSubscription $tls_subscription (optional) * * @throws \Fastly\ApiException on non-2xx response @@ -607,7 +605,6 @@ public function createTlsSubWithHttpInfo($options) * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param bool $force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. (optional) * @param \Fastly\Model\TlsSubscription $tls_subscription (optional) * * @throws \InvalidArgumentException @@ -633,7 +630,6 @@ function ($response) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param bool $force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. (optional) * @param \Fastly\Model\TlsSubscription $tls_subscription (optional) * * @throws \InvalidArgumentException @@ -685,7 +681,6 @@ function ($exception) { * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param bool $force A flag that allows you to edit and delete a subscription with active domains. Valid to use on PATCH and DELETE actions. As a warning, removing an active domain from a subscription or forcing the deletion of a subscription may result in breaking TLS termination to that domain. (optional) * @param \Fastly\Model\TlsSubscription $tls_subscription (optional) * * @throws \InvalidArgumentException @@ -694,7 +689,6 @@ function ($exception) { public function createTlsSubRequest($options) { // unbox the parameters from the associative array - $force = array_key_exists('force', $options) ? $options['force'] : null; $tls_subscription = array_key_exists('tls_subscription', $options) ? $options['tls_subscription'] : null; @@ -705,13 +699,6 @@ public function createTlsSubRequest($options) $httpBody = ''; $multipart = false; - // query params - if (is_array($force)) { - $force = ObjectSerializer::serializeCollection($force, 'form', true); - } - if ($force !== null) { - $queryParams['force'] = ObjectSerializer::toString($force); - } diff --git a/lib/Configuration.php b/lib/Configuration.php index b21709f3..b4261ff2 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/10.1.0'; + protected $userAgent = 'fastly-php/11.0.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 10.1.0' . PHP_EOL; + $report .= ' SDK Package Version: 11.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/AttackReport.php b/lib/Model/AttackReport.php new file mode 100644 index 00000000..7e9a88d8 --- /dev/null +++ b/lib/Model/AttackReport.php @@ -0,0 +1,614 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AttackReport implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'AttackReport'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'name' => 'string', + 'total_count' => 'int', + 'blocked_count' => 'int', + 'flagged_count' => 'int', + 'attack_count' => 'int', + 'all_flagged_ip_count' => 'int', + 'flagged_ip_count' => 'int', + 'top_attack_signals' => '\Fastly\Model\AttackSignal[]', + 'top_attack_sources' => '\Fastly\Model\AttackSource[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'name' => null, + 'total_count' => null, + 'blocked_count' => null, + 'flagged_count' => null, + 'attack_count' => null, + 'all_flagged_ip_count' => null, + 'flagged_ip_count' => null, + 'top_attack_signals' => null, + 'top_attack_sources' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'total_count' => 'total_count', + 'blocked_count' => 'blocked_count', + 'flagged_count' => 'flagged_count', + 'attack_count' => 'attack_count', + 'all_flagged_ip_count' => 'all_flagged_ip_count', + 'flagged_ip_count' => 'flagged_ip_count', + 'top_attack_signals' => 'top_attack_signals', + 'top_attack_sources' => 'top_attack_sources' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'total_count' => 'setTotalCount', + 'blocked_count' => 'setBlockedCount', + 'flagged_count' => 'setFlaggedCount', + 'attack_count' => 'setAttackCount', + 'all_flagged_ip_count' => 'setAllFlaggedIpCount', + 'flagged_ip_count' => 'setFlaggedIpCount', + 'top_attack_signals' => 'setTopAttackSignals', + 'top_attack_sources' => 'setTopAttackSources' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'total_count' => 'getTotalCount', + 'blocked_count' => 'getBlockedCount', + 'flagged_count' => 'getFlaggedCount', + 'attack_count' => 'getAttackCount', + 'all_flagged_ip_count' => 'getAllFlaggedIpCount', + 'flagged_ip_count' => 'getFlaggedIpCount', + 'top_attack_signals' => 'getTopAttackSignals', + 'top_attack_sources' => 'getTopAttackSources' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['total_count'] = $data['total_count'] ?? null; + $this->container['blocked_count'] = $data['blocked_count'] ?? null; + $this->container['flagged_count'] = $data['flagged_count'] ?? null; + $this->container['attack_count'] = $data['attack_count'] ?? null; + $this->container['all_flagged_ip_count'] = $data['all_flagged_ip_count'] ?? null; + $this->container['flagged_ip_count'] = $data['flagged_ip_count'] ?? null; + $this->container['top_attack_signals'] = $data['top_attack_signals'] ?? null; + $this->container['top_attack_sources'] = $data['top_attack_sources'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['total_count'] === null) { + $invalidProperties[] = "'total_count' can't be null"; + } + if ($this->container['blocked_count'] === null) { + $invalidProperties[] = "'blocked_count' can't be null"; + } + if ($this->container['flagged_count'] === null) { + $invalidProperties[] = "'flagged_count' can't be null"; + } + if ($this->container['attack_count'] === null) { + $invalidProperties[] = "'attack_count' can't be null"; + } + if ($this->container['all_flagged_ip_count'] === null) { + $invalidProperties[] = "'all_flagged_ip_count' can't be null"; + } + if ($this->container['flagged_ip_count'] === null) { + $invalidProperties[] = "'flagged_ip_count' can't be null"; + } + if ($this->container['top_attack_signals'] === null) { + $invalidProperties[] = "'top_attack_signals' can't be null"; + } + if ($this->container['top_attack_sources'] === null) { + $invalidProperties[] = "'top_attack_sources' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id ID of the workspace. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the workspace. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets total_count + * + * @return int + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int $total_count Total request count + * + * @return self + */ + public function setTotalCount($total_count) + { + $this->container['total_count'] = $total_count; + + return $this; + } + + /** + * Gets blocked_count + * + * @return int + */ + public function getBlockedCount() + { + return $this->container['blocked_count']; + } + + /** + * Sets blocked_count + * + * @param int $blocked_count Blocked request count + * + * @return self + */ + public function setBlockedCount($blocked_count) + { + $this->container['blocked_count'] = $blocked_count; + + return $this; + } + + /** + * Gets flagged_count + * + * @return int + */ + public function getFlaggedCount() + { + return $this->container['flagged_count']; + } + + /** + * Sets flagged_count + * + * @param int $flagged_count Flagged request count + * + * @return self + */ + public function setFlaggedCount($flagged_count) + { + $this->container['flagged_count'] = $flagged_count; + + return $this; + } + + /** + * Gets attack_count + * + * @return int + */ + public function getAttackCount() + { + return $this->container['attack_count']; + } + + /** + * Sets attack_count + * + * @param int $attack_count Attack request count + * + * @return self + */ + public function setAttackCount($attack_count) + { + $this->container['attack_count'] = $attack_count; + + return $this; + } + + /** + * Gets all_flagged_ip_count + * + * @return int + */ + public function getAllFlaggedIpCount() + { + return $this->container['all_flagged_ip_count']; + } + + /** + * Sets all_flagged_ip_count + * + * @param int $all_flagged_ip_count Count of IPs that have been flagged + * + * @return self + */ + public function setAllFlaggedIpCount($all_flagged_ip_count) + { + $this->container['all_flagged_ip_count'] = $all_flagged_ip_count; + + return $this; + } + + /** + * Gets flagged_ip_count + * + * @return int + */ + public function getFlaggedIpCount() + { + return $this->container['flagged_ip_count']; + } + + /** + * Sets flagged_ip_count + * + * @param int $flagged_ip_count Count of currently flagged IPs + * + * @return self + */ + public function setFlaggedIpCount($flagged_ip_count) + { + $this->container['flagged_ip_count'] = $flagged_ip_count; + + return $this; + } + + /** + * Gets top_attack_signals + * + * @return \Fastly\Model\AttackSignal[] + */ + public function getTopAttackSignals() + { + return $this->container['top_attack_signals']; + } + + /** + * Sets top_attack_signals + * + * @param \Fastly\Model\AttackSignal[] $top_attack_signals top_attack_signals + * + * @return self + */ + public function setTopAttackSignals($top_attack_signals) + { + $this->container['top_attack_signals'] = $top_attack_signals; + + return $this; + } + + /** + * Gets top_attack_sources + * + * @return \Fastly\Model\AttackSource[] + */ + public function getTopAttackSources() + { + return $this->container['top_attack_sources']; + } + + /** + * Sets top_attack_sources + * + * @param \Fastly\Model\AttackSource[] $top_attack_sources top_attack_sources + * + * @return self + */ + public function setTopAttackSources($top_attack_sources) + { + $this->container['top_attack_sources'] = $top_attack_sources; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AttackSignal.php b/lib/Model/AttackSignal.php new file mode 100644 index 00000000..3f57cec6 --- /dev/null +++ b/lib/Model/AttackSignal.php @@ -0,0 +1,383 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AttackSignal implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'AttackSignal'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'tag_name' => 'string', + 'tag_count' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'tag_name' => null, + 'tag_count' => null, + 'total_count' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag_name' => 'tag_name', + 'tag_count' => 'tag_count', + 'total_count' => 'total_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tag_name' => 'setTagName', + 'tag_count' => 'setTagCount', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tag_name' => 'getTagName', + 'tag_count' => 'getTagCount', + 'total_count' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag_name'] = $data['tag_name'] ?? null; + $this->container['tag_count'] = $data['tag_count'] ?? null; + $this->container['total_count'] = $data['total_count'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['tag_name'] === null) { + $invalidProperties[] = "'tag_name' can't be null"; + } + if ($this->container['tag_count'] === null) { + $invalidProperties[] = "'tag_count' can't be null"; + } + if ($this->container['total_count'] === null) { + $invalidProperties[] = "'total_count' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tag_name + * + * @return string + */ + public function getTagName() + { + return $this->container['tag_name']; + } + + /** + * Sets tag_name + * + * @param string $tag_name Name of the attack signal tag + * + * @return self + */ + public function setTagName($tag_name) + { + $this->container['tag_name'] = $tag_name; + + return $this; + } + + /** + * Gets tag_count + * + * @return int + */ + public function getTagCount() + { + return $this->container['tag_count']; + } + + /** + * Sets tag_count + * + * @param int $tag_count Count of requests with this attack signal + * + * @return self + */ + public function setTagCount($tag_count) + { + $this->container['tag_count'] = $tag_count; + + return $this; + } + + /** + * Gets total_count + * + * @return int + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int $total_count Total number of attacks considered + * + * @return self + */ + public function setTotalCount($total_count) + { + $this->container['total_count'] = $total_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/AttackSource.php b/lib/Model/AttackSource.php new file mode 100644 index 00000000..10533ae7 --- /dev/null +++ b/lib/Model/AttackSource.php @@ -0,0 +1,416 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class AttackSource implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'AttackSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'country_code' => 'string', + 'country_name' => 'string', + 'request_count' => 'int', + 'total_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'country_code' => null, + 'country_name' => null, + 'request_count' => null, + 'total_count' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'country_code' => 'country_code', + 'country_name' => 'country_name', + 'request_count' => 'request_count', + 'total_count' => 'total_count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'country_code' => 'setCountryCode', + 'country_name' => 'setCountryName', + 'request_count' => 'setRequestCount', + 'total_count' => 'setTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'country_code' => 'getCountryCode', + 'country_name' => 'getCountryName', + 'request_count' => 'getRequestCount', + 'total_count' => 'getTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['country_name'] = $data['country_name'] ?? null; + $this->container['request_count'] = $data['request_count'] ?? null; + $this->container['total_count'] = $data['total_count'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['country_code'] === null) { + $invalidProperties[] = "'country_code' can't be null"; + } + if ($this->container['country_name'] === null) { + $invalidProperties[] = "'country_name' can't be null"; + } + if ($this->container['request_count'] === null) { + $invalidProperties[] = "'request_count' can't be null"; + } + if ($this->container['total_count'] === null) { + $invalidProperties[] = "'total_count' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets country_code + * + * @return string + */ + public function getCountryCode() + { + return $this->container['country_code']; + } + + /** + * Sets country_code + * + * @param string $country_code Country code of the attack source + * + * @return self + */ + public function setCountryCode($country_code) + { + $this->container['country_code'] = $country_code; + + return $this; + } + + /** + * Gets country_name + * + * @return string + */ + public function getCountryName() + { + return $this->container['country_name']; + } + + /** + * Sets country_name + * + * @param string $country_name Name of the country + * + * @return self + */ + public function setCountryName($country_name) + { + $this->container['country_name'] = $country_name; + + return $this; + } + + /** + * Gets request_count + * + * @return int + */ + public function getRequestCount() + { + return $this->container['request_count']; + } + + /** + * Sets request_count + * + * @param int $request_count Number of requests from this country + * + * @return self + */ + public function setRequestCount($request_count) + { + $this->container['request_count'] = $request_count; + + return $this; + } + + /** + * Gets total_count + * + * @return int + */ + public function getTotalCount() + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int $total_count Total number of attacks considered + * + * @return self + */ + public function setTotalCount($total_count) + { + $this->container['total_count'] = $total_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Backend.php b/lib/Model/Backend.php index 0abaeac0..237d8bf2 100644 --- a/lib/Model/Backend.php +++ b/lib/Model/Backend.php @@ -378,9 +378,9 @@ public function __construct(array $data = null) $this->container['ssl_hostname'] = $data['ssl_hostname'] ?? null; $this->container['ssl_sni_hostname'] = $data['ssl_sni_hostname'] ?? null; $this->container['tcp_keepalive_enable'] = $data['tcp_keepalive_enable'] ?? null; - $this->container['tcp_keepalive_interval'] = $data['tcp_keepalive_interval'] ?? null; - $this->container['tcp_keepalive_probes'] = $data['tcp_keepalive_probes'] ?? null; - $this->container['tcp_keepalive_time'] = $data['tcp_keepalive_time'] ?? null; + $this->container['tcp_keepalive_interval'] = $data['tcp_keepalive_interval'] ?? 10; + $this->container['tcp_keepalive_probes'] = $data['tcp_keepalive_probes'] ?? 3; + $this->container['tcp_keepalive_time'] = $data['tcp_keepalive_time'] ?? 300; $this->container['use_ssl'] = $data['use_ssl'] ?? null; $this->container['weight'] = $data['weight'] ?? null; } @@ -474,7 +474,7 @@ public function getBetweenBytesTimeout() /** * Sets between_bytes_timeout * - * @param int|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. + * @param int|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. * * @return self */ diff --git a/lib/Model/BackendResponse.php b/lib/Model/BackendResponse.php index b1ba9121..1af912e1 100644 --- a/lib/Model/BackendResponse.php +++ b/lib/Model/BackendResponse.php @@ -408,9 +408,9 @@ public function __construct(array $data = null) $this->container['ssl_hostname'] = $data['ssl_hostname'] ?? null; $this->container['ssl_sni_hostname'] = $data['ssl_sni_hostname'] ?? null; $this->container['tcp_keepalive_enable'] = $data['tcp_keepalive_enable'] ?? null; - $this->container['tcp_keepalive_interval'] = $data['tcp_keepalive_interval'] ?? null; - $this->container['tcp_keepalive_probes'] = $data['tcp_keepalive_probes'] ?? null; - $this->container['tcp_keepalive_time'] = $data['tcp_keepalive_time'] ?? null; + $this->container['tcp_keepalive_interval'] = $data['tcp_keepalive_interval'] ?? 10; + $this->container['tcp_keepalive_probes'] = $data['tcp_keepalive_probes'] ?? 3; + $this->container['tcp_keepalive_time'] = $data['tcp_keepalive_time'] ?? 300; $this->container['use_ssl'] = $data['use_ssl'] ?? null; $this->container['weight'] = $data['weight'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; @@ -510,7 +510,7 @@ public function getBetweenBytesTimeout() /** * Sets between_bytes_timeout * - * @param int|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. + * @param int|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. * * @return self */ diff --git a/lib/Model/DdosProtectionAction.php b/lib/Model/DdosProtectionAction.php deleted file mode 100644 index 25f350d4..00000000 --- a/lib/Model/DdosProtectionAction.php +++ /dev/null @@ -1,63 +0,0 @@ - '\Fastly\Model\DdosProtectionTrafficAttribute', + 'name' => 'string', 'values' => '\Fastly\Model\DdosProtectionAttributeValue[]' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets name * - * @return \Fastly\Model\DdosProtectionTrafficAttribute|null + * @return string|null */ public function getName() { @@ -218,7 +218,7 @@ public function getName() /** * Sets name * - * @param \Fastly\Model\DdosProtectionTrafficAttribute|null $name name + * @param string|null $name Name of an attribute type used in traffic stats. Currently, supported values are source_ip, country_code, host, asn, source_ip_prefix, user_agent, method_path. * * @return self */ diff --git a/lib/Model/LogTimeseriesFilterFieldItem.php b/lib/Model/DdosProtectionInvalidRequest.php similarity index 65% rename from lib/Model/LogTimeseriesFilterFieldItem.php rename to lib/Model/DdosProtectionInvalidRequest.php index 6e27f2e9..99e8165b 100644 --- a/lib/Model/LogTimeseriesFilterFieldItem.php +++ b/lib/Model/DdosProtectionInvalidRequest.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class LogTimeseriesFilterFieldItem implements ModelInterface, ArrayAccess, \JsonSerializable +class DdosProtectionInvalidRequest implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -46,7 +45,7 @@ class LogTimeseriesFilterFieldItem implements ModelInterface, ArrayAccess, \Json * * @var string */ - protected static $fastlyModelName = 'log-timeseries-filter-field-item'; + protected static $fastlyModelName = 'ddos_protection_invalid_request'; /** * Array of property to type mappings. Used for (de)serialization @@ -54,9 +53,10 @@ class LogTimeseriesFilterFieldItem implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $fastlyTypes = [ - 'field' => 'string', - 'operator' => 'string', - 'value' => '\Fastly\Model\LogTimeseriesValueField' + 'title' => 'string', + 'status' => 'int', + 'detail' => 'string', + 'errors' => '\Fastly\Model\DdosProtectionErrorErrors[]' ]; /** @@ -67,9 +67,10 @@ class LogTimeseriesFilterFieldItem implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $fastlyFormats = [ - 'field' => null, - 'operator' => null, - 'value' => null + 'title' => null, + 'status' => null, + 'detail' => null, + 'errors' => null ]; /** @@ -99,9 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'field' => 'field', - 'operator' => 'operator', - 'value' => 'value' + 'title' => 'title', + 'status' => 'status', + 'detail' => 'detail', + 'errors' => 'errors' ]; /** @@ -110,9 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'field' => 'setField', - 'operator' => 'setOperator', - 'value' => 'setValue' + 'title' => 'setTitle', + 'status' => 'setStatus', + 'detail' => 'setDetail', + 'errors' => 'setErrors' ]; /** @@ -121,9 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'field' => 'getField', - 'operator' => 'getOperator', - 'value' => 'getValue' + 'title' => 'getTitle', + 'status' => 'getStatus', + 'detail' => 'getDetail', + 'errors' => 'getErrors' ]; /** @@ -167,31 +171,17 @@ public function getModelName() return self::$fastlyModelName; } - const OPERATOR_EQ = 'eq'; - const OPERATOR_ENDS_WITH = 'ends-with'; - const OPERATOR_IN = 'in'; - const OPERATOR_NOT_IN = 'not_in'; - const OPERATOR_GT = 'gt'; - const OPERATOR_GTE = 'gte'; - const OPERATOR_LT = 'lt'; - const OPERATOR_LTE = 'lte'; + const STATUS_400 = 400; /** * Gets allowable values of the enum * * @return string[] */ - public function getOperatorAllowableValues() + public function getStatusAllowableValues() { return [ - self::OPERATOR_EQ, - self::OPERATOR_ENDS_WITH, - self::OPERATOR_IN, - self::OPERATOR_NOT_IN, - self::OPERATOR_GT, - self::OPERATOR_GTE, - self::OPERATOR_LT, - self::OPERATOR_LTE, + self::STATUS_400, ]; } @@ -210,9 +200,10 @@ public function getOperatorAllowableValues() */ public function __construct(array $data = null) { - $this->container['field'] = $data['field'] ?? null; - $this->container['operator'] = $data['operator'] ?? null; - $this->container['value'] = $data['value'] ?? null; + $this->container['title'] = $data['title'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['detail'] = $data['detail'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,15 +215,27 @@ public function listInvalidProperties() { $invalidProperties = []; - $allowedValues = $this->getOperatorAllowableValues(); - if (!is_null($this->container['operator']) && !in_array($this->container['operator'], $allowedValues, true)) { + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { $invalidProperties[] = sprintf( - "invalid value '%s' for 'operator', must be one of '%s'", - $this->container['operator'], + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], implode("', '", $allowedValues) ); } + if ($this->container['detail'] === null) { + $invalidProperties[] = "'detail' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } return $invalidProperties; } @@ -249,83 +252,109 @@ public function valid() /** - * Gets field + * Gets title * - * @return string|null + * @return string */ - public function getField() + public function getTitle() { - return $this->container['field']; + return $this->container['title']; } /** - * Sets field + * Sets title * - * @param string|null $field The log field to which this filter should be applied. + * @param string $title title * * @return self */ - public function setField($field) + public function setTitle($title) { - $this->container['field'] = $field; + $this->container['title'] = $title; return $this; } /** - * Gets operator + * Gets status * - * @return string|null + * @return int */ - public function getOperator() + public function getStatus() { - return $this->container['operator']; + return $this->container['status']; } /** - * Sets operator + * Sets status * - * @param string|null $operator The comparison operator used for this filter. + * @param int $status status * * @return self */ - public function setOperator($operator) + public function setStatus($status) { - $allowedValues = $this->getOperatorAllowableValues(); - if (!is_null($operator) && !in_array($operator, $allowedValues, true)) { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( - "Invalid value '%s' for 'operator', must be one of '%s'", - $operator, + "Invalid value '%s' for 'status', must be one of '%s'", + $status, implode("', '", $allowedValues) ) ); } - $this->container['operator'] = $operator; + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets detail + * + * @return string + */ + public function getDetail() + { + return $this->container['detail']; + } + + /** + * Sets detail + * + * @param string $detail detail + * + * @return self + */ + public function setDetail($detail) + { + $this->container['detail'] = $detail; return $this; } /** - * Gets value + * Gets errors * - * @return \Fastly\Model\LogTimeseriesValueField|null + * @return \Fastly\Model\DdosProtectionErrorErrors[] */ - public function getValue() + public function getErrors() { - return $this->container['value']; + return $this->container['errors']; } /** - * Sets value + * Sets errors * - * @param \Fastly\Model\LogTimeseriesValueField|null $value value + * @param \Fastly\Model\DdosProtectionErrorErrors[] $errors errors * * @return self */ - public function setValue($value) + public function setErrors($errors) { - $this->container['value'] = $value; + + + $this->container['errors'] = $errors; return $this; } diff --git a/lib/Model/DdosProtectionNotAuthorized.php b/lib/Model/DdosProtectionNotAuthorized.php new file mode 100644 index 00000000..acf06276 --- /dev/null +++ b/lib/Model/DdosProtectionNotAuthorized.php @@ -0,0 +1,376 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionNotAuthorized implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_not_authorized'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'title' => 'string', + 'status' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'title' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'title' => 'title', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + const STATUS_403 = 403; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_403, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['title'] = $data['title'] ?? null; + $this->container['status'] = $data['status'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'status', must be one of '%s'", + $this->container['status'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets status + * + * @return int|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param int|null $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionRule.php b/lib/Model/DdosProtectionRule.php index 261bb740..278cf8a2 100644 --- a/lib/Model/DdosProtectionRule.php +++ b/lib/Model/DdosProtectionRule.php @@ -57,7 +57,7 @@ class DdosProtectionRule implements ModelInterface, ArrayAccess, \JsonSerializab 'updated_at' => '\DateTime', 'id' => 'string', 'name' => 'string', - 'action' => '\Fastly\Model\DdosProtectionAction', + 'action' => 'string', 'customer_id' => 'string', 'service_id' => 'string', 'source_ip' => 'string', @@ -236,7 +236,7 @@ public function __construct(array $data = null) $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['action'] = $data['action'] ?? null; + $this->container['action'] = $data['action'] ?? 'default'; $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['source_ip'] = $data['source_ip'] ?? null; @@ -370,7 +370,7 @@ public function setName($name) /** * Gets action * - * @return \Fastly\Model\DdosProtectionAction|null + * @return string|null */ public function getAction() { @@ -380,7 +380,7 @@ public function getAction() /** * Sets action * - * @param \Fastly\Model\DdosProtectionAction|null $action action + * @param string|null $action Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. * * @return self */ diff --git a/lib/Model/DdosProtectionRuleAllOf.php b/lib/Model/DdosProtectionRuleAllOf.php index 3ed12cf4..109b4ad7 100644 --- a/lib/Model/DdosProtectionRuleAllOf.php +++ b/lib/Model/DdosProtectionRuleAllOf.php @@ -55,7 +55,7 @@ class DdosProtectionRuleAllOf implements ModelInterface, ArrayAccess, \JsonSeria protected static $fastlyTypes = [ 'id' => 'string', 'name' => 'string', - 'action' => '\Fastly\Model\DdosProtectionAction', + 'action' => 'string', 'customer_id' => 'string', 'service_id' => 'string', 'source_ip' => 'string', @@ -224,7 +224,7 @@ public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['action'] = $data['action'] ?? null; + $this->container['action'] = $data['action'] ?? 'default'; $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['source_ip'] = $data['source_ip'] ?? null; @@ -310,7 +310,7 @@ public function setName($name) /** * Gets action * - * @return \Fastly\Model\DdosProtectionAction|null + * @return string|null */ public function getAction() { @@ -320,7 +320,7 @@ public function getAction() /** * Sets action * - * @param \Fastly\Model\DdosProtectionAction|null $action action + * @param string|null $action Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. * * @return self */ diff --git a/lib/Model/LogTimeseriesGetResponseMetaFilters.php b/lib/Model/DdosProtectionRulePatch.php similarity index 84% rename from lib/Model/LogTimeseriesGetResponseMetaFilters.php rename to lib/Model/DdosProtectionRulePatch.php index d2ea22f2..43c8e674 100644 --- a/lib/Model/LogTimeseriesGetResponseMetaFilters.php +++ b/lib/Model/DdosProtectionRulePatch.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class LogTimeseriesGetResponseMetaFilters implements ModelInterface, ArrayAccess, \JsonSerializable +class DdosProtectionRulePatch implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -46,7 +45,7 @@ class LogTimeseriesGetResponseMetaFilters implements ModelInterface, ArrayAccess * * @var string */ - protected static $fastlyModelName = 'log_timeseries_get_response_meta_filters'; + protected static $fastlyModelName = 'ddos_protection_rule_patch'; /** * Array of property to type mappings. Used for (de)serialization @@ -54,7 +53,7 @@ class LogTimeseriesGetResponseMetaFilters implements ModelInterface, ArrayAccess * @var string[] */ protected static $fastlyTypes = [ - 'filter_fields' => '\Fastly\Model\LogTimeseriesFilterFieldItem[]' + 'action' => 'string' ]; /** @@ -65,7 +64,7 @@ class LogTimeseriesGetResponseMetaFilters implements ModelInterface, ArrayAccess * @psalm-var array */ protected static $fastlyFormats = [ - 'filter_fields' => null + 'action' => null ]; /** @@ -95,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'filter_fields' => 'filter_fields' + 'action' => 'action' ]; /** @@ -104,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'filter_fields' => 'setFilterFields' + 'action' => 'setAction' ]; /** @@ -113,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'filter_fields' => 'getFilterFields' + 'action' => 'getAction' ]; /** @@ -173,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['filter_fields'] = $data['filter_fields'] ?? null; + $this->container['action'] = $data['action'] ?? 'default'; } /** @@ -201,25 +200,25 @@ public function valid() /** - * Gets filter_fields + * Gets action * - * @return \Fastly\Model\LogTimeseriesFilterFieldItem[]|null + * @return string|null */ - public function getFilterFields() + public function getAction() { - return $this->container['filter_fields']; + return $this->container['action']; } /** - * Sets filter_fields + * Sets action * - * @param \Fastly\Model\LogTimeseriesFilterFieldItem[]|null $filter_fields filter_fields + * @param string|null $action Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. * * @return self */ - public function setFilterFields($filter_fields) + public function setAction($action) { - $this->container['filter_fields'] = $filter_fields; + $this->container['action'] = $action; return $this; } diff --git a/lib/Model/DdosProtectionTrafficAttribute.php b/lib/Model/DdosProtectionTrafficAttribute.php deleted file mode 100644 index 00301d84..00000000 --- a/lib/Model/DdosProtectionTrafficAttribute.php +++ /dev/null @@ -1,72 +0,0 @@ - '\Fastly\Model\LogTimeseriesResult[]', - 'meta' => '\Fastly\Model\LogTimeseriesGetResponseMeta' + 'data' => '\Fastly\Model\AttackReport[]', + 'meta' => '\Fastly\Model\ListAttackReportMeta' ]; /** @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\LogTimeseriesResult[]|null + * @return \Fastly\Model\AttackReport[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\LogTimeseriesResult[]|null $data data + * @param \Fastly\Model\AttackReport[]|null $data data * * @return self */ @@ -232,7 +232,7 @@ public function setData($data) /** * Gets meta * - * @return \Fastly\Model\LogTimeseriesGetResponseMeta|null + * @return \Fastly\Model\ListAttackReportMeta|null */ public function getMeta() { @@ -242,7 +242,7 @@ public function getMeta() /** * Sets meta * - * @param \Fastly\Model\LogTimeseriesGetResponseMeta|null $meta meta + * @param \Fastly\Model\ListAttackReportMeta|null $meta meta * * @return self */ diff --git a/lib/Model/LogTimeseriesValueField.php b/lib/Model/ListAttackReportMeta.php similarity index 86% rename from lib/Model/LogTimeseriesValueField.php rename to lib/Model/ListAttackReportMeta.php index a0b53d13..f83f7156 100644 --- a/lib/Model/LogTimeseriesValueField.php +++ b/lib/Model/ListAttackReportMeta.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class LogTimeseriesValueField implements ModelInterface, ArrayAccess, \JsonSerializable +class ListAttackReportMeta implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class LogTimeseriesValueField implements ModelInterface, ArrayAccess, \JsonSeria * * @var string */ - protected static $fastlyModelName = 'log-timeseries-value-field'; + protected static $fastlyModelName = 'ListAttackReport_meta'; /** * Array of property to type mappings. Used for (de)serialization @@ -53,7 +54,7 @@ class LogTimeseriesValueField implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $fastlyTypes = [ - + 'total' => 'int' ]; /** @@ -64,7 +65,7 @@ class LogTimeseriesValueField implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $fastlyFormats = [ - + 'total' => null ]; /** @@ -94,7 +95,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - + 'total' => 'total' ]; /** @@ -103,7 +104,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - + 'total' => 'setTotal' ]; /** @@ -112,7 +113,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - + 'total' => 'getTotal' ]; /** @@ -172,6 +173,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['total'] = $data['total'] ?? null; } /** @@ -197,6 +199,30 @@ public function valid() return count($this->listInvalidProperties()) === 0; } + + /** + * Gets total + * + * @return int|null + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param int|null $total The count of attack reports matching the filter. + * + * @return self + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LogTimeseriesResultDimensions.php b/lib/Model/ListSignalReport.php similarity index 89% rename from lib/Model/LogTimeseriesResultDimensions.php rename to lib/Model/ListSignalReport.php index f706320b..1bda8755 100644 --- a/lib/Model/LogTimeseriesResultDimensions.php +++ b/lib/Model/ListSignalReport.php @@ -1,6 +1,6 @@ 'string' + 'data' => '\Fastly\Model\SignalReport[]' ]; /** @@ -64,7 +64,7 @@ class LogTimeseriesResultDimensions implements ModelInterface, ArrayAccess, \Jso * @psalm-var array */ protected static $fastlyFormats = [ - 'time' => null + 'data' => null ]; /** @@ -94,7 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'time' => 'time' + 'data' => 'data' ]; /** @@ -103,7 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'time' => 'setTime' + 'data' => 'setData' ]; /** @@ -112,7 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'time' => 'getTime' + 'data' => 'getData' ]; /** @@ -172,7 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['time'] = $data['time'] ?? null; + $this->container['data'] = $data['data'] ?? null; } /** @@ -200,25 +200,25 @@ public function valid() /** - * Gets time + * Gets data * - * @return string|null + * @return \Fastly\Model\SignalReport[]|null */ - public function getTime() + public function getData() { - return $this->container['time']; + return $this->container['data']; } /** - * Sets time + * Sets data * - * @param string|null $time time + * @param \Fastly\Model\SignalReport[]|null $data data * * @return self */ - public function setTime($time) + public function setData($data) { - $this->container['time'] = $time; + $this->container['data'] = $data; return $this; } diff --git a/lib/Model/PoolResponse.php b/lib/Model/PoolResponse.php index bae93c52..ef5f2f3c 100644 --- a/lib/Model/PoolResponse.php +++ b/lib/Model/PoolResponse.php @@ -948,7 +948,7 @@ public function getBetweenBytesTimeout() /** * Sets between_bytes_timeout * - * @param string|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. + * @param string|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. * * @return self */ diff --git a/lib/Model/PoolResponseCommon.php b/lib/Model/PoolResponseCommon.php index ec3cdc8a..515cfe86 100644 --- a/lib/Model/PoolResponseCommon.php +++ b/lib/Model/PoolResponseCommon.php @@ -242,7 +242,7 @@ public function getBetweenBytesTimeout() /** * Sets between_bytes_timeout * - * @param string|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. + * @param string|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. * * @return self */ diff --git a/lib/Model/PoolResponsePost.php b/lib/Model/PoolResponsePost.php index 2cf636e9..4267edb9 100644 --- a/lib/Model/PoolResponsePost.php +++ b/lib/Model/PoolResponsePost.php @@ -948,7 +948,7 @@ public function getBetweenBytesTimeout() /** * Sets between_bytes_timeout * - * @param string|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`. + * @param string|null $between_bytes_timeout Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`. * * @return self */ diff --git a/lib/Model/SignalReport.php b/lib/Model/SignalReport.php new file mode 100644 index 00000000..d7fb7024 --- /dev/null +++ b/lib/Model/SignalReport.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SignalReport implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'SignalReport'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'name' => 'string', + 'display_name' => 'string', + 'count' => 'int', + 'top_workspaces' => '\Fastly\Model\TopWorkspace[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'name' => null, + 'display_name' => null, + 'count' => null, + 'top_workspaces' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'display_name' => 'display_name', + 'count' => 'count', + 'top_workspaces' => 'top_workspaces' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'display_name' => 'setDisplayName', + 'count' => 'setCount', + 'top_workspaces' => 'setTopWorkspaces' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'display_name' => 'getDisplayName', + 'count' => 'getCount', + 'top_workspaces' => 'getTopWorkspaces' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = $data['name'] ?? null; + $this->container['display_name'] = $data['display_name'] ?? null; + $this->container['count'] = $data['count'] ?? null; + $this->container['top_workspaces'] = $data['top_workspaces'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the attack type. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() + { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name Display name of the attack type. + * + * @return self + */ + public function setDisplayName($display_name) + { + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets count + * + * @return int|null + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int|null $count Total count of attacks of this type. + * + * @return self + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets top_workspaces + * + * @return \Fastly\Model\TopWorkspace[]|null + */ + public function getTopWorkspaces() + { + return $this->container['top_workspaces']; + } + + /** + * Sets top_workspaces + * + * @param \Fastly\Model\TopWorkspace[]|null $top_workspaces Top workspaces affected by this attack type. + * + * @return self + */ + public function setTopWorkspaces($top_workspaces) + { + $this->container['top_workspaces'] = $top_workspaces; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TimeseriesGetResponse.php b/lib/Model/TimeseriesGetResponse.php new file mode 100644 index 00000000..2886bd02 --- /dev/null +++ b/lib/Model/TimeseriesGetResponse.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TimeseriesGetResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'timeseries-get-response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\TimeseriesResult[]', + 'meta' => '\Fastly\Model\TimeseriesMeta' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null, + 'meta' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData', + 'meta' => 'getMeta' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\TimeseriesResult[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\TimeseriesResult[]|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return \Fastly\Model\TimeseriesMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\TimeseriesMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/LogTimeseriesGetResponseMeta.php b/lib/Model/TimeseriesMeta.php similarity index 73% rename from lib/Model/LogTimeseriesGetResponseMeta.php rename to lib/Model/TimeseriesMeta.php index af947473..3489e467 100644 --- a/lib/Model/LogTimeseriesGetResponseMeta.php +++ b/lib/Model/TimeseriesMeta.php @@ -1,6 +1,6 @@ 'string', - 'start' => 'string', - 'end' => 'string', + 'from' => 'string', + 'to' => 'string', 'granularity' => 'string', - 'filters' => '\Fastly\Model\LogTimeseriesGetResponseMetaFilters' + 'limit' => 'string' ]; /** @@ -68,11 +67,10 @@ class LogTimeseriesGetResponseMeta implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $fastlyFormats = [ - 'service_id' => null, - 'start' => null, - 'end' => null, + 'from' => null, + 'to' => null, 'granularity' => null, - 'filters' => null + 'limit' => null ]; /** @@ -102,11 +100,10 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'service_id' => 'service_id', - 'start' => 'start', - 'end' => 'end', + 'from' => 'from', + 'to' => 'to', 'granularity' => 'granularity', - 'filters' => 'filters' + 'limit' => 'limit' ]; /** @@ -115,11 +112,10 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'service_id' => 'setServiceId', - 'start' => 'setStart', - 'end' => 'setEnd', + 'from' => 'setFrom', + 'to' => 'setTo', 'granularity' => 'setGranularity', - 'filters' => 'setFilters' + 'limit' => 'setLimit' ]; /** @@ -128,11 +124,10 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'service_id' => 'getServiceId', - 'start' => 'getStart', - 'end' => 'getEnd', + 'from' => 'getFrom', + 'to' => 'getTo', 'granularity' => 'getGranularity', - 'filters' => 'getFilters' + 'limit' => 'getLimit' ]; /** @@ -192,11 +187,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['service_id'] = $data['service_id'] ?? null; - $this->container['start'] = $data['start'] ?? null; - $this->container['end'] = $data['end'] ?? null; + $this->container['from'] = $data['from'] ?? null; + $this->container['to'] = $data['to'] ?? null; $this->container['granularity'] = $data['granularity'] ?? null; - $this->container['filters'] = $data['filters'] ?? null; + $this->container['limit'] = $data['limit'] ?? null; } /** @@ -224,73 +218,49 @@ public function valid() /** - * Gets service_id + * Gets from * * @return string|null */ - public function getServiceId() + public function getFrom() { - return $this->container['service_id']; + return $this->container['from']; } /** - * Sets service_id + * Sets from * - * @param string|null $service_id ID of the service for which data was returned. + * @param string|null $from Start time for the query as supplied in the request. * * @return self */ - public function setServiceId($service_id) + public function setFrom($from) { - $this->container['service_id'] = $service_id; + $this->container['from'] = $from; return $this; } /** - * Gets start + * Gets to * * @return string|null */ - public function getStart() + public function getTo() { - return $this->container['start']; + return $this->container['to']; } /** - * Sets start + * Sets to * - * @param string|null $start Start time for the query as supplied in the request. + * @param string|null $to End time for the query as supplied in the request. * * @return self */ - public function setStart($start) + public function setTo($to) { - $this->container['start'] = $start; - - return $this; - } - - /** - * Gets end - * - * @return string|null - */ - public function getEnd() - { - return $this->container['end']; - } - - /** - * Sets end - * - * @param string|null $end End time for the query as supplied in the request. - * - * @return self - */ - public function setEnd($end) - { - $this->container['end'] = $end; + $this->container['to'] = $to; return $this; } @@ -320,25 +290,25 @@ public function setGranularity($granularity) } /** - * Gets filters + * Gets limit * - * @return \Fastly\Model\LogTimeseriesGetResponseMetaFilters|null + * @return string|null */ - public function getFilters() + public function getLimit() { - return $this->container['filters']; + return $this->container['limit']; } /** - * Sets filters + * Sets limit * - * @param \Fastly\Model\LogTimeseriesGetResponseMetaFilters|null $filters filters + * @param string|null $limit Maximum number of results returned in the request. * * @return self */ - public function setFilters($filters) + public function setLimit($limit) { - $this->container['filters'] = $filters; + $this->container['limit'] = $limit; return $this; } diff --git a/lib/Model/LogTimeseriesResult.php b/lib/Model/TimeseriesResult.php similarity index 93% rename from lib/Model/LogTimeseriesResult.php rename to lib/Model/TimeseriesResult.php index 22e6c494..cbba11fe 100644 --- a/lib/Model/LogTimeseriesResult.php +++ b/lib/Model/TimeseriesResult.php @@ -1,6 +1,6 @@ '\Fastly\Model\LogTimeseriesResultDimensions', + 'dimensions' => 'array', 'values' => 'array' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets dimensions * - * @return \Fastly\Model\LogTimeseriesResultDimensions|null + * @return array|null */ public function getDimensions() { @@ -218,7 +218,7 @@ public function getDimensions() /** * Sets dimensions * - * @param \Fastly\Model\LogTimeseriesResultDimensions|null $dimensions dimensions + * @param array|null $dimensions An object containing each requested dimension and time as properties. * * @return self */ @@ -242,7 +242,7 @@ public function getValues() /** * Sets values * - * @param array|null $values values + * @param array|null $values An object containing each requested series as a property. * * @return self */ diff --git a/lib/Model/TopWorkspace.php b/lib/Model/TopWorkspace.php new file mode 100644 index 00000000..6a62cdc0 --- /dev/null +++ b/lib/Model/TopWorkspace.php @@ -0,0 +1,375 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TopWorkspace implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'TopWorkspace'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'name' => 'string', + 'count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'name' => null, + 'count' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'count' => 'count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'count' => 'setCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'count' => 'getCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['count'] = $data['count'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id ID of the workspace. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the workspace. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets count + * + * @return int|null + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int|null $count Count of attacks on this workspace for the specific attack type. + * + * @return self + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/sig.json b/sig.json index 05e32a55..53345efb 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "bb3cb969", "D": "6e6e26c6"} +{"G": "bb3cb969", "D": "3441d86a"} From d65b35f4f159f5fffa60cdace28a436ce50a7164 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 31 Oct 2025 17:14:15 +0000 Subject: [PATCH 7/8] Generated v12.0.0 --- CHANGELOG.md | 23 + README.md | 22 +- docs/Api/DdosProtectionApi.md | 2 + docs/Api/DmDomainsApi.md | 209 ++ docs/Api/DomainOwnershipsApi.md | 4 +- docs/Api/HealthcheckApi.md | 8 +- docs/Api/IamRolesApi.md | 256 +- docs/Api/InvitationsApi.md | 2 +- docs/Api/KvStoreApi.md | 4 +- docs/Api/KvStoreItemApi.md | 4 +- docs/Api/LoggingHttpsApi.md | 4 + docs/Api/ProductApiDiscoveryApi.md | 157 ++ docs/Api/SecretStoreApi.md | 4 +- docs/Api/SecretStoreItemApi.md | 4 +- docs/Api/ServiceAuthorizationsApi.md | 4 +- docs/Api/UserApi.md | 4 + .../ApiDiscoveryResponseBodyGetAllServices.md | 13 + docs/Model/ApiDiscoveryResponseCustomer.md | 10 + .../ApiDiscoveryResponseCustomerCustomer.md | 11 + docs/Model/ApiDiscoveryResponseEnable.md | 12 + .../ApiDiscoveryResponseEnabledServices.md | 10 + docs/Model/ApiDiscoveryResponseLinks.md | 10 + ...ApiDiscoveryResponseLinksGetAllServices.md | 10 + ...scoveryResponseLinksGetAllServicesLinks.md | 10 + docs/Model/ApiDiscoveryResponseLinksLinks.md | 10 + docs/Model/ApiDiscoveryResponseProduct.md | 10 + .../ApiDiscoveryResponseProductProduct.md | 11 + docs/Model/ApiDiscoveryResponseService.md | 10 + ... => ApiDiscoveryResponseServiceService.md} | 2 +- docs/Model/BotManagementResponseBodyEnable.md | 2 +- docs/Model/BotManagementResponseService.md | 2 +- .../BrotliCompressionResponseBodyEnable.md | 2 +- .../Model/BrotliCompressionResponseService.md | 2 +- docs/Model/DdosProtectionResponseConfigure.md | 2 +- docs/Model/DdosProtectionResponseEnable.md | 2 +- docs/Model/DdosProtectionResponseService.md | 2 +- docs/Model/DdosProtectionRuleWithStats.md | 23 + .../Model/DdosProtectionRuleWithStatsAllOf.md | 10 + docs/Model/DdosProtectionTrafficStats.md | 1 + docs/Model/DdosProtectionTrafficStatsAllOf.md | 1 + .../DomainInspectorResponseBodyEnable.md | 2 +- docs/Model/DomainInspectorResponseService.md | 2 +- docs/Model/FanoutResponseBodyEnable.md | 2 +- docs/Model/FanoutResponseService.md | 2 +- docs/Model/Healthcheck.md | 2 +- docs/Model/HealthcheckResponse.md | 2 +- docs/Model/IamRole.md | 17 - docs/Model/IamRoleAllOf.md | 15 - docs/Model/IamV1RoleListResponse.md | 12 + docs/Model/IamV1RoleResponse.md | 13 + .../Model/ImageOptimizerResponseBodyEnable.md | 2 +- docs/Model/ImageOptimizerResponseService.md | 2 +- docs/Model/InlineResponse20010.md | 10 + docs/Model/InlineResponse2003.md | 4 +- docs/Model/InlineResponse2004.md | 3 +- docs/Model/InlineResponse2005.md | 3 +- docs/Model/InlineResponse2006.md | 2 +- docs/Model/InlineResponse2007.md | 2 +- docs/Model/InlineResponse2008.md | 2 +- docs/Model/InlineResponse2009.md | 3 +- docs/Model/InvitationDataAttributes.md | 1 + .../LogExplorerInsightsResponseBodyEnable.md | 2 +- .../LogExplorerInsightsResponseService.md | 2 +- docs/Model/LoggingHttpsAdditional.md | 1 + docs/Model/LoggingHttpsResponse.md | 1 + docs/Model/NgwafResponseConfigure.md | 2 +- docs/Model/NgwafResponseEnable.md | 2 +- docs/Model/NgwafResponseService.md | 2 +- .../OriginInspectorResponseBodyEnable.md | 2 +- docs/Model/OriginInspectorResponseService.md | 2 +- docs/Model/RealtimeEntryAggregated.md | 1 + docs/Model/RealtimeMeasurements.md | 1 + docs/Model/RequestBodyForCreate.md | 12 + docs/Model/RequestBodyForUpdate.md | 11 + docs/Model/Results.md | 1 + docs/Model/SchemasUserResponse.md | 1 + docs/Model/SuccessfulResponseAsObject.md | 17 + docs/Model/SuccessfulResponseAsObjectAllOf.md | 15 + docs/Model/User.md | 1 + docs/Model/UserResponse.md | 1 + docs/Model/WebsocketsResponseBodyEnable.md | 2 +- docs/Model/WebsocketsResponseService.md | 2 +- lib/Api/DdosProtectionApi.php | 17 + lib/Api/DmDomainsApi.php | 1802 ++++++++++++++ lib/Api/DomainOwnershipsApi.php | 14 +- lib/Api/HealthcheckApi.php | 34 +- lib/Api/IamRolesApi.php | 2092 +---------------- lib/Api/KvStoreApi.php | 14 +- lib/Api/KvStoreItemApi.php | 14 +- lib/Api/LoggingHttpsApi.php | 20 + lib/Api/ProductApiDiscoveryApi.php | 1353 +++++++++++ lib/Api/SecretStoreApi.php | 14 +- lib/Api/SecretStoreItemApi.php | 14 +- lib/Api/ServiceAuthorizationsApi.php | 14 +- lib/Api/UserApi.php | 20 + lib/Configuration.php | 4 +- ...ApiDiscoveryResponseBodyGetAllServices.php | 404 ++++ lib/Model/ApiDiscoveryResponseCustomer.php | 314 +++ .../ApiDiscoveryResponseCustomerCustomer.php | 344 +++ lib/Model/ApiDiscoveryResponseEnable.php | 374 +++ .../ApiDiscoveryResponseEnabledServices.php | 314 +++ lib/Model/ApiDiscoveryResponseLinks.php | 314 +++ ...piDiscoveryResponseLinksGetAllServices.php | 314 +++ ...coveryResponseLinksGetAllServicesLinks.php | 314 +++ lib/Model/ApiDiscoveryResponseLinksLinks.php | 314 +++ lib/Model/ApiDiscoveryResponseProduct.php | 314 +++ .../ApiDiscoveryResponseProductProduct.php | 344 +++ lib/Model/ApiDiscoveryResponseService.php | 314 +++ ...=> ApiDiscoveryResponseServiceService.php} | 8 +- lib/Model/BotManagementResponseBodyEnable.php | 6 +- lib/Model/BotManagementResponseService.php | 6 +- .../BrotliCompressionResponseBodyEnable.php | 6 +- .../BrotliCompressionResponseService.php | 6 +- lib/Model/DdosProtectionResponseConfigure.php | 6 +- lib/Model/DdosProtectionResponseEnable.php | 6 +- lib/Model/DdosProtectionResponseService.php | 6 +- lib/Model/DdosProtectionRuleWithStats.php | 704 ++++++ .../DdosProtectionRuleWithStatsAllOf.php | 314 +++ lib/Model/DdosProtectionTrafficStats.php | 42 +- lib/Model/DdosProtectionTrafficStatsAllOf.php | 42 +- .../DomainInspectorResponseBodyEnable.php | 6 +- lib/Model/DomainInspectorResponseService.php | 6 +- lib/Model/FanoutResponseBodyEnable.php | 6 +- lib/Model/FanoutResponseService.php | 6 +- lib/Model/Healthcheck.php | 18 +- lib/Model/HealthcheckResponse.php | 18 +- lib/Model/IamV1RoleListResponse.php | 375 +++ ...IamRoleAllOf.php => IamV1RoleResponse.php} | 103 +- .../ImageOptimizerResponseBodyEnable.php | 6 +- lib/Model/ImageOptimizerResponseService.php | 6 +- lib/Model/InlineResponse20010.php | 314 +++ lib/Model/InlineResponse2003.php | 16 +- lib/Model/InlineResponse2004.php | 58 +- lib/Model/InlineResponse2005.php | 58 +- lib/Model/InlineResponse2006.php | 6 +- lib/Model/InlineResponse2007.php | 6 +- lib/Model/InlineResponse2008.php | 6 +- lib/Model/InlineResponse2009.php | 44 +- lib/Model/InvitationDataAttributes.php | 30 + .../LogExplorerInsightsResponseBodyEnable.php | 6 +- .../LogExplorerInsightsResponseService.php | 6 +- lib/Model/LoggingHttpsAdditional.php | 40 +- lib/Model/LoggingHttpsResponse.php | 30 + lib/Model/NgwafResponseConfigure.php | 6 +- lib/Model/NgwafResponseEnable.php | 6 +- lib/Model/NgwafResponseService.php | 6 +- .../OriginInspectorResponseBodyEnable.php | 6 +- lib/Model/OriginInspectorResponseService.php | 6 +- lib/Model/RealtimeEntryAggregated.php | 40 +- lib/Model/RealtimeMeasurements.php | 40 +- lib/Model/RequestBodyForCreate.php | 378 +++ lib/Model/RequestBodyForUpdate.php | 345 +++ lib/Model/Results.php | 30 + lib/Model/RoleUser.php | 8 +- lib/Model/SchemasUserResponse.php | 30 + ...ole.php => SuccessfulResponseAsObject.php} | 119 +- lib/Model/SuccessfulResponseAsObjectAllOf.php | 464 ++++ lib/Model/User.php | 30 + lib/Model/UserResponse.php | 30 + lib/Model/WebsocketsResponseBodyEnable.php | 6 +- lib/Model/WebsocketsResponseService.php | 6 +- sig.json | 2 +- 162 files changed, 11681 insertions(+), 2676 deletions(-) create mode 100644 docs/Api/DmDomainsApi.md create mode 100644 docs/Api/ProductApiDiscoveryApi.md create mode 100644 docs/Model/ApiDiscoveryResponseBodyGetAllServices.md create mode 100644 docs/Model/ApiDiscoveryResponseCustomer.md create mode 100644 docs/Model/ApiDiscoveryResponseCustomerCustomer.md create mode 100644 docs/Model/ApiDiscoveryResponseEnable.md create mode 100644 docs/Model/ApiDiscoveryResponseEnabledServices.md create mode 100644 docs/Model/ApiDiscoveryResponseLinks.md create mode 100644 docs/Model/ApiDiscoveryResponseLinksGetAllServices.md create mode 100644 docs/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.md create mode 100644 docs/Model/ApiDiscoveryResponseLinksLinks.md create mode 100644 docs/Model/ApiDiscoveryResponseProduct.md create mode 100644 docs/Model/ApiDiscoveryResponseProductProduct.md create mode 100644 docs/Model/ApiDiscoveryResponseService.md rename docs/Model/{BotManagementResponseServiceService.md => ApiDiscoveryResponseServiceService.md} (88%) create mode 100644 docs/Model/DdosProtectionRuleWithStats.md create mode 100644 docs/Model/DdosProtectionRuleWithStatsAllOf.md delete mode 100644 docs/Model/IamRole.md delete mode 100644 docs/Model/IamRoleAllOf.md create mode 100644 docs/Model/IamV1RoleListResponse.md create mode 100644 docs/Model/IamV1RoleResponse.md create mode 100644 docs/Model/InlineResponse20010.md create mode 100644 docs/Model/RequestBodyForCreate.md create mode 100644 docs/Model/RequestBodyForUpdate.md create mode 100644 docs/Model/SuccessfulResponseAsObject.md create mode 100644 docs/Model/SuccessfulResponseAsObjectAllOf.md create mode 100644 lib/Api/DmDomainsApi.php create mode 100644 lib/Api/ProductApiDiscoveryApi.php create mode 100644 lib/Model/ApiDiscoveryResponseBodyGetAllServices.php create mode 100644 lib/Model/ApiDiscoveryResponseCustomer.php create mode 100644 lib/Model/ApiDiscoveryResponseCustomerCustomer.php create mode 100644 lib/Model/ApiDiscoveryResponseEnable.php create mode 100644 lib/Model/ApiDiscoveryResponseEnabledServices.php create mode 100644 lib/Model/ApiDiscoveryResponseLinks.php create mode 100644 lib/Model/ApiDiscoveryResponseLinksGetAllServices.php create mode 100644 lib/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.php create mode 100644 lib/Model/ApiDiscoveryResponseLinksLinks.php create mode 100644 lib/Model/ApiDiscoveryResponseProduct.php create mode 100644 lib/Model/ApiDiscoveryResponseProductProduct.php create mode 100644 lib/Model/ApiDiscoveryResponseService.php rename lib/Model/{BotManagementResponseServiceService.php => ApiDiscoveryResponseServiceService.php} (96%) create mode 100644 lib/Model/DdosProtectionRuleWithStats.php create mode 100644 lib/Model/DdosProtectionRuleWithStatsAllOf.php create mode 100644 lib/Model/IamV1RoleListResponse.php rename lib/Model/{IamRoleAllOf.php => IamV1RoleResponse.php} (75%) create mode 100644 lib/Model/InlineResponse20010.php create mode 100644 lib/Model/RequestBodyForCreate.php create mode 100644 lib/Model/RequestBodyForUpdate.php rename lib/Model/{IamRole.php => SuccessfulResponseAsObject.php} (76%) create mode 100644 lib/Model/SuccessfulResponseAsObjectAllOf.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d6c4b3f..22ae3e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [v12.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v12.0.0) (2025-10-31) + +**Bug fixes:** + +- fix(dictionary): Correct example dictionary name to use valid characters + +**Enhancements:** + +- feat(iam_roles): Add new IAM Roles API. +- feat(api_discovery): Add new API Discovery API. +- feat(realtime, historical): Add new metric `api_discovery_requests_count`. +- feat(user): Add the ability to assign multiple roles to users. +- feat(healthcheck): Clarify the valid range for the `check_interval` parameter. +- feat(ddos_protection): Add `traffic_percentage` field to DDoS Protection traffic statistics responses. +- feat(ddos_protection): Update `ddos-protection-event-rule-list` with `include=traffic_stats` parameter for embedded traffic statistics. +- feat(logging_https): Add `period` parameter to the logging HTTPS endpoint. + +**Documentation:** + +- doc(sudo): Spelling fixes. +- doc(enabled-products): Add support for product ID `api_discovery`. + + ## [v11.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v11.0.0) (2025-08-28) **Breaking Changes:** diff --git a/README.md b/README.md index 511a5ff1..4a5e42a0 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,11 @@ Class | Method | Description [*DirectorBackendApi*](docs/Api/DirectorBackendApi.md) | [**createDirectorBackend**](docs/Api/DirectorBackendApi.md#createdirectorbackend) | Create a director-backend relationship [*DirectorBackendApi*](docs/Api/DirectorBackendApi.md) | [**deleteDirectorBackend**](docs/Api/DirectorBackendApi.md#deletedirectorbackend) | Delete a director-backend relationship [*DirectorBackendApi*](docs/Api/DirectorBackendApi.md) | [**getDirectorBackend**](docs/Api/DirectorBackendApi.md#getdirectorbackend) | Get a director-backend relationship +[*DmDomainsApi*](docs/Api/DmDomainsApi.md) | [**createDmDomain**](docs/Api/DmDomainsApi.md#createdmdomain) | Create a domain +[*DmDomainsApi*](docs/Api/DmDomainsApi.md) | [**deleteDmDomain**](docs/Api/DmDomainsApi.md#deletedmdomain) | Delete a domain +[*DmDomainsApi*](docs/Api/DmDomainsApi.md) | [**getDmDomain**](docs/Api/DmDomainsApi.md#getdmdomain) | Get a domain +[*DmDomainsApi*](docs/Api/DmDomainsApi.md) | [**listDmDomains**](docs/Api/DmDomainsApi.md#listdmdomains) | List domains +[*DmDomainsApi*](docs/Api/DmDomainsApi.md) | [**updateDmDomain**](docs/Api/DmDomainsApi.md#updatedmdomain) | Update a domain [*DomainApi*](docs/Api/DomainApi.md) | [**checkDomain**](docs/Api/DomainApi.md#checkdomain) | Validate DNS configuration for a single domain on a service [*DomainApi*](docs/Api/DomainApi.md) | [**checkDomains**](docs/Api/DomainApi.md#checkdomains) | Validate DNS configuration for all domains on a service [*DomainApi*](docs/Api/DomainApi.md) | [**createDomain**](docs/Api/DomainApi.md#createdomain) | Add a domain name to a service @@ -232,14 +237,8 @@ Class | Method | Description [*Http3Api*](docs/Api/Http3Api.md) | [**deleteHttp3**](docs/Api/Http3Api.md#deletehttp3) | Disable support for HTTP/3 [*Http3Api*](docs/Api/Http3Api.md) | [**getHttp3**](docs/Api/Http3Api.md#gethttp3) | Get HTTP/3 status [*IamPermissionsApi*](docs/Api/IamPermissionsApi.md) | [**listPermissions**](docs/Api/IamPermissionsApi.md#listpermissions) | List permissions -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**addRolePermissions**](docs/Api/IamRolesApi.md#addrolepermissions) | Add permissions to a role -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**createARole**](docs/Api/IamRolesApi.md#createarole) | Create a role -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**deleteARole**](docs/Api/IamRolesApi.md#deletearole) | Delete a role -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**getARole**](docs/Api/IamRolesApi.md#getarole) | Get a role -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**listRolePermissions**](docs/Api/IamRolesApi.md#listrolepermissions) | List permissions in a role -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**listRoles**](docs/Api/IamRolesApi.md#listroles) | List roles -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**removeRolePermissions**](docs/Api/IamRolesApi.md#removerolepermissions) | Remove permissions from a role -[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**updateARole**](docs/Api/IamRolesApi.md#updatearole) | Update a role +[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**iamV1RolesGet**](docs/Api/IamRolesApi.md#iamv1rolesget) | Get IAM role by ID +[*IamRolesApi*](docs/Api/IamRolesApi.md) | [**iamV1RolesList**](docs/Api/IamRolesApi.md#iamv1roleslist) | List IAM roles [*IamServiceGroupsApi*](docs/Api/IamServiceGroupsApi.md) | [**addServiceGroupServices**](docs/Api/IamServiceGroupsApi.md#addservicegroupservices) | Add services in a service group [*IamServiceGroupsApi*](docs/Api/IamServiceGroupsApi.md) | [**createAServiceGroup**](docs/Api/IamServiceGroupsApi.md#createaservicegroup) | Create a service group [*IamServiceGroupsApi*](docs/Api/IamServiceGroupsApi.md) | [**deleteAServiceGroup**](docs/Api/IamServiceGroupsApi.md#deleteaservicegroup) | Delete a service group @@ -450,6 +449,10 @@ Class | Method | Description [*ProductAiAcceleratorApi*](docs/Api/ProductAiAcceleratorApi.md) | [**disableProductAiAccelerator**](docs/Api/ProductAiAcceleratorApi.md#disableproductaiaccelerator) | Disable product [*ProductAiAcceleratorApi*](docs/Api/ProductAiAcceleratorApi.md) | [**enableAiAccelerator**](docs/Api/ProductAiAcceleratorApi.md#enableaiaccelerator) | Enable product [*ProductAiAcceleratorApi*](docs/Api/ProductAiAcceleratorApi.md) | [**getAiAccelerator**](docs/Api/ProductAiAcceleratorApi.md#getaiaccelerator) | Get product enablement status +[*ProductApiDiscoveryApi*](docs/Api/ProductApiDiscoveryApi.md) | [**disableProductApiDiscovery**](docs/Api/ProductApiDiscoveryApi.md#disableproductapidiscovery) | Disable product +[*ProductApiDiscoveryApi*](docs/Api/ProductApiDiscoveryApi.md) | [**enableProductApiDiscovery**](docs/Api/ProductApiDiscoveryApi.md#enableproductapidiscovery) | Enable product +[*ProductApiDiscoveryApi*](docs/Api/ProductApiDiscoveryApi.md) | [**getProductApiDiscovery**](docs/Api/ProductApiDiscoveryApi.md#getproductapidiscovery) | Get product enablement status +[*ProductApiDiscoveryApi*](docs/Api/ProductApiDiscoveryApi.md) | [**getServicesProductApiDiscovery**](docs/Api/ProductApiDiscoveryApi.md#getservicesproductapidiscovery) | Get services with product enabled [*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**disableProductBotManagement**](docs/Api/ProductBotManagementApi.md#disableproductbotmanagement) | Disable product [*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**enableProductBotManagement**](docs/Api/ProductBotManagementApi.md#enableproductbotmanagement) | Enable product [*ProductBotManagementApi*](docs/Api/ProductBotManagementApi.md) | [**getProductBotManagement**](docs/Api/ProductBotManagementApi.md#getproductbotmanagement) | Get product enablement status @@ -659,8 +662,6 @@ The fastly-php API client currently does not support the following endpoints: - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) - [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) -- [`/domain-management/v1/domains/{domain_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) -- [`/domain-management/v1/domains`](https://www.fastly.com/documentation/reference/api/) (GET, POST) - [`/domains/v1/tools/status`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/domains/v1/tools/suggest`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/ngwaf/v1/lists/{listId}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (DELETE, GET, PATCH) @@ -677,6 +678,7 @@ The fastly-php API client currently does not support the following endpoints: - [`/ngwaf/v1/workspaces/{workspace_id}/events`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET) - [`/ngwaf/v1/workspaces/{workspace_id}/redactions/{redaction_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (DELETE, GET, PATCH) - [`/ngwaf/v1/workspaces/{workspace_id}/redactions`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (GET, POST) +- [`/ngwaf/v1/workspaces/{workspace_id}/requests/{request_id}/report`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/requests) (POST) - [`/ngwaf/v1/workspaces/{workspace_id}/requests/{request_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/requests) (GET) - [`/ngwaf/v1/workspaces/{workspace_id}/requests`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/requests) (GET) - [`/ngwaf/v1/workspaces/{workspace_id}/rules/{rule_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/rules) (DELETE, GET, PATCH) diff --git a/docs/Api/DdosProtectionApi.md b/docs/Api/DdosProtectionApi.md index aba009d3..36d043b0 100644 --- a/docs/Api/DdosProtectionApi.md +++ b/docs/Api/DdosProtectionApi.md @@ -116,6 +116,7 @@ Get all rules for an event. $options['event_id'] = 'event_id_example'; // string | Unique ID of the event. $options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. $options['limit'] = 20; // int | Limit how many results are returned. +$options['include'] = 'include_example'; // string | Include relationships. Optional. Comma-separated values. try { $result = $apiInstance->ddosProtectionEventRuleList($options); @@ -133,6 +134,7 @@ Name | Type | Description | Notes **event_id** | **string** | Unique ID of the event. | **cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] **limit** | **int** | Limit how many results are returned. | [optional] [defaults to 20] +**include** | **string** | Include relationships. Optional. Comma-separated values. | [optional] ### Return type diff --git a/docs/Api/DmDomainsApi.md b/docs/Api/DmDomainsApi.md new file mode 100644 index 00000000..21396213 --- /dev/null +++ b/docs/Api/DmDomainsApi.md @@ -0,0 +1,209 @@ +# Fastly\Api\DmDomainsApi + + +```php +$apiInstance = new Fastly\Api\DmDomainsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**createDmDomain()**](DmDomainsApi.md#createDmDomain) | **POST** /domain-management/v1/domains | Create a domain +[**deleteDmDomain()**](DmDomainsApi.md#deleteDmDomain) | **DELETE** /domain-management/v1/domains/{domain_id} | Delete a domain +[**getDmDomain()**](DmDomainsApi.md#getDmDomain) | **GET** /domain-management/v1/domains/{domain_id} | Get a domain +[**listDmDomains()**](DmDomainsApi.md#listDmDomains) | **GET** /domain-management/v1/domains | List domains +[**updateDmDomain()**](DmDomainsApi.md#updateDmDomain) | **PATCH** /domain-management/v1/domains/{domain_id} | Update a domain + + +## `createDmDomain()` + +```php +createDmDomain($options): \Fastly\Model\SuccessfulResponseAsObject // Create a domain +``` + +Create a domain + +### Example +```php + $options['request_body_for_create'] = new \Fastly\Model\RequestBodyForCreate(); // \Fastly\Model\RequestBodyForCreate + +try { + $result = $apiInstance->createDmDomain($options); +} catch (Exception $e) { + echo 'Exception when calling DmDomainsApi->createDmDomain: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**request_body_for_create** | [**\Fastly\Model\RequestBodyForCreate**](../Model/RequestBodyForCreate.md) | | [optional] + +### Return type + +[**\Fastly\Model\SuccessfulResponseAsObject**](../Model/SuccessfulResponseAsObject.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `deleteDmDomain()` + +```php +deleteDmDomain($options) // Delete a domain +``` + +Delete a domain + +### Example +```php + $options['domain_id'] = 'domain_id_example'; // string + +try { + $apiInstance->deleteDmDomain($options); +} catch (Exception $e) { + echo 'Exception when calling DmDomainsApi->deleteDmDomain: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**domain_id** | **string** | | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getDmDomain()` + +```php +getDmDomain($options): \Fastly\Model\SuccessfulResponseAsObject // Get a domain +``` + +Show a domain + +### Example +```php + $options['domain_id'] = 'domain_id_example'; // string + +try { + $result = $apiInstance->getDmDomain($options); +} catch (Exception $e) { + echo 'Exception when calling DmDomainsApi->getDmDomain: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**domain_id** | **string** | | + +### Return type + +[**\Fastly\Model\SuccessfulResponseAsObject**](../Model/SuccessfulResponseAsObject.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `listDmDomains()` + +```php +listDmDomains($options): \Fastly\Model\InlineResponse2004 // List domains +``` + +List all domains + +### Example +```php + $options['fqdn'] = 'fqdn_example'; // string +$options['service_id'] = 'service_id_example'; // string | Filter results based on a service_id. +$options['sort'] = 'fqdn'; // string | The order in which to list the results. +$options['activated'] = True; // bool +$options['verified'] = True; // bool +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. +$options['limit'] = 20; // int | Limit how many results are returned. + +try { + $result = $apiInstance->listDmDomains($options); +} catch (Exception $e) { + echo 'Exception when calling DmDomainsApi->listDmDomains: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**fqdn** | **string** | | [optional] +**service_id** | **string** | Filter results based on a service_id. | [optional] +**sort** | **string** | The order in which to list the results. | [optional] [one of: 'fqdn', '-fqdn'] [defaults to 'fqdn'] +**activated** | **bool** | | [optional] +**verified** | **bool** | | [optional] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] +**limit** | **int** | Limit how many results are returned. | [optional] [defaults to 20] + +### Return type + +[**\Fastly\Model\InlineResponse2004**](../Model/InlineResponse2004.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `updateDmDomain()` + +```php +updateDmDomain($options): \Fastly\Model\SuccessfulResponseAsObject // Update a domain +``` + +Update a domain + +### Example +```php + $options['domain_id'] = 'domain_id_example'; // string +$options['request_body_for_update'] = new \Fastly\Model\RequestBodyForUpdate(); // \Fastly\Model\RequestBodyForUpdate + +try { + $result = $apiInstance->updateDmDomain($options); +} catch (Exception $e) { + echo 'Exception when calling DmDomainsApi->updateDmDomain: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**domain_id** | **string** | | +**request_body_for_update** | [**\Fastly\Model\RequestBodyForUpdate**](../Model/RequestBodyForUpdate.md) | | [optional] + +### Return type + +[**\Fastly\Model\SuccessfulResponseAsObject**](../Model/SuccessfulResponseAsObject.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/DomainOwnershipsApi.md b/docs/Api/DomainOwnershipsApi.md index 3d3d75ab..86c6966f 100644 --- a/docs/Api/DomainOwnershipsApi.md +++ b/docs/Api/DomainOwnershipsApi.md @@ -23,7 +23,7 @@ Method | HTTP request | Description ## `listDomainOwnerships()` ```php -listDomainOwnerships($options): \Fastly\Model\InlineResponse2004 // List domain-ownerships +listDomainOwnerships($options): \Fastly\Model\InlineResponse2005 // List domain-ownerships ``` List all domain-ownerships. @@ -46,7 +46,7 @@ This endpoint does not need any parameters. ### Return type -[**\Fastly\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +[**\Fastly\Model\InlineResponse2005**](../Model/InlineResponse2005.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/HealthcheckApi.md b/docs/Api/HealthcheckApi.md index e29625ef..3827dc5f 100644 --- a/docs/Api/HealthcheckApi.md +++ b/docs/Api/HealthcheckApi.md @@ -36,7 +36,7 @@ Create a health check for a particular service and version. ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. -$options['check_interval'] = 56; // int | How often to run the health check in milliseconds. +$options['check_interval'] = 56; // int | How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['expected_response'] = 56; // int | The status code expected from the host. $options['headers'] = array('headers_example'); // string[] | Array of custom headers that will be added to the health check probes. @@ -65,7 +65,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | -**check_interval** | **int** | How often to run the health check in milliseconds. | [optional] +**check_interval** | **int** | How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **expected_response** | **int** | The status code expected from the host. | [optional] **headers** | [**string[]**](../Model/string.md) | Array of custom headers that will be added to the health check probes. | [optional] @@ -211,7 +211,7 @@ Update the health check for a particular service and version. $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. $options['version_id'] = 56; // int | Integer identifying a service version. $options['healthcheck_name'] = 'healthcheck_name_example'; // string | The name of the health check. -$options['check_interval'] = 56; // int | How often to run the health check in milliseconds. +$options['check_interval'] = 56; // int | How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. $options['comment'] = 'comment_example'; // string | A freeform descriptive note. $options['expected_response'] = 56; // int | The status code expected from the host. $options['headers'] = array('headers_example'); // string[] | Array of custom headers that will be added to the health check probes. @@ -241,7 +241,7 @@ Name | Type | Description | Notes **service_id** | **string** | Alphanumeric string identifying the service. | **version_id** | **int** | Integer identifying a service version. | **healthcheck_name** | **string** | The name of the health check. | -**check_interval** | **int** | How often to run the health check in milliseconds. | [optional] +**check_interval** | **int** | How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **expected_response** | **int** | The status code expected from the host. | [optional] **headers** | [**string[]**](../Model/string.md) | Array of custom headers that will be added to the health check probes. | [optional] diff --git a/docs/Api/IamRolesApi.md b/docs/Api/IamRolesApi.md index fc5cb6be..f1c2e1ef 100644 --- a/docs/Api/IamRolesApi.md +++ b/docs/Api/IamRolesApi.md @@ -17,33 +17,27 @@ $apiInstance = new Fastly\Api\IamRolesApi( Method | HTTP request | Description ------ | ------------ | ----------- -[**addRolePermissions()**](IamRolesApi.md#addRolePermissions) | **POST** /roles/{role_id}/permissions | Add permissions to a role -[**createARole()**](IamRolesApi.md#createARole) | **POST** /roles | Create a role -[**deleteARole()**](IamRolesApi.md#deleteARole) | **DELETE** /roles/{role_id} | Delete a role -[**getARole()**](IamRolesApi.md#getARole) | **GET** /roles/{role_id} | Get a role -[**listRolePermissions()**](IamRolesApi.md#listRolePermissions) | **GET** /roles/{role_id}/permissions | List permissions in a role -[**listRoles()**](IamRolesApi.md#listRoles) | **GET** /roles | List roles -[**removeRolePermissions()**](IamRolesApi.md#removeRolePermissions) | **DELETE** /roles/{role_id}/permissions | Remove permissions from a role -[**updateARole()**](IamRolesApi.md#updateARole) | **PATCH** /roles/{role_id} | Update a role +[**iamV1RolesGet()**](IamRolesApi.md#iamV1RolesGet) | **GET** /iam/v1/roles/{role_id} | Get IAM role by ID +[**iamV1RolesList()**](IamRolesApi.md#iamV1RolesList) | **GET** /iam/v1/roles | List IAM roles -## `addRolePermissions()` +## `iamV1RolesGet()` ```php -addRolePermissions($options): object // Add permissions to a role +iamV1RolesGet($options): \Fastly\Model\IamV1RoleResponse // Get IAM role by ID ``` -Add permissions to a role. +Retrieve a single IAM role by its unique identifier. ### Example ```php - $options['role_id'] = 'role_id_example'; // string | Alphanumeric string identifying the role. -$options['request_body'] = {"permissions":[{"id":"2bxSauWWdQ5Hmg2d7WQiPU"},{"id":"5QoWSdPgkxvL9eoDMXRDr4"}]}; // array + $options['role_id'] = Q4rXe9vN1szK8a2fUjYtWp; // string | Alphanumeric string identifying the role. +$options['include'] = 'include_example'; // string | Include related data (i.e., permissions). try { - $result = $apiInstance->addRolePermissions($options); + $result = $apiInstance->iamV1RolesGet($options); } catch (Exception $e) { - echo 'Exception when calling IamRolesApi->addRolePermissions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling IamRolesApi->iamV1RolesGet: ', $e->getMessage(), PHP_EOL; } ``` @@ -54,31 +48,32 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **role_id** | **string** | Alphanumeric string identifying the role. | -**request_body** | [**array**](../Model/object.md) | | [optional] +**include** | **string** | Include related data (i.e., permissions). | [optional] [one of: 'permissions'] ### Return type -**object** +[**\Fastly\Model\IamV1RoleResponse**](../Model/IamV1RoleResponse.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) -## `createARole()` +## `iamV1RolesList()` ```php -createARole($options): object // Create a role +iamV1RolesList($options): \Fastly\Model\IamV1RoleListResponse // List IAM roles ``` -Create a role. +Retrieve a paginated list of IAM roles available in the account. ### Example ```php - $options['request_body'] = {"name":"Security Engineer"}; // array + $options['limit'] = 100; // int | Number of results per page. The maximum is 1000. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. try { - $result = $apiInstance->createARole($options); + $result = $apiInstance->iamV1RolesList($options); } catch (Exception $e) { - echo 'Exception when calling IamRolesApi->createARole: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling IamRolesApi->iamV1RolesList: ', $e->getMessage(), PHP_EOL; } ``` @@ -88,221 +83,12 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**request_body** | [**array**](../Model/object.md) | | [optional] +**limit** | **int** | Number of results per page. The maximum is 1000. | [optional] [defaults to 100] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] ### Return type -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `deleteARole()` - -```php -deleteARole($options) // Delete a role -``` - -Delete a role. - -### Example -```php - $options['role_id'] = 'role_id_example'; // string | Alphanumeric string identifying the role. - -try { - $apiInstance->deleteARole($options); -} catch (Exception $e) { - echo 'Exception when calling IamRolesApi->deleteARole: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**role_id** | **string** | Alphanumeric string identifying the role. | - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `getARole()` - -```php -getARole($options): object // Get a role -``` - -Get a role. - -### Example -```php - $options['role_id'] = 'role_id_example'; // string | Alphanumeric string identifying the role. - -try { - $result = $apiInstance->getARole($options); -} catch (Exception $e) { - echo 'Exception when calling IamRolesApi->getARole: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**role_id** | **string** | Alphanumeric string identifying the role. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listRolePermissions()` - -```php -listRolePermissions($options): object // List permissions in a role -``` - -List all permissions in a role. - -### Example -```php - $options['role_id'] = 'role_id_example'; // string | Alphanumeric string identifying the role. - -try { - $result = $apiInstance->listRolePermissions($options); -} catch (Exception $e) { - echo 'Exception when calling IamRolesApi->listRolePermissions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**role_id** | **string** | Alphanumeric string identifying the role. | - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `listRoles()` - -```php -listRoles($options): object // List roles -``` - -List all roles. - -### Example -```php - $options['per_page'] = 20; // int | Number of records per page. -$options['page'] = 1; // int | Current page. - -try { - $result = $apiInstance->listRoles($options); -} catch (Exception $e) { - echo 'Exception when calling IamRolesApi->listRoles: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**per_page** | **int** | Number of records per page. | [optional] [defaults to 20] -**page** | **int** | Current page. | [optional] - -### Return type - -**object** - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `removeRolePermissions()` - -```php -removeRolePermissions($options) // Remove permissions from a role -``` - -Remove permissions from a role. - -### Example -```php - $options['role_id'] = 'role_id_example'; // string | Alphanumeric string identifying the role. -$options['request_body'] = {"permissions":[{"id":"2bxSauWWdQ5Hmg2d7WQiPU"},{"id":"5QoWSdPgkxvL9eoDMXRDr4"}]}; // array - -try { - $apiInstance->removeRolePermissions($options); -} catch (Exception $e) { - echo 'Exception when calling IamRolesApi->removeRolePermissions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**role_id** | **string** | Alphanumeric string identifying the role. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -void (empty response body) - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to README]](../../README.md) - -## `updateARole()` - -```php -updateARole($options): object // Update a role -``` - -Update a role. - -### Example -```php - $options['role_id'] = 'role_id_example'; // string | Alphanumeric string identifying the role. -$options['request_body'] = {"name":"Account Manager","description":"Manage users."}; // array - -try { - $result = $apiInstance->updateARole($options); -} catch (Exception $e) { - echo 'Exception when calling IamRolesApi->updateARole: ', $e->getMessage(), PHP_EOL; -} -``` - -### Options - -Note: the input parameter is an associative array with the keys listed below. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**role_id** | **string** | Alphanumeric string identifying the role. | -**request_body** | [**array**](../Model/object.md) | | [optional] - -### Return type - -**object** +[**\Fastly\Model\IamV1RoleListResponse**](../Model/IamV1RoleListResponse.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/InvitationsApi.md b/docs/Api/InvitationsApi.md index 96988f38..06a278a5 100644 --- a/docs/Api/InvitationsApi.md +++ b/docs/Api/InvitationsApi.md @@ -32,7 +32,7 @@ Create an invitation. ### Example ```php - $options['invitation'] = {"data":{"type":"invitation","attributes":{"email":"thelma@example.com","limit_services":true,"role":"engineer"},"relationships":{"customer":{"data":{"id":"44tb1D3asjhhuh2SH8e8YD","type":"customer"}},"service_invitations":{"data":[{"type":"service_invitation","attributes":{"permission":"purge_all"},"relationships":{"service":{"data":{"type":"service","id":"6yrrdleXQ9QDtum9rMB0nr"}}}}]}}}}; // \Fastly\Model\Invitation + $options['invitation'] = {"data":{"type":"invitation","attributes":{"email":"thelma@example.com","limit_services":true,"roles":["Q4rXe9vN1szK8a2fUjYtWp"]},"relationships":{"customer":{"data":{"id":"44tb1D3asjhhuh2SH8e8YD","type":"customer"}},"service_invitations":{"data":[{"type":"service_invitation","attributes":{"permission":"purge_all"},"relationships":{"service":{"data":{"type":"service","id":"6yrrdleXQ9QDtum9rMB0nr"}}}}]}}}}; // \Fastly\Model\Invitation try { $result = $apiInstance->createInvitation($options); diff --git a/docs/Api/KvStoreApi.md b/docs/Api/KvStoreApi.md index 5c9f6823..4c884954 100644 --- a/docs/Api/KvStoreApi.md +++ b/docs/Api/KvStoreApi.md @@ -130,7 +130,7 @@ Name | Type | Description | Notes ## `kvStoreList()` ```php -kvStoreList($options): \Fastly\Model\InlineResponse2005 // List all KV stores. +kvStoreList($options): \Fastly\Model\InlineResponse2006 // List all KV stores. ``` List all KV stores. @@ -160,7 +160,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2005**](../Model/InlineResponse2005.md) +[**\Fastly\Model\InlineResponse2006**](../Model/InlineResponse2006.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/KvStoreItemApi.md b/docs/Api/KvStoreItemApi.md index 6ddcbc6a..7b0dbefe 100644 --- a/docs/Api/KvStoreItemApi.md +++ b/docs/Api/KvStoreItemApi.md @@ -102,7 +102,7 @@ Name | Type | Description | Notes ## `kvStoreListItemKeys()` ```php -kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2006 // List item keys. +kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2007 // List item keys. ``` Lists the matching item keys (or all item keys, if no prefix is supplied). @@ -136,7 +136,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2006**](../Model/InlineResponse2006.md) +[**\Fastly\Model\InlineResponse2007**](../Model/InlineResponse2007.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/LoggingHttpsApi.md b/docs/Api/LoggingHttpsApi.md index f8e8ea40..2e608a89 100644 --- a/docs/Api/LoggingHttpsApi.md +++ b/docs/Api/LoggingHttpsApi.md @@ -55,6 +55,7 @@ $options['message_type'] = new \Fastly\Model\LoggingMessageType(); // \Fastly\Mo $options['header_value'] = 'null'; // string | Value of the custom header sent with the request. $options['method'] = 'POST'; // string | HTTP method used for request. $options['json_format'] = 'json_format_example'; // string | Enforces valid JSON formatting for log entries. +$options['period'] = 5; // int | How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. try { $result = $apiInstance->createLogHttps($options); @@ -90,6 +91,7 @@ Name | Type | Description | Notes **header_value** | **string** | Value of the custom header sent with the request. | [optional] [defaults to 'null'] **method** | **string** | HTTP method used for request. | [optional] [one of: 'POST', 'PUT'] [defaults to 'POST'] **json_format** | **string** | Enforces valid JSON formatting for log entries. | [optional] [one of: '0', '1', '2'] +**period** | **int** | How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. | [optional] [defaults to 5] ### Return type @@ -242,6 +244,7 @@ $options['message_type'] = new \Fastly\Model\LoggingMessageType(); // \Fastly\Mo $options['header_value'] = 'null'; // string | Value of the custom header sent with the request. $options['method'] = 'POST'; // string | HTTP method used for request. $options['json_format'] = 'json_format_example'; // string | Enforces valid JSON formatting for log entries. +$options['period'] = 5; // int | How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. try { $result = $apiInstance->updateLogHttps($options); @@ -278,6 +281,7 @@ Name | Type | Description | Notes **header_value** | **string** | Value of the custom header sent with the request. | [optional] [defaults to 'null'] **method** | **string** | HTTP method used for request. | [optional] [one of: 'POST', 'PUT'] [defaults to 'POST'] **json_format** | **string** | Enforces valid JSON formatting for log entries. | [optional] [one of: '0', '1', '2'] +**period** | **int** | How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. | [optional] [defaults to 5] ### Return type diff --git a/docs/Api/ProductApiDiscoveryApi.md b/docs/Api/ProductApiDiscoveryApi.md new file mode 100644 index 00000000..c66a325f --- /dev/null +++ b/docs/Api/ProductApiDiscoveryApi.md @@ -0,0 +1,157 @@ +# Fastly\Api\ProductApiDiscoveryApi + + +```php +$apiInstance = new Fastly\Api\ProductApiDiscoveryApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductApiDiscovery()**](ProductApiDiscoveryApi.md#disableProductApiDiscovery) | **DELETE** /enabled-products/v1/api_discovery/services/{service_id} | Disable product +[**enableProductApiDiscovery()**](ProductApiDiscoveryApi.md#enableProductApiDiscovery) | **PUT** /enabled-products/v1/api_discovery/services/{service_id} | Enable product +[**getProductApiDiscovery()**](ProductApiDiscoveryApi.md#getProductApiDiscovery) | **GET** /enabled-products/v1/api_discovery/services/{service_id} | Get product enablement status +[**getServicesProductApiDiscovery()**](ProductApiDiscoveryApi.md#getServicesProductApiDiscovery) | **GET** /enabled-products/v1/api_discovery/services | Get services with product enabled + + +## `disableProductApiDiscovery()` + +```php +disableProductApiDiscovery($options) // Disable product +``` + +Disable the API Discovery product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $apiInstance->disableProductApiDiscovery($options); +} catch (Exception $e) { + echo 'Exception when calling ProductApiDiscoveryApi->disableProductApiDiscovery: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableProductApiDiscovery()` + +```php +enableProductApiDiscovery($options): \Fastly\Model\ApiDiscoveryResponseEnable // Enable product +``` + +Enable the API Discovery product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->enableProductApiDiscovery($options); +} catch (Exception $e) { + echo 'Exception when calling ProductApiDiscoveryApi->enableProductApiDiscovery: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\ApiDiscoveryResponseEnable**](../Model/ApiDiscoveryResponseEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getProductApiDiscovery()` + +```php +getProductApiDiscovery($options): \Fastly\Model\ApiDiscoveryResponseEnable // Get product enablement status +``` + +Get the enablement status of the API Discovery product on a service. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. + +try { + $result = $apiInstance->getProductApiDiscovery($options); +} catch (Exception $e) { + echo 'Exception when calling ProductApiDiscoveryApi->getProductApiDiscovery: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | + +### Return type + +[**\Fastly\Model\ApiDiscoveryResponseEnable**](../Model/ApiDiscoveryResponseEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getServicesProductApiDiscovery()` + +```php +getServicesProductApiDiscovery($options): \Fastly\Model\ApiDiscoveryResponseBodyGetAllServices // Get services with product enabled +``` + +Get all the services for a customer that has the API Discovery product enabled. + +### Example +```php + +try { + $result = $apiInstance->getServicesProductApiDiscovery($options); +} catch (Exception $e) { + echo 'Exception when calling ProductApiDiscoveryApi->getServicesProductApiDiscovery: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\ApiDiscoveryResponseBodyGetAllServices**](../Model/ApiDiscoveryResponseBodyGetAllServices.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/SecretStoreApi.md b/docs/Api/SecretStoreApi.md index 0d97ce62..e22af495 100644 --- a/docs/Api/SecretStoreApi.md +++ b/docs/Api/SecretStoreApi.md @@ -161,7 +161,7 @@ Name | Type | Description | Notes ## `getSecretStores()` ```php -getSecretStores($options): \Fastly\Model\InlineResponse2007 // Get all secret stores +getSecretStores($options): \Fastly\Model\InlineResponse2008 // Get all secret stores ``` Get all secret stores. @@ -191,7 +191,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\Fastly\Model\InlineResponse2008**](../Model/InlineResponse2008.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/SecretStoreItemApi.md b/docs/Api/SecretStoreItemApi.md index 74f77c18..4585861f 100644 --- a/docs/Api/SecretStoreItemApi.md +++ b/docs/Api/SecretStoreItemApi.md @@ -136,7 +136,7 @@ Name | Type | Description | Notes ## `getSecrets()` ```php -getSecrets($options): \Fastly\Model\InlineResponse2008 // List secrets within a store. +getSecrets($options): \Fastly\Model\InlineResponse2009 // List secrets within a store. ``` List all secrets within a store. @@ -166,7 +166,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2008**](../Model/InlineResponse2008.md) +[**\Fastly\Model\InlineResponse2009**](../Model/InlineResponse2009.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/ServiceAuthorizationsApi.md b/docs/Api/ServiceAuthorizationsApi.md index d28e067d..d09af97e 100644 --- a/docs/Api/ServiceAuthorizationsApi.md +++ b/docs/Api/ServiceAuthorizationsApi.md @@ -97,7 +97,7 @@ void (empty response body) ## `deleteServiceAuthorization2()` ```php -deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse2009 // Delete service authorizations +deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse20010 // Delete service authorizations ``` Delete service authorizations. @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2009**](../Model/InlineResponse2009.md) +[**\Fastly\Model\InlineResponse20010**](../Model/InlineResponse20010.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/UserApi.md b/docs/Api/UserApi.md index b422b03b..f7ce83e4 100644 --- a/docs/Api/UserApi.md +++ b/docs/Api/UserApi.md @@ -42,6 +42,7 @@ $options['limit_services'] = True; // bool | Indicates that the user has limited $options['locked'] = True; // bool | Indicates whether the is account is locked for editing or not. $options['require_new_password'] = True; // bool | Indicates if a new password is required at next login. $options['role'] = new \Fastly\Model\RoleUser(); // \Fastly\Model\RoleUser +$options['roles'] = array('roles_example'); // string[] | A list of role IDs assigned to the user. $options['two_factor_auth_enabled'] = True; // bool | Indicates if 2FA is enabled on the user. $options['two_factor_setup_required'] = True; // bool | Indicates if 2FA is required by the user's customer account. @@ -64,6 +65,7 @@ Name | Type | Description | Notes **locked** | **bool** | Indicates whether the is account is locked for editing or not. | [optional] **require_new_password** | **bool** | Indicates if a new password is required at next login. | [optional] **role** | [**\Fastly\Model\RoleUser**](../Model/RoleUser.md) | | [optional] +**roles** | [**string[]**](../Model/string.md) | A list of role IDs assigned to the user. | [optional] **two_factor_auth_enabled** | **bool** | Indicates if 2FA is enabled on the user. | [optional] **two_factor_setup_required** | **bool** | Indicates if 2FA is required by the user's customer account. | [optional] @@ -224,6 +226,7 @@ $options['limit_services'] = True; // bool | Indicates that the user has limited $options['locked'] = True; // bool | Indicates whether the is account is locked for editing or not. $options['require_new_password'] = True; // bool | Indicates if a new password is required at next login. $options['role'] = new \Fastly\Model\RoleUser(); // \Fastly\Model\RoleUser +$options['roles'] = array('roles_example'); // string[] | A list of role IDs assigned to the user. $options['two_factor_auth_enabled'] = True; // bool | Indicates if 2FA is enabled on the user. $options['two_factor_setup_required'] = True; // bool | Indicates if 2FA is required by the user's customer account. @@ -247,6 +250,7 @@ Name | Type | Description | Notes **locked** | **bool** | Indicates whether the is account is locked for editing or not. | [optional] **require_new_password** | **bool** | Indicates if a new password is required at next login. | [optional] **role** | [**\Fastly\Model\RoleUser**](../Model/RoleUser.md) | | [optional] +**roles** | [**string[]**](../Model/string.md) | A list of role IDs assigned to the user. | [optional] **two_factor_auth_enabled** | **bool** | Indicates if 2FA is enabled on the user. | [optional] **two_factor_setup_required** | **bool** | Indicates if 2FA is required by the user's customer account. | [optional] diff --git a/docs/Model/ApiDiscoveryResponseBodyGetAllServices.md b/docs/Model/ApiDiscoveryResponseBodyGetAllServices.md new file mode 100644 index 00000000..af59728d --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseBodyGetAllServices.md @@ -0,0 +1,13 @@ +# # ApiDiscoveryResponseBodyGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ApiDiscoveryResponseProductProduct**](ApiDiscoveryResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\ApiDiscoveryResponseCustomerCustomer**](ApiDiscoveryResponseCustomerCustomer.md) | | [optional] +**services** | **string[]** | A list of services for a customer with API Discovery enabled. | [optional] +**_links** | [**\Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks**](ApiDiscoveryResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseCustomer.md b/docs/Model/ApiDiscoveryResponseCustomer.md new file mode 100644 index 00000000..51054380 --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseCustomer.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\ApiDiscoveryResponseCustomerCustomer**](ApiDiscoveryResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseCustomerCustomer.md b/docs/Model/ApiDiscoveryResponseCustomerCustomer.md new file mode 100644 index 00000000..6d4c24db --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseCustomerCustomer.md @@ -0,0 +1,11 @@ +# # ApiDiscoveryResponseCustomerCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Customer identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseEnable.md b/docs/Model/ApiDiscoveryResponseEnable.md new file mode 100644 index 00000000..e9f1c787 --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseEnable.md @@ -0,0 +1,12 @@ +# # ApiDiscoveryResponseEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ApiDiscoveryResponseProductProduct**](ApiDiscoveryResponseProductProduct.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] +**_links** | [**\Fastly\Model\ApiDiscoveryResponseLinksLinks**](ApiDiscoveryResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseEnabledServices.md b/docs/Model/ApiDiscoveryResponseEnabledServices.md new file mode 100644 index 00000000..05ec99df --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseEnabledServices.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseEnabledServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**services** | **string[]** | A list of services for a customer with API Discovery enabled. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseLinks.md b/docs/Model/ApiDiscoveryResponseLinks.md new file mode 100644 index 00000000..ea021909 --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseLinks.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\ApiDiscoveryResponseLinksLinks**](ApiDiscoveryResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseLinksGetAllServices.md b/docs/Model/ApiDiscoveryResponseLinksGetAllServices.md new file mode 100644 index 00000000..818ed78d --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseLinksGetAllServices.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseLinksGetAllServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks**](ApiDiscoveryResponseLinksGetAllServicesLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.md b/docs/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.md new file mode 100644 index 00000000..8b61250b --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseLinksGetAllServicesLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseLinksLinks.md b/docs/Model/ApiDiscoveryResponseLinksLinks.md new file mode 100644 index 00000000..8041d8e1 --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseLinksLinks.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseProduct.md b/docs/Model/ApiDiscoveryResponseProduct.md new file mode 100644 index 00000000..b94e79b8 --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseProduct.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\ApiDiscoveryResponseProductProduct**](ApiDiscoveryResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseProductProduct.md b/docs/Model/ApiDiscoveryResponseProductProduct.md new file mode 100644 index 00000000..075b6d75 --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseProductProduct.md @@ -0,0 +1,11 @@ +# # ApiDiscoveryResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApiDiscoveryResponseService.md b/docs/Model/ApiDiscoveryResponseService.md new file mode 100644 index 00000000..96fed3df --- /dev/null +++ b/docs/Model/ApiDiscoveryResponseService.md @@ -0,0 +1,10 @@ +# # ApiDiscoveryResponseService + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BotManagementResponseServiceService.md b/docs/Model/ApiDiscoveryResponseServiceService.md similarity index 88% rename from docs/Model/BotManagementResponseServiceService.md rename to docs/Model/ApiDiscoveryResponseServiceService.md index 4f59ac7b..bac55d29 100644 --- a/docs/Model/BotManagementResponseServiceService.md +++ b/docs/Model/ApiDiscoveryResponseServiceService.md @@ -1,4 +1,4 @@ -# # BotManagementResponseServiceService +# # ApiDiscoveryResponseServiceService ## Properties diff --git a/docs/Model/BotManagementResponseBodyEnable.md b/docs/Model/BotManagementResponseBodyEnable.md index a3e8e7c1..de920fa0 100644 --- a/docs/Model/BotManagementResponseBodyEnable.md +++ b/docs/Model/BotManagementResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\BotManagementResponseProductProduct**](BotManagementResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\BotManagementResponseLinksLinks**](BotManagementResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/BotManagementResponseService.md b/docs/Model/BotManagementResponseService.md index 4b48b4ba..d9c7b1ec 100644 --- a/docs/Model/BotManagementResponseService.md +++ b/docs/Model/BotManagementResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrotliCompressionResponseBodyEnable.md b/docs/Model/BrotliCompressionResponseBodyEnable.md index 7ed82eb7..3ebcf49a 100644 --- a/docs/Model/BrotliCompressionResponseBodyEnable.md +++ b/docs/Model/BrotliCompressionResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\BrotliCompressionResponseProductProduct**](BrotliCompressionResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\BrotliCompressionResponseLinksLinks**](BrotliCompressionResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/BrotliCompressionResponseService.md b/docs/Model/BrotliCompressionResponseService.md index a64a70af..057bc04b 100644 --- a/docs/Model/BrotliCompressionResponseService.md +++ b/docs/Model/BrotliCompressionResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionResponseConfigure.md b/docs/Model/DdosProtectionResponseConfigure.md index 394b8b9a..d135da3b 100644 --- a/docs/Model/DdosProtectionResponseConfigure.md +++ b/docs/Model/DdosProtectionResponseConfigure.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\DdosProtectionResponseProductProduct**](DdosProtectionResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **configuration** | [**\Fastly\Model\DdosProtectionResponseConfigurationConfiguration**](DdosProtectionResponseConfigurationConfiguration.md) | | [optional] **_links** | [**\Fastly\Model\DdosProtectionResponseLinksLinks**](DdosProtectionResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/DdosProtectionResponseEnable.md b/docs/Model/DdosProtectionResponseEnable.md index f48f824d..4d3438cd 100644 --- a/docs/Model/DdosProtectionResponseEnable.md +++ b/docs/Model/DdosProtectionResponseEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\DdosProtectionResponseProductProduct**](DdosProtectionResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\DdosProtectionResponseLinksLinks**](DdosProtectionResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/DdosProtectionResponseService.md b/docs/Model/DdosProtectionResponseService.md index 8f64bde5..b40f443e 100644 --- a/docs/Model/DdosProtectionResponseService.md +++ b/docs/Model/DdosProtectionResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionRuleWithStats.md b/docs/Model/DdosProtectionRuleWithStats.md new file mode 100644 index 00000000..223334de --- /dev/null +++ b/docs/Model/DdosProtectionRuleWithStats.md @@ -0,0 +1,23 @@ +# # DdosProtectionRuleWithStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**id** | **string** | Unique ID of the rule. | [optional] +**name** | **string** | A human-readable name for the rule. | [optional] +**action** | **string** | Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. | [optional] [defaults to 'default'] +**customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] +**service_id** | **string** | Alphanumeric string identifying the service. | [optional] +**source_ip** | **string** | Source IP address attribute. | [optional] +**country_code** | **string** | Country code attribute. | [optional] +**host** | **string** | Host attribute. | [optional] +**asn** | **string** | ASN attribute. | [optional] +**source_ip_prefix** | **string** | Source IP prefix attribute. | [optional] +**additional_attributes** | **string[]** | Attribute category for additional, unlisted attributes used in a rule. | [optional] +**traffic_stats** | [**\Fastly\Model\DdosProtectionTrafficStats**](DdosProtectionTrafficStats.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionRuleWithStatsAllOf.md b/docs/Model/DdosProtectionRuleWithStatsAllOf.md new file mode 100644 index 00000000..f4208d01 --- /dev/null +++ b/docs/Model/DdosProtectionRuleWithStatsAllOf.md @@ -0,0 +1,10 @@ +# # DdosProtectionRuleWithStatsAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**traffic_stats** | [**\Fastly\Model\DdosProtectionTrafficStats**](DdosProtectionTrafficStats.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionTrafficStats.md b/docs/Model/DdosProtectionTrafficStats.md index e0ed8c99..b4de3a24 100644 --- a/docs/Model/DdosProtectionTrafficStats.md +++ b/docs/Model/DdosProtectionTrafficStats.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **service_id** | **string** | Alphanumeric string identifying the service. | [optional] **attributes** | [**\Fastly\Model\DdosProtectionAttributeStats[]**](DdosProtectionAttributeStats.md) | | [optional] +**traffic_percentage** | **float** | Rule traffic percentage for the event. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionTrafficStatsAllOf.md b/docs/Model/DdosProtectionTrafficStatsAllOf.md index 0bb57ec6..cd7cc165 100644 --- a/docs/Model/DdosProtectionTrafficStatsAllOf.md +++ b/docs/Model/DdosProtectionTrafficStatsAllOf.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **service_id** | **string** | Alphanumeric string identifying the service. | [optional] **attributes** | [**\Fastly\Model\DdosProtectionAttributeStats[]**](DdosProtectionAttributeStats.md) | | [optional] +**traffic_percentage** | **float** | Rule traffic percentage for the event. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainInspectorResponseBodyEnable.md b/docs/Model/DomainInspectorResponseBodyEnable.md index 66b53a0c..c4f919b1 100644 --- a/docs/Model/DomainInspectorResponseBodyEnable.md +++ b/docs/Model/DomainInspectorResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\DomainInspectorResponseProductProduct**](DomainInspectorResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\DomainInspectorResponseLinksLinks**](DomainInspectorResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/DomainInspectorResponseService.md b/docs/Model/DomainInspectorResponseService.md index 5e07d1df..4cac078c 100644 --- a/docs/Model/DomainInspectorResponseService.md +++ b/docs/Model/DomainInspectorResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FanoutResponseBodyEnable.md b/docs/Model/FanoutResponseBodyEnable.md index 79acf824..c8c69d09 100644 --- a/docs/Model/FanoutResponseBodyEnable.md +++ b/docs/Model/FanoutResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\FanoutResponseProductProduct**](FanoutResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\FanoutResponseLinksLinks**](FanoutResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/FanoutResponseService.md b/docs/Model/FanoutResponseService.md index e0282d66..ba1ee36e 100644 --- a/docs/Model/FanoutResponseService.md +++ b/docs/Model/FanoutResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Healthcheck.md b/docs/Model/Healthcheck.md index a937e6f4..740e534f 100644 --- a/docs/Model/Healthcheck.md +++ b/docs/Model/Healthcheck.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**check_interval** | **int** | How often to run the health check in milliseconds. | [optional] +**check_interval** | **int** | How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **expected_response** | **int** | The status code expected from the host. | [optional] **headers** | **string[]** | Array of custom headers that will be added to the health check probes. | [optional] diff --git a/docs/Model/HealthcheckResponse.md b/docs/Model/HealthcheckResponse.md index a6d9ff39..0c77b49f 100644 --- a/docs/Model/HealthcheckResponse.md +++ b/docs/Model/HealthcheckResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**check_interval** | **int** | How often to run the health check in milliseconds. | [optional] +**check_interval** | **int** | How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. | [optional] **comment** | **string** | A freeform descriptive note. | [optional] **expected_response** | **int** | The status code expected from the host. | [optional] **headers** | **string[]** | Array of custom headers that will be added to the health check probes. | [optional] diff --git a/docs/Model/IamRole.md b/docs/Model/IamRole.md deleted file mode 100644 index ea98c2ea..00000000 --- a/docs/Model/IamRole.md +++ /dev/null @@ -1,17 +0,0 @@ -# # IamRole - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] -**id** | **string** | Alphanumeric string identifying the role. | [optional] -**object** | **string** | The type of the object. | [optional] -**name** | **string** | Name of the role. | [optional] -**description** | **string** | Description of the role. | [optional] -**custom** | **bool** | This attribute is set to `true` if the role is managed by the customer. It is set to `false` if the role was created by Fastly. | [optional] -**permissions_count** | **int** | Number of permissions assigned to the role. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IamRoleAllOf.md b/docs/Model/IamRoleAllOf.md deleted file mode 100644 index 82de8e9e..00000000 --- a/docs/Model/IamRoleAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# # IamRoleAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **string** | Alphanumeric string identifying the role. | [optional] -**object** | **string** | The type of the object. | [optional] -**name** | **string** | Name of the role. | [optional] -**description** | **string** | Description of the role. | [optional] -**custom** | **bool** | This attribute is set to `true` if the role is managed by the customer. It is set to `false` if the role was created by Fastly. | [optional] -**permissions_count** | **int** | Number of permissions assigned to the role. | [optional] - - -[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IamV1RoleListResponse.md b/docs/Model/IamV1RoleListResponse.md new file mode 100644 index 00000000..c34b9a93 --- /dev/null +++ b/docs/Model/IamV1RoleListResponse.md @@ -0,0 +1,12 @@ +# # IamV1RoleListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limit** | **int** | Maximum number of results returned. | [optional] +**next_cursor** | **string** | Cursor for the next page. | [optional] +**data** | [**\Fastly\Model\IamV1RoleResponse[]**](IamV1RoleResponse.md) | Page of IAM roles (length ≤ limit). | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IamV1RoleResponse.md b/docs/Model/IamV1RoleResponse.md new file mode 100644 index 00000000..013213c4 --- /dev/null +++ b/docs/Model/IamV1RoleResponse.md @@ -0,0 +1,13 @@ +# # IamV1RoleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**name** | **string** | | [optional] +**description** | **string** | | [optional] +**permissions** | **string[]** | The set of permissions granted to this role. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ImageOptimizerResponseBodyEnable.md b/docs/Model/ImageOptimizerResponseBodyEnable.md index d85b8882..802ae6d7 100644 --- a/docs/Model/ImageOptimizerResponseBodyEnable.md +++ b/docs/Model/ImageOptimizerResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\ImageOptimizerResponseProductProduct**](ImageOptimizerResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\ImageOptimizerResponseLinksLinks**](ImageOptimizerResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/ImageOptimizerResponseService.md b/docs/Model/ImageOptimizerResponseService.md index d9bf3210..4c223939 100644 --- a/docs/Model/ImageOptimizerResponseService.md +++ b/docs/Model/ImageOptimizerResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20010.md b/docs/Model/InlineResponse20010.md new file mode 100644 index 00000000..ad759b3d --- /dev/null +++ b/docs/Model/InlineResponse20010.md @@ -0,0 +1,10 @@ +# # InlineResponse20010 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\ServiceAuthorizationResponseData[]**](ServiceAuthorizationResponseData.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2003.md b/docs/Model/InlineResponse2003.md index fe05b558..cf381017 100644 --- a/docs/Model/InlineResponse2003.md +++ b/docs/Model/InlineResponse2003.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\DdosProtectionRule[]**](DdosProtectionRule.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] +**data** | [**\Fastly\Model\DdosProtectionRuleWithStats[]**](DdosProtectionRuleWithStats.md) | | +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2004.md b/docs/Model/InlineResponse2004.md index 5fc18418..1e8b928d 100644 --- a/docs/Model/InlineResponse2004.md +++ b/docs/Model/InlineResponse2004.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**expires_at** | **string** | Time-stamp (GMT) when the domain_ownership validation will expire. | [optional] [readonly] +**data** | [**\Fastly\Model\SuccessfulResponseAsObject[]**](SuccessfulResponseAsObject.md) | | [optional] +**meta** | **object** | Meta for the pagination. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2005.md b/docs/Model/InlineResponse2005.md index 4e608d88..3bf34494 100644 --- a/docs/Model/InlineResponse2005.md +++ b/docs/Model/InlineResponse2005.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] +**expires_at** | **string** | Time-stamp (GMT) when the domain_ownership validation will expire. | [optional] [readonly] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2006.md b/docs/Model/InlineResponse2006.md index c1f9e9c9..3244fb64 100644 --- a/docs/Model/InlineResponse2006.md +++ b/docs/Model/InlineResponse2006.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | **string[]** | | [optional] +**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2007.md b/docs/Model/InlineResponse2007.md index 9fdb0540..ffb9f1f9 100644 --- a/docs/Model/InlineResponse2007.md +++ b/docs/Model/InlineResponse2007.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SecretStoreResponse[]**](SecretStoreResponse.md) | | [optional] +**data** | **string[]** | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2008.md b/docs/Model/InlineResponse2008.md index dadf558d..222f00bc 100644 --- a/docs/Model/InlineResponse2008.md +++ b/docs/Model/InlineResponse2008.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SecretResponse[]**](SecretResponse.md) | | [optional] +**data** | [**\Fastly\Model\SecretStoreResponse[]**](SecretStoreResponse.md) | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2009.md b/docs/Model/InlineResponse2009.md index ae38b8db..8d9b195f 100644 --- a/docs/Model/InlineResponse2009.md +++ b/docs/Model/InlineResponse2009.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\ServiceAuthorizationResponseData[]**](ServiceAuthorizationResponseData.md) | | [optional] +**data** | [**\Fastly\Model\SecretResponse[]**](SecretResponse.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InvitationDataAttributes.md b/docs/Model/InvitationDataAttributes.md index 1c9287c0..138b5cfb 100644 --- a/docs/Model/InvitationDataAttributes.md +++ b/docs/Model/InvitationDataAttributes.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **email** | **string** | The email address of the invitee. | [optional] **limit_services** | **bool** | Indicates the user has limited access to the customer's services. | [optional] **role** | [**\Fastly\Model\RoleUser**](RoleUser.md) | | [optional] +**roles** | **string[]** | | [optional] **status_code** | **int** | Indicates whether or not the invitation is active. | [optional] [one of: 0, 1] diff --git a/docs/Model/LogExplorerInsightsResponseBodyEnable.md b/docs/Model/LogExplorerInsightsResponseBodyEnable.md index c4b2f400..8a031bf8 100644 --- a/docs/Model/LogExplorerInsightsResponseBodyEnable.md +++ b/docs/Model/LogExplorerInsightsResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\LogExplorerInsightsResponseProductProduct**](LogExplorerInsightsResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\LogExplorerInsightsResponseLinksLinks**](LogExplorerInsightsResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/LogExplorerInsightsResponseService.md b/docs/Model/LogExplorerInsightsResponseService.md index 42f0ae16..38d39df3 100644 --- a/docs/Model/LogExplorerInsightsResponseService.md +++ b/docs/Model/LogExplorerInsightsResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingHttpsAdditional.md b/docs/Model/LoggingHttpsAdditional.md index c7d5b939..fd8d6bd3 100644 --- a/docs/Model/LoggingHttpsAdditional.md +++ b/docs/Model/LoggingHttpsAdditional.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **method** | **string** | HTTP method used for request. | [optional] [one of: 'POST', 'PUT'] [defaults to 'POST'] **json_format** | **string** | Enforces valid JSON formatting for log entries. | [optional] [one of: '0', '1', '2'] **format** | **string** | A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/). | [optional] [defaults to '%h %l %u %t "%r" %>s %b'] +**period** | **int** | How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. | [optional] [defaults to 5] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoggingHttpsResponse.md b/docs/Model/LoggingHttpsResponse.md index 61192ba4..339989ca 100644 --- a/docs/Model/LoggingHttpsResponse.md +++ b/docs/Model/LoggingHttpsResponse.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **header_value** | **string** | Value of the custom header sent with the request. | [optional] [defaults to 'null'] **method** | **string** | HTTP method used for request. | [optional] [one of: 'POST', 'PUT'] [defaults to 'POST'] **json_format** | **string** | Enforces valid JSON formatting for log entries. | [optional] [one of: '0', '1', '2'] +**period** | **int** | How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. | [optional] [defaults to 5] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **deleted_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/NgwafResponseConfigure.md b/docs/Model/NgwafResponseConfigure.md index 9b360b01..46436f04 100644 --- a/docs/Model/NgwafResponseConfigure.md +++ b/docs/Model/NgwafResponseConfigure.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\NgwafResponseProductProduct**](NgwafResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **configuration** | [**\Fastly\Model\NgwafResponseConfigurationConfiguration**](NgwafResponseConfigurationConfiguration.md) | | [optional] **_links** | [**\Fastly\Model\NgwafResponseLinksLinks**](NgwafResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/NgwafResponseEnable.md b/docs/Model/NgwafResponseEnable.md index 6a058b72..fbceb147 100644 --- a/docs/Model/NgwafResponseEnable.md +++ b/docs/Model/NgwafResponseEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\NgwafResponseProductProduct**](NgwafResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\NgwafResponseLinksLinks**](NgwafResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/NgwafResponseService.md b/docs/Model/NgwafResponseService.md index e4357169..1da94e41 100644 --- a/docs/Model/NgwafResponseService.md +++ b/docs/Model/NgwafResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OriginInspectorResponseBodyEnable.md b/docs/Model/OriginInspectorResponseBodyEnable.md index 4ceb8a33..1f0b2f1f 100644 --- a/docs/Model/OriginInspectorResponseBodyEnable.md +++ b/docs/Model/OriginInspectorResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\OriginInspectorResponseProductProduct**](OriginInspectorResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\OriginInspectorResponseLinksLinks**](OriginInspectorResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/OriginInspectorResponseService.md b/docs/Model/OriginInspectorResponseService.md index cab435f3..0562c12c 100644 --- a/docs/Model/OriginInspectorResponseService.md +++ b/docs/Model/OriginInspectorResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RealtimeEntryAggregated.md b/docs/Model/RealtimeEntryAggregated.md index 6fa5dd7f..6c630367 100644 --- a/docs/Model/RealtimeEntryAggregated.md +++ b/docs/Model/RealtimeEntryAggregated.md @@ -265,6 +265,7 @@ Name | Type | Description | Notes **request_collapse_usable_count** | **int** | Number of requests that were collapsed and satisfied by a usable cache object. | [optional] **request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] **compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] +**api_discovery_requests_count** | **int** | Number of requests processed by the API Discovery engine. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RealtimeMeasurements.md b/docs/Model/RealtimeMeasurements.md index aac0e4bc..2a567b4c 100644 --- a/docs/Model/RealtimeMeasurements.md +++ b/docs/Model/RealtimeMeasurements.md @@ -265,6 +265,7 @@ Name | Type | Description | Notes **request_collapse_usable_count** | **int** | Number of requests that were collapsed and satisfied by a usable cache object. | [optional] **request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] **compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] +**api_discovery_requests_count** | **int** | Number of requests processed by the API Discovery engine. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RequestBodyForCreate.md b/docs/Model/RequestBodyForCreate.md new file mode 100644 index 00000000..f39e01b8 --- /dev/null +++ b/docs/Model/RequestBodyForCreate.md @@ -0,0 +1,12 @@ +# # RequestBodyForCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**fqdn** | **string** | The fully-qualified domain name for your domain. Can be created, but not updated. | +**service_id** | **string** | The `service_id` associated with your domain or `null` if there is no association. | [optional] +**description** | **string** | A freeform descriptive note. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RequestBodyForUpdate.md b/docs/Model/RequestBodyForUpdate.md new file mode 100644 index 00000000..6df83116 --- /dev/null +++ b/docs/Model/RequestBodyForUpdate.md @@ -0,0 +1,11 @@ +# # RequestBodyForUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_id** | **string** | The `service_id` associated with your domain or `null` if there is no association. | [optional] +**description** | **string** | A freeform descriptive note. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Results.md b/docs/Model/Results.md index 43505dc1..2100635c 100644 --- a/docs/Model/Results.md +++ b/docs/Model/Results.md @@ -272,6 +272,7 @@ Name | Type | Description | Notes **ngwaf_requests_blocked_count** | **int** | Count of Next-Gen WAF (Edge WAF & Core WAF) requests blocked. | [optional] **ngwaf_requests_timeout_count** | **int** | Count of Edge WAF requests timed outcome. | [optional] **ngwaf_requests_challenged_count** | **int** | Count of Edge WAF requests challenged. | [optional] +**api_discovery_requests_count** | **int** | Number of requests processed by the API Discovery engine. | [optional] **service_id** | **string** | | [optional] [readonly] **start_time** | **int** | Timestamp for the start of the time period being reported | [optional] diff --git a/docs/Model/SchemasUserResponse.md b/docs/Model/SchemasUserResponse.md index 5886fa2f..1e378f15 100644 --- a/docs/Model/SchemasUserResponse.md +++ b/docs/Model/SchemasUserResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **locked** | **bool** | Indicates whether the is account is locked for editing or not. | [optional] **require_new_password** | **bool** | Indicates if a new password is required at next login. | [optional] **role** | [**\Fastly\Model\RoleUser**](RoleUser.md) | | [optional] +**roles** | **string[]** | A list of role IDs assigned to the user. | [optional] **two_factor_auth_enabled** | **bool** | Indicates if 2FA is enabled on the user. | [optional] **two_factor_setup_required** | **bool** | Indicates if 2FA is required by the user's customer account. | [optional] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/SuccessfulResponseAsObject.md b/docs/Model/SuccessfulResponseAsObject.md new file mode 100644 index 00000000..46031e42 --- /dev/null +++ b/docs/Model/SuccessfulResponseAsObject.md @@ -0,0 +1,17 @@ +# # SuccessfulResponseAsObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] +**id** | **string** | Domain Identifier (UUID). | [optional] +**fqdn** | **string** | The fully-qualified domain name for your domain. Can be created, but not updated. | [optional] +**service_id** | **string** | The `service_id` associated with your domain or `null` if there is no association. | [optional] +**description** | **string** | A freeform descriptive note. | [optional] +**activated** | **bool** | Denotes if the domain has at least one TLS activation or not. | [optional] [readonly] +**verified** | **bool** | Denotes that the customer has proven ownership over the domain by obtaining a Fastly-managed TLS certificate for it or by providing a their own TLS certificate from a publicly-trusted CA that includes the domain or matching wildcard. | [optional] [readonly] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SuccessfulResponseAsObjectAllOf.md b/docs/Model/SuccessfulResponseAsObjectAllOf.md new file mode 100644 index 00000000..7a98dfcf --- /dev/null +++ b/docs/Model/SuccessfulResponseAsObjectAllOf.md @@ -0,0 +1,15 @@ +# # SuccessfulResponseAsObjectAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Domain Identifier (UUID). | [optional] +**fqdn** | **string** | The fully-qualified domain name for your domain. Can be created, but not updated. | [optional] +**service_id** | **string** | The `service_id` associated with your domain or `null` if there is no association. | [optional] +**description** | **string** | A freeform descriptive note. | [optional] +**activated** | **bool** | Denotes if the domain has at least one TLS activation or not. | [optional] [readonly] +**verified** | **bool** | Denotes that the customer has proven ownership over the domain by obtaining a Fastly-managed TLS certificate for it or by providing a their own TLS certificate from a publicly-trusted CA that includes the domain or matching wildcard. | [optional] [readonly] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/User.md b/docs/Model/User.md index b4c42f59..906fe084 100644 --- a/docs/Model/User.md +++ b/docs/Model/User.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **locked** | **bool** | Indicates whether the is account is locked for editing or not. | [optional] **require_new_password** | **bool** | Indicates if a new password is required at next login. | [optional] **role** | [**\Fastly\Model\RoleUser**](RoleUser.md) | | [optional] +**roles** | **string[]** | A list of role IDs assigned to the user. | [optional] **two_factor_auth_enabled** | **bool** | Indicates if 2FA is enabled on the user. | [optional] **two_factor_setup_required** | **bool** | Indicates if 2FA is required by the user's customer account. | [optional] diff --git a/docs/Model/UserResponse.md b/docs/Model/UserResponse.md index c269ed48..0faa971e 100644 --- a/docs/Model/UserResponse.md +++ b/docs/Model/UserResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **locked** | **bool** | Indicates whether the is account is locked for editing or not. | [optional] **require_new_password** | **bool** | Indicates if a new password is required at next login. | [optional] **role** | [**\Fastly\Model\RoleUser**](RoleUser.md) | | [optional] +**roles** | **string[]** | A list of role IDs assigned to the user. | [optional] **two_factor_auth_enabled** | **bool** | Indicates if 2FA is enabled on the user. | [optional] **two_factor_setup_required** | **bool** | Indicates if 2FA is required by the user's customer account. | [optional] **created_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/WebsocketsResponseBodyEnable.md b/docs/Model/WebsocketsResponseBodyEnable.md index e2d5eaf6..5fe4eb7a 100644 --- a/docs/Model/WebsocketsResponseBodyEnable.md +++ b/docs/Model/WebsocketsResponseBodyEnable.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **product** | [**\Fastly\Model\WebsocketsResponseProductProduct**](WebsocketsResponseProductProduct.md) | | [optional] -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] **_links** | [**\Fastly\Model\WebsocketsResponseLinksLinks**](WebsocketsResponseLinksLinks.md) | | [optional] diff --git a/docs/Model/WebsocketsResponseService.md b/docs/Model/WebsocketsResponseService.md index 3ed158ac..52e251a3 100644 --- a/docs/Model/WebsocketsResponseService.md +++ b/docs/Model/WebsocketsResponseService.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**service** | [**\Fastly\Model\BotManagementResponseServiceService**](BotManagementResponseServiceService.md) | | [optional] +**service** | [**\Fastly\Model\ApiDiscoveryResponseServiceService**](ApiDiscoveryResponseServiceService.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/DdosProtectionApi.php b/lib/Api/DdosProtectionApi.php index 99b5578e..95b80f88 100644 --- a/lib/Api/DdosProtectionApi.php +++ b/lib/Api/DdosProtectionApi.php @@ -932,6 +932,7 @@ public function ddosProtectionEventListRequest($options) * @param string $event_id Unique ID of the event. (required) * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $include Include relationships. Optional. Comma-separated values. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -956,6 +957,7 @@ public function ddosProtectionEventRuleList($options) * @param string $event_id Unique ID of the event. (required) * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $include Include relationships. Optional. Comma-separated values. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1108,6 +1110,7 @@ public function ddosProtectionEventRuleListWithHttpInfo($options) * @param string $event_id Unique ID of the event. (required) * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $include Include relationships. Optional. Comma-separated values. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1135,6 +1138,7 @@ function ($response) { * @param string $event_id Unique ID of the event. (required) * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $include Include relationships. Optional. Comma-separated values. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1188,6 +1192,7 @@ function ($exception) { * @param string $event_id Unique ID of the event. (required) * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * @param int $limit Limit how many results are returned. (optional, default to 20) + * @param string $include Include relationships. Optional. Comma-separated values. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1198,6 +1203,7 @@ public function ddosProtectionEventRuleListRequest($options) $event_id = array_key_exists('event_id', $options) ? $options['event_id'] : null; $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; $limit = array_key_exists('limit', $options) ? $options['limit'] : 20; + $include = array_key_exists('include', $options) ? $options['include'] : null; // verify the required parameter 'event_id' is set if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { @@ -1239,6 +1245,17 @@ public function ddosProtectionEventRuleListRequest($options) $queryParams['limit'] = ObjectSerializer::toString($limit); } } + // query params + if ($include !== null) { + if('form' === 'form' && is_array($include)) { + foreach($include as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['include'] = ObjectSerializer::toString($include); + } + } // path params diff --git a/lib/Api/DmDomainsApi.php b/lib/Api/DmDomainsApi.php new file mode 100644 index 00000000..f8315efd --- /dev/null +++ b/lib/Api/DmDomainsApi.php @@ -0,0 +1,1802 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createDmDomain + * + * Create a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\RequestBodyForCreate $request_body_for_create request_body_for_create (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\SuccessfulResponseAsObject + */ + public function createDmDomain($options) + { + list($response) = $this->createDmDomainWithHttpInfo($options); + return $response; + } + + /** + * Operation createDmDomainWithHttpInfo + * + * Create a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\RequestBodyForCreate $request_body_for_create (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\SuccessfulResponseAsObject, HTTP status code, HTTP response headers (array of strings) + */ + public function createDmDomainWithHttpInfo($options) + { + $request = $this->createDmDomainRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('POST' != 'GET' && 'POST' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Fastly\Model\SuccessfulResponseAsObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\SuccessfulResponseAsObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\SuccessfulResponseAsObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\SuccessfulResponseAsObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createDmDomainAsync + * + * Create a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\RequestBodyForCreate $request_body_for_create (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createDmDomainAsync($options) + { + return $this->createDmDomainAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createDmDomainAsyncWithHttpInfo + * + * Create a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\RequestBodyForCreate $request_body_for_create (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createDmDomainAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\SuccessfulResponseAsObject'; + $request = $this->createDmDomainRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createDmDomain' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param \Fastly\Model\RequestBodyForCreate $request_body_for_create (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createDmDomainRequest($options) + { + // unbox the parameters from the associative array + $request_body_for_create = array_key_exists('request_body_for_create', $options) ? $options['request_body_for_create'] : null; + + + $resourcePath = '/domain-management/v1/domains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($request_body_for_create)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body_for_create)); + } else { + $httpBody = $request_body_for_create; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteDmDomain + * + * Delete a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id domain_id (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteDmDomain($options) + { + $this->deleteDmDomainWithHttpInfo($options); + } + + /** + * Operation deleteDmDomainWithHttpInfo + * + * Delete a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteDmDomainWithHttpInfo($options) + { + $request = $this->deleteDmDomainRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation deleteDmDomainAsync + * + * Delete a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteDmDomainAsync($options) + { + return $this->deleteDmDomainAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteDmDomainAsyncWithHttpInfo + * + * Delete a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteDmDomainAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->deleteDmDomainRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteDmDomain' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteDmDomainRequest($options) + { + // unbox the parameters from the associative array + $domain_id = array_key_exists('domain_id', $options) ? $options['domain_id'] : null; + + // verify the required parameter 'domain_id' is set + if ($domain_id === null || (is_array($domain_id) && count($domain_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domain_id when calling deleteDmDomain' + ); + } + + $resourcePath = '/domain-management/v1/domains/{domain_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($domain_id !== null) { + $resourcePath = str_replace( + '{' . 'domain_id' . '}', + ObjectSerializer::toPathValue($domain_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getDmDomain + * + * Get a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id domain_id (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\SuccessfulResponseAsObject + */ + public function getDmDomain($options) + { + list($response) = $this->getDmDomainWithHttpInfo($options); + return $response; + } + + /** + * Operation getDmDomainWithHttpInfo + * + * Get a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\SuccessfulResponseAsObject, HTTP status code, HTTP response headers (array of strings) + */ + public function getDmDomainWithHttpInfo($options) + { + $request = $this->getDmDomainRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\SuccessfulResponseAsObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\SuccessfulResponseAsObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\SuccessfulResponseAsObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\SuccessfulResponseAsObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDmDomainAsync + * + * Get a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDmDomainAsync($options) + { + return $this->getDmDomainAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDmDomainAsyncWithHttpInfo + * + * Get a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDmDomainAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\SuccessfulResponseAsObject'; + $request = $this->getDmDomainRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDmDomain' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDmDomainRequest($options) + { + // unbox the parameters from the associative array + $domain_id = array_key_exists('domain_id', $options) ? $options['domain_id'] : null; + + // verify the required parameter 'domain_id' is set + if ($domain_id === null || (is_array($domain_id) && count($domain_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domain_id when calling getDmDomain' + ); + } + + $resourcePath = '/domain-management/v1/domains/{domain_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($domain_id !== null) { + $resourcePath = str_replace( + '{' . 'domain_id' . '}', + ObjectSerializer::toPathValue($domain_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listDmDomains + * + * List domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $fqdn fqdn (optional) + * @param string $service_id Filter results based on a service_id. (optional) + * @param string $sort The order in which to list the results. (optional, default to 'fqdn') + * @param bool $activated activated (optional) + * @param bool $verified verified (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\InlineResponse2004 + */ + public function listDmDomains($options) + { + list($response) = $this->listDmDomainsWithHttpInfo($options); + return $response; + } + + /** + * Operation listDmDomainsWithHttpInfo + * + * List domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $fqdn (optional) + * @param string $service_id Filter results based on a service_id. (optional) + * @param string $sort The order in which to list the results. (optional, default to 'fqdn') + * @param bool $activated (optional) + * @param bool $verified (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) + */ + public function listDmDomainsWithHttpInfo($options) + { + $request = $this->listDmDomainsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\InlineResponse2004' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2004', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\InlineResponse2004'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\InlineResponse2004', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listDmDomainsAsync + * + * List domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $fqdn (optional) + * @param string $service_id Filter results based on a service_id. (optional) + * @param string $sort The order in which to list the results. (optional, default to 'fqdn') + * @param bool $activated (optional) + * @param bool $verified (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listDmDomainsAsync($options) + { + return $this->listDmDomainsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listDmDomainsAsyncWithHttpInfo + * + * List domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $fqdn (optional) + * @param string $service_id Filter results based on a service_id. (optional) + * @param string $sort The order in which to list the results. (optional, default to 'fqdn') + * @param bool $activated (optional) + * @param bool $verified (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listDmDomainsAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\InlineResponse2004'; + $request = $this->listDmDomainsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listDmDomains' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $fqdn (optional) + * @param string $service_id Filter results based on a service_id. (optional) + * @param string $sort The order in which to list the results. (optional, default to 'fqdn') + * @param bool $activated (optional) + * @param bool $verified (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param int $limit Limit how many results are returned. (optional, default to 20) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listDmDomainsRequest($options) + { + // unbox the parameters from the associative array + $fqdn = array_key_exists('fqdn', $options) ? $options['fqdn'] : null; + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $sort = array_key_exists('sort', $options) ? $options['sort'] : 'fqdn'; + $activated = array_key_exists('activated', $options) ? $options['activated'] : null; + $verified = array_key_exists('verified', $options) ? $options['verified'] : null; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : 20; + + if ($limit !== null && $limit > 100) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling DmDomainsApi.listDmDomains, must be smaller than or equal to 100.'); + } + + + $resourcePath = '/domain-management/v1/domains'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($fqdn !== null) { + if('form' === 'form' && is_array($fqdn)) { + foreach($fqdn as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['fqdn'] = ObjectSerializer::toString($fqdn); + } + } + // query params + if ($service_id !== null) { + if('form' === 'form' && is_array($service_id)) { + foreach($service_id as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['service_id'] = ObjectSerializer::toString($service_id); + } + } + // query params + if ($sort !== null) { + if('form' === 'form' && is_array($sort)) { + foreach($sort as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['sort'] = ObjectSerializer::toString($sort); + } + } + // query params + if ($activated !== null) { + if('form' === 'form' && is_array($activated)) { + foreach($activated as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['activated'] = ObjectSerializer::toString($activated); + } + } + // query params + if ($verified !== null) { + if('form' === 'form' && is_array($verified)) { + foreach($verified as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['verified'] = ObjectSerializer::toString($verified); + } + } + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } + } + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateDmDomain + * + * Update a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id domain_id (required) + * @param \Fastly\Model\RequestBodyForUpdate $request_body_for_update request_body_for_update (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\SuccessfulResponseAsObject + */ + public function updateDmDomain($options) + { + list($response) = $this->updateDmDomainWithHttpInfo($options); + return $response; + } + + /** + * Operation updateDmDomainWithHttpInfo + * + * Update a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * @param \Fastly\Model\RequestBodyForUpdate $request_body_for_update (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\SuccessfulResponseAsObject, HTTP status code, HTTP response headers (array of strings) + */ + public function updateDmDomainWithHttpInfo($options) + { + $request = $this->updateDmDomainRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\SuccessfulResponseAsObject' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\SuccessfulResponseAsObject', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\SuccessfulResponseAsObject'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\SuccessfulResponseAsObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateDmDomainAsync + * + * Update a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * @param \Fastly\Model\RequestBodyForUpdate $request_body_for_update (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateDmDomainAsync($options) + { + return $this->updateDmDomainAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateDmDomainAsyncWithHttpInfo + * + * Update a domain + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * @param \Fastly\Model\RequestBodyForUpdate $request_body_for_update (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateDmDomainAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\SuccessfulResponseAsObject'; + $request = $this->updateDmDomainRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateDmDomain' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain_id (required) + * @param \Fastly\Model\RequestBodyForUpdate $request_body_for_update (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateDmDomainRequest($options) + { + // unbox the parameters from the associative array + $domain_id = array_key_exists('domain_id', $options) ? $options['domain_id'] : null; + $request_body_for_update = array_key_exists('request_body_for_update', $options) ? $options['request_body_for_update'] : null; + + // verify the required parameter 'domain_id' is set + if ($domain_id === null || (is_array($domain_id) && count($domain_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domain_id when calling updateDmDomain' + ); + } + + $resourcePath = '/domain-management/v1/domains/{domain_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($domain_id !== null) { + $resourcePath = str_replace( + '{' . 'domain_id' . '}', + ObjectSerializer::toPathValue($domain_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($request_body_for_update)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body_for_update)); + } else { + $httpBody = $request_body_for_update; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PATCH', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/DomainOwnershipsApi.php b/lib/Api/DomainOwnershipsApi.php index fb150664..f2ce196f 100644 --- a/lib/Api/DomainOwnershipsApi.php +++ b/lib/Api/DomainOwnershipsApi.php @@ -122,7 +122,7 @@ public function getConfig() * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2004 + * @return \Fastly\Model\InlineResponse2005 */ public function listDomainOwnerships($options) { @@ -143,7 +143,7 @@ public function listDomainOwnerships($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) */ public function listDomainOwnershipsWithHttpInfo($options) { @@ -198,20 +198,20 @@ public function listDomainOwnershipsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2004' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2005' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2004', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2005', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2004'; + $returnType = '\Fastly\Model\InlineResponse2005'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -229,7 +229,7 @@ public function listDomainOwnershipsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2004', + '\Fastly\Model\InlineResponse2005', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -279,7 +279,7 @@ function ($response) { */ public function listDomainOwnershipsAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2004'; + $returnType = '\Fastly\Model\InlineResponse2005'; $request = $this->listDomainOwnershipsRequest($options); return $this->client diff --git a/lib/Api/HealthcheckApi.php b/lib/Api/HealthcheckApi.php index 8efbe98e..58c031de 100644 --- a/lib/Api/HealthcheckApi.php +++ b/lib/Api/HealthcheckApi.php @@ -121,7 +121,7 @@ public function getConfig() * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -157,7 +157,7 @@ public function createHealthcheck($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -281,7 +281,7 @@ public function createHealthcheckWithHttpInfo($options) * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -320,7 +320,7 @@ function ($response) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -385,7 +385,7 @@ function ($exception) { * * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -433,6 +433,13 @@ public function createHealthcheckRequest($options) 'Missing the required parameter $version_id when calling createHealthcheck' ); } + if ($check_interval !== null && $check_interval > 3600000) { + throw new \InvalidArgumentException('invalid value for "$check_interval" when calling HealthcheckApi.createHealthcheck, must be smaller than or equal to 3600000.'); + } + if ($check_interval !== null && $check_interval < 1000) { + throw new \InvalidArgumentException('invalid value for "$check_interval" when calling HealthcheckApi.createHealthcheck, must be bigger than or equal to 1000.'); + } + $resourcePath = '/service/{service_id}/version/{version_id}/healthcheck'; $formParams = []; @@ -1660,7 +1667,7 @@ public function listHealthchecksRequest($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $healthcheck_name The name of the health check. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -1697,7 +1704,7 @@ public function updateHealthcheck($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $healthcheck_name The name of the health check. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -1822,7 +1829,7 @@ public function updateHealthcheckWithHttpInfo($options) * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $healthcheck_name The name of the health check. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -1862,7 +1869,7 @@ function ($response) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $healthcheck_name The name of the health check. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -1928,7 +1935,7 @@ function ($exception) { * @param string $service_id Alphanumeric string identifying the service. (required) * @param int $version_id Integer identifying a service version. (required) * @param string $healthcheck_name The name of the health check. (required) - * @param int $check_interval How often to run the health check in milliseconds. (optional) + * @param int $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. (optional) * @param string $comment A freeform descriptive note. (optional) * @param int $expected_response The status code expected from the host. (optional) * @param string[] $headers Array of custom headers that will be added to the health check probes. (optional) @@ -1983,6 +1990,13 @@ public function updateHealthcheckRequest($options) 'Missing the required parameter $healthcheck_name when calling updateHealthcheck' ); } + if ($check_interval !== null && $check_interval > 3600000) { + throw new \InvalidArgumentException('invalid value for "$check_interval" when calling HealthcheckApi.updateHealthcheck, must be smaller than or equal to 3600000.'); + } + if ($check_interval !== null && $check_interval < 1000) { + throw new \InvalidArgumentException('invalid value for "$check_interval" when calling HealthcheckApi.updateHealthcheck, must be bigger than or equal to 1000.'); + } + $resourcePath = '/service/{service_id}/version/{version_id}/healthcheck/{healthcheck_name}'; $formParams = []; diff --git a/lib/Api/IamRolesApi.php b/lib/Api/IamRolesApi.php index 90c9a165..98c139bb 100644 --- a/lib/Api/IamRolesApi.php +++ b/lib/Api/IamRolesApi.php @@ -110,9 +110,9 @@ public function getConfig() } /** - * Operation addRolePermissions + * Operation iamV1RolesGet * - * Add permissions to a role + * Get IAM role by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -120,22 +120,22 @@ public function getConfig() * URL: https://api.fastly.com * * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body request_body (optional) + * @param string $include Include related data (i.e., permissions). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object + * @return \Fastly\Model\IamV1RoleResponse */ - public function addRolePermissions($options) + public function iamV1RolesGet($options) { - list($response) = $this->addRolePermissionsWithHttpInfo($options); + list($response) = $this->iamV1RolesGetWithHttpInfo($options); return $response; } /** - * Operation addRolePermissionsWithHttpInfo + * Operation iamV1RolesGetWithHttpInfo * - * Add permissions to a role + * Get IAM role by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -143,15 +143,15 @@ public function addRolePermissions($options) * URL: https://api.fastly.com * * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) + * @param string $include Include related data (i.e., permissions). (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\IamV1RoleResponse, HTTP status code, HTTP response headers (array of strings) */ - public function addRolePermissionsWithHttpInfo($options) + public function iamV1RolesGetWithHttpInfo($options) { - $request = $this->addRolePermissionsRequest($options); + $request = $this->iamV1RolesGetRequest($options); try { $options = $this->createHttpClientOption(); @@ -173,7 +173,7 @@ public function addRolePermissionsWithHttpInfo($options) ); } - if ('POST' != 'GET' && 'POST' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -201,21 +201,21 @@ public function addRolePermissionsWithHttpInfo($options) } switch($statusCode) { - case 201: - if ('object' === '\SplFileObject') { + case 200: + if ('\Fastly\Model\IamV1RoleResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\IamV1RoleResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\IamV1RoleResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -230,10 +230,10 @@ public function addRolePermissionsWithHttpInfo($options) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\IamV1RoleResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -244,9 +244,9 @@ public function addRolePermissionsWithHttpInfo($options) } /** - * Operation addRolePermissionsAsync + * Operation iamV1RolesGetAsync * - * Add permissions to a role + * Get IAM role by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -254,14 +254,14 @@ public function addRolePermissionsWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) + * @param string $include Include related data (i.e., permissions). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addRolePermissionsAsync($options) + public function iamV1RolesGetAsync($options) { - return $this->addRolePermissionsAsyncWithHttpInfo($options) + return $this->iamV1RolesGetAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -270,9 +270,9 @@ function ($response) { } /** - * Operation addRolePermissionsAsyncWithHttpInfo + * Operation iamV1RolesGetAsyncWithHttpInfo * - * Add permissions to a role + * Get IAM role by ID * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -280,15 +280,15 @@ function ($response) { * URL: https://api.fastly.com * * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) + * @param string $include Include related data (i.e., permissions). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function addRolePermissionsAsyncWithHttpInfo($options) + public function iamV1RolesGetAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->addRolePermissionsRequest($options); + $returnType = '\Fastly\Model\IamV1RoleResponse'; + $request = $this->iamV1RolesGetRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -324,7 +324,7 @@ function ($exception) { } /** - * Create request for operation 'addRolePermissions' + * Create request for operation 'iamV1RolesGet' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * @@ -332,31 +332,38 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) + * @param string $include Include related data (i.e., permissions). (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function addRolePermissionsRequest($options) + public function iamV1RolesGetRequest($options) { // unbox the parameters from the associative array $role_id = array_key_exists('role_id', $options) ? $options['role_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; + $include = array_key_exists('include', $options) ? $options['include'] : null; // verify the required parameter 'role_id' is set if ($role_id === null || (is_array($role_id) && count($role_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $role_id when calling addRolePermissions' + 'Missing the required parameter $role_id when calling iamV1RolesGet' ); } - $resourcePath = '/roles/{role_id}/permissions'; + $resourcePath = '/iam/v1/roles/{role_id}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($include)) { + $include = ObjectSerializer::serializeCollection($include, 'form', true); + } + if ($include !== null) { + $queryParams['include'] = ObjectSerializer::toString($include); + } // path params @@ -376,18 +383,12 @@ public function addRolePermissionsRequest($options) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -436,7 +437,7 @@ public function addRolePermissionsRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -444,46 +445,48 @@ public function addRolePermissionsRequest($options) } /** - * Operation createARole + * Operation iamV1RolesList * - * Create a role + * List IAM roles * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param array $request_body request_body (optional) + * @param int $limit Number of results per page. The maximum is 1000. (optional, default to 100) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return object + * @return \Fastly\Model\IamV1RoleListResponse */ - public function createARole($options) + public function iamV1RolesList($options) { - list($response) = $this->createARoleWithHttpInfo($options); + list($response) = $this->iamV1RolesListWithHttpInfo($options); return $response; } /** - * Operation createARoleWithHttpInfo + * Operation iamV1RolesListWithHttpInfo * - * Create a role + * List IAM roles * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param array $request_body (optional) + * @param int $limit Number of results per page. The maximum is 1000. (optional, default to 100) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\IamV1RoleListResponse, HTTP status code, HTTP response headers (array of strings) */ - public function createARoleWithHttpInfo($options) + public function iamV1RolesListWithHttpInfo($options) { - $request = $this->createARoleRequest($options); + $request = $this->iamV1RolesListRequest($options); try { $options = $this->createHttpClientOption(); @@ -505,7 +508,7 @@ public function createARoleWithHttpInfo($options) ); } - if ('POST' != 'GET' && 'POST' != 'HEAD') { + if ('GET' != 'GET' && 'GET' != 'HEAD') { $header = $response->getHeader('Fastly-RateLimit-Remaining'); if (count($header) > 0) { $this->config->setRateLimitRemaining($header[0]); @@ -533,21 +536,21 @@ public function createARoleWithHttpInfo($options) } switch($statusCode) { - case 201: - if ('object' === '\SplFileObject') { + case 200: + if ('\Fastly\Model\IamV1RoleListResponse' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, 'object', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\IamV1RoleListResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = 'object'; + $returnType = '\Fastly\Model\IamV1RoleListResponse'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -562,10 +565,10 @@ public function createARoleWithHttpInfo($options) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\Fastly\Model\IamV1RoleListResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -576,23 +579,24 @@ public function createARoleWithHttpInfo($options) } /** - * Operation createARoleAsync + * Operation iamV1RolesListAsync * - * Create a role + * List IAM roles * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param array $request_body (optional) + * @param int $limit Number of results per page. The maximum is 1000. (optional, default to 100) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createARoleAsync($options) + public function iamV1RolesListAsync($options) { - return $this->createARoleAsyncWithHttpInfo($options) + return $this->iamV1RolesListAsyncWithHttpInfo($options) ->then( function ($response) { return $response[0]; @@ -601,24 +605,25 @@ function ($response) { } /** - * Operation createARoleAsyncWithHttpInfo + * Operation iamV1RolesListAsyncWithHttpInfo * - * Create a role + * List IAM roles * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param array $request_body (optional) + * @param int $limit Number of results per page. The maximum is 1000. (optional, default to 100) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createARoleAsyncWithHttpInfo($options) + public function iamV1RolesListAsyncWithHttpInfo($options) { - $returnType = 'object'; - $request = $this->createARoleRequest($options); + $returnType = '\Fastly\Model\IamV1RoleListResponse'; + $request = $this->iamV1RolesListRequest($options); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -654,31 +659,59 @@ function ($exception) { } /** - * Create request for operation 'createARole' + * Create request for operation 'iamV1RolesList' * * Note: the input parameter is an associative array with the keys listed as the parameter name below * * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. * URL: https://api.fastly.com * - * @param array $request_body (optional) + * @param int $limit Number of results per page. The maximum is 1000. (optional, default to 100) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createARoleRequest($options) + public function iamV1RolesListRequest($options) { // unbox the parameters from the associative array - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : 100; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + + if ($limit !== null && $limit > 1000) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling IamRolesApi.iamV1RolesList, must be smaller than or equal to 1000.'); + } - $resourcePath = '/roles'; + $resourcePath = '/iam/v1/roles'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } + } + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } + } @@ -690,18 +723,12 @@ public function createARoleRequest($options) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -750,1894 +777,7 @@ public function createARoleRequest($options) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'POST', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteARole - * - * Delete a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteARole($options) - { - $this->deleteARoleWithHttpInfo($options); - } - - /** - * Operation deleteARoleWithHttpInfo - * - * Delete a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteARoleWithHttpInfo($options) - { - $request = $this->deleteARoleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation deleteARoleAsync - * - * Delete a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteARoleAsync($options) - { - return $this->deleteARoleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteARoleAsyncWithHttpInfo - * - * Delete a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteARoleAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->deleteARoleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteARole' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function deleteARoleRequest($options) - { - // unbox the parameters from the associative array - $role_id = array_key_exists('role_id', $options) ? $options['role_id'] : null; - - // verify the required parameter 'role_id' is set - if ($role_id === null || (is_array($role_id) && count($role_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $role_id when calling deleteARole' - ); - } - - $resourcePath = '/roles/{role_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($role_id !== null) { - $resourcePath = str_replace( - '{' . 'role_id' . '}', - ObjectSerializer::toPathValue($role_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getARole - * - * Get a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function getARole($options) - { - list($response) = $this->getARoleWithHttpInfo($options); - return $response; - } - - /** - * Operation getARoleWithHttpInfo - * - * Get a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function getARoleWithHttpInfo($options) - { - $request = $this->getARoleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getARoleAsync - * - * Get a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getARoleAsync($options) - { - return $this->getARoleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getARoleAsyncWithHttpInfo - * - * Get a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getARoleAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->getARoleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getARole' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getARoleRequest($options) - { - // unbox the parameters from the associative array - $role_id = array_key_exists('role_id', $options) ? $options['role_id'] : null; - - // verify the required parameter 'role_id' is set - if ($role_id === null || (is_array($role_id) && count($role_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $role_id when calling getARole' - ); - } - - $resourcePath = '/roles/{role_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($role_id !== null) { - $resourcePath = str_replace( - '{' . 'role_id' . '}', - ObjectSerializer::toPathValue($role_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listRolePermissions - * - * List permissions in a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function listRolePermissions($options) - { - list($response) = $this->listRolePermissionsWithHttpInfo($options); - return $response; - } - - /** - * Operation listRolePermissionsWithHttpInfo - * - * List permissions in a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function listRolePermissionsWithHttpInfo($options) - { - $request = $this->listRolePermissionsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listRolePermissionsAsync - * - * List permissions in a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listRolePermissionsAsync($options) - { - return $this->listRolePermissionsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listRolePermissionsAsyncWithHttpInfo - * - * List permissions in a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listRolePermissionsAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->listRolePermissionsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listRolePermissions' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function listRolePermissionsRequest($options) - { - // unbox the parameters from the associative array - $role_id = array_key_exists('role_id', $options) ? $options['role_id'] : null; - - // verify the required parameter 'role_id' is set - if ($role_id === null || (is_array($role_id) && count($role_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $role_id when calling listRolePermissions' - ); - } - - $resourcePath = '/roles/{role_id}/permissions'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($role_id !== null) { - $resourcePath = str_replace( - '{' . 'role_id' . '}', - ObjectSerializer::toPathValue($role_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listRoles - * - * List roles - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $per_page Number of records per page. (optional, default to 20) - * @param int $page Current page. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function listRoles($options) - { - list($response) = $this->listRolesWithHttpInfo($options); - return $response; - } - - /** - * Operation listRolesWithHttpInfo - * - * List roles - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $per_page Number of records per page. (optional, default to 20) - * @param int $page Current page. (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function listRolesWithHttpInfo($options) - { - $request = $this->listRolesRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('GET' != 'GET' && 'GET' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listRolesAsync - * - * List roles - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $per_page Number of records per page. (optional, default to 20) - * @param int $page Current page. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listRolesAsync($options) - { - return $this->listRolesAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listRolesAsyncWithHttpInfo - * - * List roles - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $per_page Number of records per page. (optional, default to 20) - * @param int $page Current page. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listRolesAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->listRolesRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listRoles' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param int $per_page Number of records per page. (optional, default to 20) - * @param int $page Current page. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function listRolesRequest($options) - { - // unbox the parameters from the associative array - $per_page = array_key_exists('per_page', $options) ? $options['per_page'] : 20; - $page = array_key_exists('page', $options) ? $options['page'] : null; - - if ($per_page !== null && $per_page > 100) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling IamRolesApi.listRoles, must be smaller than or equal to 100.'); - } - if ($per_page !== null && $per_page < 1) { - throw new \InvalidArgumentException('invalid value for "$per_page" when calling IamRolesApi.listRoles, must be bigger than or equal to 1.'); - } - - - $resourcePath = '/roles'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($per_page !== null) { - if('form' === 'form' && is_array($per_page)) { - foreach($per_page as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['per_page'] = ObjectSerializer::toString($per_page); - } - } - // query params - if ($page !== null) { - if('form' === 'form' && is_array($page)) { - foreach($page as $key => $value) { - $queryParams[$key] = ObjectSerializer::toString($value); - } - } - else { - $queryParams['page'] = ObjectSerializer::toString($page); - } - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation removeRolePermissions - * - * Remove permissions from a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function removeRolePermissions($options) - { - $this->removeRolePermissionsWithHttpInfo($options); - } - - /** - * Operation removeRolePermissionsWithHttpInfo - * - * Remove permissions from a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function removeRolePermissionsWithHttpInfo($options) - { - $request = $this->removeRolePermissionsRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation removeRolePermissionsAsync - * - * Remove permissions from a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function removeRolePermissionsAsync($options) - { - return $this->removeRolePermissionsAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation removeRolePermissionsAsyncWithHttpInfo - * - * Remove permissions from a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function removeRolePermissionsAsyncWithHttpInfo($options) - { - $returnType = ''; - $request = $this->removeRolePermissionsRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'removeRolePermissions' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function removeRolePermissionsRequest($options) - { - // unbox the parameters from the associative array - $role_id = array_key_exists('role_id', $options) ? $options['role_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'role_id' is set - if ($role_id === null || (is_array($role_id) && count($role_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $role_id when calling removeRolePermissions' - ); - } - - $resourcePath = '/roles/{role_id}/permissions'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($role_id !== null) { - $resourcePath = str_replace( - '{' . 'role_id' . '}', - ObjectSerializer::toPathValue($role_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $operationHost . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateARole - * - * Update a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return object - */ - public function updateARole($options) - { - list($response) = $this->updateARoleWithHttpInfo($options); - return $response; - } - - /** - * Operation updateARoleWithHttpInfo - * - * Update a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \Fastly\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of object, HTTP status code, HTTP response headers (array of strings) - */ - public function updateARoleWithHttpInfo($options) - { - $request = $this->updateARoleRequest($options); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - if ('PATCH' != 'GET' && 'PATCH' != 'HEAD') { - $header = $response->getHeader('Fastly-RateLimit-Remaining'); - if (count($header) > 0) { - $this->config->setRateLimitRemaining($header[0]); - } - - $header = $response->getHeader('Fastly-RateLimit-Reset'); - if (count($header) > 0) { - $this->config->setRateLimitReset($header[0]); - } - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('object' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, 'object', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'object'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'object', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation updateARoleAsync - * - * Update a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateARoleAsync($options) - { - return $this->updateARoleAsyncWithHttpInfo($options) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateARoleAsyncWithHttpInfo - * - * Update a role - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateARoleAsyncWithHttpInfo($options) - { - $returnType = 'object'; - $request = $this->updateARoleRequest($options); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateARole' - * - * Note: the input parameter is an associative array with the keys listed as the parameter name below - * - * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. - * URL: https://api.fastly.com - * - * @param string $role_id Alphanumeric string identifying the role. (required) - * @param array $request_body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function updateARoleRequest($options) - { - // unbox the parameters from the associative array - $role_id = array_key_exists('role_id', $options) ? $options['role_id'] : null; - $request_body = array_key_exists('request_body', $options) ? $options['request_body'] : null; - - // verify the required parameter 'role_id' is set - if ($role_id === null || (is_array($role_id) && count($role_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $role_id when calling updateARole' - ); - } - - $resourcePath = '/roles/{role_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($role_id !== null) { - $resourcePath = str_replace( - '{' . 'role_id' . '}', - ObjectSerializer::toPathValue($role_id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($request_body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($request_body)); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires API token authentication - $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); - if ($apiToken !== null) { - $headers['Fastly-Key'] = $apiToken; - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $operationHosts = ["https://api.fastly.com"]; - if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { - throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); - } - $operationHost = $operationHosts[$this->hostIndex]; - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PATCH', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/lib/Api/KvStoreApi.php b/lib/Api/KvStoreApi.php index 8f62ddd5..8b50e62d 100644 --- a/lib/Api/KvStoreApi.php +++ b/lib/Api/KvStoreApi.php @@ -1055,7 +1055,7 @@ public function kvStoreGetRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2005 + * @return \Fastly\Model\InlineResponse2006 */ public function kvStoreList($options) { @@ -1079,7 +1079,7 @@ public function kvStoreList($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreListWithHttpInfo($options) { @@ -1134,20 +1134,20 @@ public function kvStoreListWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2005' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2006' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2005', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2006', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2005'; + $returnType = '\Fastly\Model\InlineResponse2006'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1165,7 +1165,7 @@ public function kvStoreListWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2005', + '\Fastly\Model\InlineResponse2006', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1221,7 +1221,7 @@ function ($response) { */ public function kvStoreListAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2005'; + $returnType = '\Fastly\Model\InlineResponse2006'; $request = $this->kvStoreListRequest($options); return $this->client diff --git a/lib/Api/KvStoreItemApi.php b/lib/Api/KvStoreItemApi.php index 7b70db23..ccd015c7 100644 --- a/lib/Api/KvStoreItemApi.php +++ b/lib/Api/KvStoreItemApi.php @@ -793,7 +793,7 @@ public function kvStoreGetItemRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2006 + * @return \Fastly\Model\InlineResponse2007 */ public function kvStoreListItemKeys($options) { @@ -819,7 +819,7 @@ public function kvStoreListItemKeys($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreListItemKeysWithHttpInfo($options) { @@ -874,20 +874,20 @@ public function kvStoreListItemKeysWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2006' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2007' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2006', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2007', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2006'; + $returnType = '\Fastly\Model\InlineResponse2007'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -905,7 +905,7 @@ public function kvStoreListItemKeysWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2006', + '\Fastly\Model\InlineResponse2007', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -965,7 +965,7 @@ function ($response) { */ public function kvStoreListItemKeysAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2006'; + $returnType = '\Fastly\Model\InlineResponse2007'; $request = $this->kvStoreListItemKeysRequest($options); return $this->client diff --git a/lib/Api/LoggingHttpsApi.php b/lib/Api/LoggingHttpsApi.php index 4dd4d316..bd85c435 100644 --- a/lib/Api/LoggingHttpsApi.php +++ b/lib/Api/LoggingHttpsApi.php @@ -140,6 +140,7 @@ public function getConfig() * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -182,6 +183,7 @@ public function createLogHttps($options) * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -312,6 +314,7 @@ public function createLogHttpsWithHttpInfo($options) * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -357,6 +360,7 @@ function ($response) { * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -428,6 +432,7 @@ function ($exception) { * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -456,6 +461,7 @@ public function createLogHttpsRequest($options) $header_value = array_key_exists('header_value', $options) ? $options['header_value'] : 'null'; $method = array_key_exists('method', $options) ? $options['method'] : 'POST'; $json_format = array_key_exists('json_format', $options) ? $options['json_format'] : null; + $period = array_key_exists('period', $options) ? $options['period'] : 5; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -572,6 +578,10 @@ public function createLogHttpsRequest($options) if ($json_format !== null) { $formParams['json_format'] = ObjectSerializer::toFormValue($json_format); } + // form params + if ($period !== null) { + $formParams['period'] = ObjectSerializer::toFormValue($period); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -1739,6 +1749,7 @@ public function listLogHttpsRequest($options) * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1782,6 +1793,7 @@ public function updateLogHttps($options) * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1913,6 +1925,7 @@ public function updateLogHttpsWithHttpInfo($options) * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1959,6 +1972,7 @@ function ($response) { * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2031,6 +2045,7 @@ function ($exception) { * @param string $header_value Value of the custom header sent with the request. (optional, default to 'null') * @param string $method HTTP method used for request. (optional, default to 'POST') * @param string $json_format Enforces valid JSON formatting for log entries. (optional) + * @param int $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. (optional, default to 5) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2060,6 +2075,7 @@ public function updateLogHttpsRequest($options) $header_value = array_key_exists('header_value', $options) ? $options['header_value'] : 'null'; $method = array_key_exists('method', $options) ? $options['method'] : 'POST'; $json_format = array_key_exists('json_format', $options) ? $options['json_format'] : null; + $period = array_key_exists('period', $options) ? $options['period'] : 5; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -2190,6 +2206,10 @@ public function updateLogHttpsRequest($options) if ($json_format !== null) { $formParams['json_format'] = ObjectSerializer::toFormValue($json_format); } + // form params + if ($period !== null) { + $formParams['period'] = ObjectSerializer::toFormValue($period); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( diff --git a/lib/Api/ProductApiDiscoveryApi.php b/lib/Api/ProductApiDiscoveryApi.php new file mode 100644 index 00000000..cce80b23 --- /dev/null +++ b/lib/Api/ProductApiDiscoveryApi.php @@ -0,0 +1,1353 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductApiDiscovery + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductApiDiscovery($options) + { + $this->disableProductApiDiscoveryWithHttpInfo($options); + } + + /** + * Operation disableProductApiDiscoveryWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductApiDiscoveryWithHttpInfo($options) + { + $request = $this->disableProductApiDiscoveryRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductApiDiscoveryAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductApiDiscoveryAsync($options) + { + return $this->disableProductApiDiscoveryAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductApiDiscoveryAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductApiDiscoveryAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductApiDiscoveryRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductApiDiscovery' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductApiDiscoveryRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling disableProductApiDiscovery' + ); + } + + $resourcePath = '/enabled-products/v1/api_discovery/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableProductApiDiscovery + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ApiDiscoveryResponseEnable + */ + public function enableProductApiDiscovery($options) + { + list($response) = $this->enableProductApiDiscoveryWithHttpInfo($options); + return $response; + } + + /** + * Operation enableProductApiDiscoveryWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ApiDiscoveryResponseEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableProductApiDiscoveryWithHttpInfo($options) + { + $request = $this->enableProductApiDiscoveryRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ApiDiscoveryResponseEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ApiDiscoveryResponseEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ApiDiscoveryResponseEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ApiDiscoveryResponseEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableProductApiDiscoveryAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductApiDiscoveryAsync($options) + { + return $this->enableProductApiDiscoveryAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableProductApiDiscoveryAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableProductApiDiscoveryAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ApiDiscoveryResponseEnable'; + $request = $this->enableProductApiDiscoveryRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableProductApiDiscovery' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableProductApiDiscoveryRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling enableProductApiDiscovery' + ); + } + + $resourcePath = '/enabled-products/v1/api_discovery/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getProductApiDiscovery + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ApiDiscoveryResponseEnable + */ + public function getProductApiDiscovery($options) + { + list($response) = $this->getProductApiDiscoveryWithHttpInfo($options); + return $response; + } + + /** + * Operation getProductApiDiscoveryWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ApiDiscoveryResponseEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getProductApiDiscoveryWithHttpInfo($options) + { + $request = $this->getProductApiDiscoveryRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ApiDiscoveryResponseEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ApiDiscoveryResponseEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ApiDiscoveryResponseEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ApiDiscoveryResponseEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getProductApiDiscoveryAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductApiDiscoveryAsync($options) + { + return $this->getProductApiDiscoveryAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getProductApiDiscoveryAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getProductApiDiscoveryAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ApiDiscoveryResponseEnable'; + $request = $this->getProductApiDiscoveryRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getProductApiDiscovery' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getProductApiDiscoveryRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling getProductApiDiscovery' + ); + } + + $resourcePath = '/enabled-products/v1/api_discovery/services/{service_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getServicesProductApiDiscovery + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\ApiDiscoveryResponseBodyGetAllServices + */ + public function getServicesProductApiDiscovery($options) + { + list($response) = $this->getServicesProductApiDiscoveryWithHttpInfo($options); + return $response; + } + + /** + * Operation getServicesProductApiDiscoveryWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\ApiDiscoveryResponseBodyGetAllServices, HTTP status code, HTTP response headers (array of strings) + */ + public function getServicesProductApiDiscoveryWithHttpInfo($options) + { + $request = $this->getServicesProductApiDiscoveryRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\ApiDiscoveryResponseBodyGetAllServices' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\ApiDiscoveryResponseBodyGetAllServices', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\ApiDiscoveryResponseBodyGetAllServices'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\ApiDiscoveryResponseBodyGetAllServices', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getServicesProductApiDiscoveryAsync + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductApiDiscoveryAsync($options) + { + return $this->getServicesProductApiDiscoveryAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getServicesProductApiDiscoveryAsyncWithHttpInfo + * + * Get services with product enabled + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getServicesProductApiDiscoveryAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\ApiDiscoveryResponseBodyGetAllServices'; + $request = $this->getServicesProductApiDiscoveryRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getServicesProductApiDiscovery' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getServicesProductApiDiscoveryRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/api_discovery/services'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/SecretStoreApi.php b/lib/Api/SecretStoreApi.php index 6b9af2da..c1a36f19 100644 --- a/lib/Api/SecretStoreApi.php +++ b/lib/Api/SecretStoreApi.php @@ -1340,7 +1340,7 @@ public function getSecretStoreRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2007 + * @return \Fastly\Model\InlineResponse2008 */ public function getSecretStores($options) { @@ -1364,7 +1364,7 @@ public function getSecretStores($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) */ public function getSecretStoresWithHttpInfo($options) { @@ -1419,20 +1419,20 @@ public function getSecretStoresWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2007' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2008' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2008', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2007'; + $returnType = '\Fastly\Model\InlineResponse2008'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1450,7 +1450,7 @@ public function getSecretStoresWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2007', + '\Fastly\Model\InlineResponse2008', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1506,7 +1506,7 @@ function ($response) { */ public function getSecretStoresAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2007'; + $returnType = '\Fastly\Model\InlineResponse2008'; $request = $this->getSecretStoresRequest($options); return $this->client diff --git a/lib/Api/SecretStoreItemApi.php b/lib/Api/SecretStoreItemApi.php index bdd7549c..fffcd77b 100644 --- a/lib/Api/SecretStoreItemApi.php +++ b/lib/Api/SecretStoreItemApi.php @@ -1098,7 +1098,7 @@ public function getSecretRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2008 + * @return \Fastly\Model\InlineResponse2009 */ public function getSecrets($options) { @@ -1122,7 +1122,7 @@ public function getSecrets($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ public function getSecretsWithHttpInfo($options) { @@ -1177,20 +1177,20 @@ public function getSecretsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2008' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2009' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2008', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2008'; + $returnType = '\Fastly\Model\InlineResponse2009'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1208,7 +1208,7 @@ public function getSecretsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2008', + '\Fastly\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1264,7 +1264,7 @@ function ($response) { */ public function getSecretsAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2008'; + $returnType = '\Fastly\Model\InlineResponse2009'; $request = $this->getSecretsRequest($options); return $this->client diff --git a/lib/Api/ServiceAuthorizationsApi.php b/lib/Api/ServiceAuthorizationsApi.php index eefd0a69..750f6a02 100644 --- a/lib/Api/ServiceAuthorizationsApi.php +++ b/lib/Api/ServiceAuthorizationsApi.php @@ -714,7 +714,7 @@ public function deleteServiceAuthorizationRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2009 + * @return \Fastly\Model\InlineResponse20010 */ public function deleteServiceAuthorization2($options) { @@ -736,7 +736,7 @@ public function deleteServiceAuthorization2($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse20010, HTTP status code, HTTP response headers (array of strings) */ public function deleteServiceAuthorization2WithHttpInfo($options) { @@ -791,20 +791,20 @@ public function deleteServiceAuthorization2WithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2009' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse20010' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2009', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse20010', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2009'; + $returnType = '\Fastly\Model\InlineResponse20010'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -822,7 +822,7 @@ public function deleteServiceAuthorization2WithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2009', + '\Fastly\Model\InlineResponse20010', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -874,7 +874,7 @@ function ($response) { */ public function deleteServiceAuthorization2AsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2009'; + $returnType = '\Fastly\Model\InlineResponse20010'; $request = $this->deleteServiceAuthorization2Request($options); return $this->client diff --git a/lib/Api/UserApi.php b/lib/Api/UserApi.php index 1c7f36a0..748ceedc 100644 --- a/lib/Api/UserApi.php +++ b/lib/Api/UserApi.php @@ -125,6 +125,7 @@ public function getConfig() * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -155,6 +156,7 @@ public function createUser($options) * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -273,6 +275,7 @@ public function createUserWithHttpInfo($options) * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -306,6 +309,7 @@ function ($response) { * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -365,6 +369,7 @@ function ($exception) { * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -381,6 +386,7 @@ public function createUserRequest($options) $locked = array_key_exists('locked', $options) ? $options['locked'] : null; $require_new_password = array_key_exists('require_new_password', $options) ? $options['require_new_password'] : null; $role = array_key_exists('role', $options) ? $options['role'] : null; + $roles = array_key_exists('roles', $options) ? $options['roles'] : null; $two_factor_auth_enabled = array_key_exists('two_factor_auth_enabled', $options) ? $options['two_factor_auth_enabled'] : null; $two_factor_setup_required = array_key_exists('two_factor_setup_required', $options) ? $options['two_factor_setup_required'] : null; @@ -420,6 +426,10 @@ public function createUserRequest($options) $formParams['role'] = ObjectSerializer::toFormValue($role); } // form params + if ($roles !== null) { + $formParams['roles'] = ObjectSerializer::toFormValue($roles); + } + // form params if ($two_factor_auth_enabled !== null) { $formParams['two_factor_auth_enabled'] = ObjectSerializer::toFormValue($two_factor_auth_enabled); } @@ -1781,6 +1791,7 @@ public function requestPasswordResetRequest($options) * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -1811,6 +1822,7 @@ public function updateUser($options) * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -1929,6 +1941,7 @@ public function updateUserWithHttpInfo($options) * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -1962,6 +1975,7 @@ function ($response) { * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -2021,6 +2035,7 @@ function ($exception) { * @param bool $locked Indicates whether the is account is locked for editing or not. (optional) * @param bool $require_new_password Indicates if a new password is required at next login. (optional) * @param \Fastly\Model\RoleUser $role (optional) + * @param string[] $roles A list of role IDs assigned to the user. (optional) * @param bool $two_factor_auth_enabled Indicates if 2FA is enabled on the user. (optional) * @param bool $two_factor_setup_required Indicates if 2FA is required by the user's customer account. (optional) * @@ -2037,6 +2052,7 @@ public function updateUserRequest($options) $locked = array_key_exists('locked', $options) ? $options['locked'] : null; $require_new_password = array_key_exists('require_new_password', $options) ? $options['require_new_password'] : null; $role = array_key_exists('role', $options) ? $options['role'] : null; + $roles = array_key_exists('roles', $options) ? $options['roles'] : null; $two_factor_auth_enabled = array_key_exists('two_factor_auth_enabled', $options) ? $options['two_factor_auth_enabled'] : null; $two_factor_setup_required = array_key_exists('two_factor_setup_required', $options) ? $options['two_factor_setup_required'] : null; @@ -2090,6 +2106,10 @@ public function updateUserRequest($options) $formParams['role'] = ObjectSerializer::toFormValue($role); } // form params + if ($roles !== null) { + $formParams['roles'] = ObjectSerializer::toFormValue($roles); + } + // form params if ($two_factor_auth_enabled !== null) { $formParams['two_factor_auth_enabled'] = ObjectSerializer::toFormValue($two_factor_auth_enabled); } diff --git a/lib/Configuration.php b/lib/Configuration.php index b4261ff2..fcd80485 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/11.0.0'; + protected $userAgent = 'fastly-php/12.0.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 11.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 12.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/ApiDiscoveryResponseBodyGetAllServices.php b/lib/Model/ApiDiscoveryResponseBodyGetAllServices.php new file mode 100644 index 00000000..fbd2968f --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseBodyGetAllServices.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseBodyGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_body_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ApiDiscoveryResponseProductProduct', + 'customer' => '\Fastly\Model\ApiDiscoveryResponseCustomerCustomer', + 'services' => 'string[]', + '_links' => '\Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + 'services' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + 'services' => 'services', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + 'services' => 'setServices', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + 'services' => 'getServices', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['services'] = $data['services'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ApiDiscoveryResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ApiDiscoveryResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\ApiDiscoveryResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\ApiDiscoveryResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services for a customer with API Discovery enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseCustomer.php b/lib/Model/ApiDiscoveryResponseCustomer.php new file mode 100644 index 00000000..fa5ad272 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\ApiDiscoveryResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\ApiDiscoveryResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\ApiDiscoveryResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseCustomerCustomer.php b/lib/Model/ApiDiscoveryResponseCustomerCustomer.php new file mode 100644 index 00000000..1f718287 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseCustomerCustomer.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseCustomerCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_customer_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Customer identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseEnable.php b/lib/Model/ApiDiscoveryResponseEnable.php new file mode 100644 index 00000000..f24deb52 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ApiDiscoveryResponseProductProduct', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', + '_links' => '\Fastly\Model\ApiDiscoveryResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'service' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'service' => 'service', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'service' => 'setService', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'service' => 'getService', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['service'] = $data['service'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ApiDiscoveryResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ApiDiscoveryResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets service + * + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\ApiDiscoveryResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ApiDiscoveryResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseEnabledServices.php b/lib/Model/ApiDiscoveryResponseEnabledServices.php new file mode 100644 index 00000000..453326fe --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseEnabledServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseEnabledServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_enabled_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'services' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'services' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'services' => 'services' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'services' => 'setServices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'services' => 'getServices' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['services'] = $data['services'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets services + * + * @return string[]|null + */ + public function getServices() + { + return $this->container['services']; + } + + /** + * Sets services + * + * @param string[]|null $services A list of services for a customer with API Discovery enabled. + * + * @return self + */ + public function setServices($services) + { + $this->container['services'] = $services; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseLinks.php b/lib/Model/ApiDiscoveryResponseLinks.php new file mode 100644 index 00000000..12819e58 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\ApiDiscoveryResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\ApiDiscoveryResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ApiDiscoveryResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseLinksGetAllServices.php b/lib/Model/ApiDiscoveryResponseLinksGetAllServices.php new file mode 100644 index 00000000..005097cf --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseLinksGetAllServices.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseLinksGetAllServices implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_links_get_all_services'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\ApiDiscoveryResponseLinksGetAllServicesLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.php b/lib/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.php new file mode 100644 index 00000000..51b9f68d --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseLinksGetAllServicesLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseLinksGetAllServicesLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_links_get_all_services__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseLinksLinks.php b/lib/Model/ApiDiscoveryResponseLinksLinks.php new file mode 100644 index 00000000..15834471 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseLinksLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseProduct.php b/lib/Model/ApiDiscoveryResponseProduct.php new file mode 100644 index 00000000..f12f5ed5 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\ApiDiscoveryResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\ApiDiscoveryResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\ApiDiscoveryResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseProductProduct.php b/lib/Model/ApiDiscoveryResponseProductProduct.php new file mode 100644 index 00000000..b5d75beb --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ApiDiscoveryResponseService.php b/lib/Model/ApiDiscoveryResponseService.php new file mode 100644 index 00000000..de2005a7 --- /dev/null +++ b/lib/Model/ApiDiscoveryResponseService.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ApiDiscoveryResponseService implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'api_discovery_response_service'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service' => 'service' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service' => 'setService' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service' => 'getService' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service'] = $data['service'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service + * + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null + */ + public function getService() + { + return $this->container['service']; + } + + /** + * Sets service + * + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service + * + * @return self + */ + public function setService($service) + { + $this->container['service'] = $service; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/BotManagementResponseServiceService.php b/lib/Model/ApiDiscoveryResponseServiceService.php similarity index 96% rename from lib/Model/BotManagementResponseServiceService.php rename to lib/Model/ApiDiscoveryResponseServiceService.php index 1387616b..c4400131 100644 --- a/lib/Model/BotManagementResponseServiceService.php +++ b/lib/Model/ApiDiscoveryResponseServiceService.php @@ -1,6 +1,6 @@ '\Fastly\Model\BotManagementResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\BotManagementResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/BotManagementResponseService.php b/lib/Model/BotManagementResponseService.php index 90f20400..8d3763b0 100644 --- a/lib/Model/BotManagementResponseService.php +++ b/lib/Model/BotManagementResponseService.php @@ -53,7 +53,7 @@ class BotManagementResponseService implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/BrotliCompressionResponseBodyEnable.php b/lib/Model/BrotliCompressionResponseBodyEnable.php index f4b44df2..ac935879 100644 --- a/lib/Model/BrotliCompressionResponseBodyEnable.php +++ b/lib/Model/BrotliCompressionResponseBodyEnable.php @@ -54,7 +54,7 @@ class BrotliCompressionResponseBodyEnable implements ModelInterface, ArrayAccess */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\BrotliCompressionResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\BrotliCompressionResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/BrotliCompressionResponseService.php b/lib/Model/BrotliCompressionResponseService.php index 142bdeff..bd8f696a 100644 --- a/lib/Model/BrotliCompressionResponseService.php +++ b/lib/Model/BrotliCompressionResponseService.php @@ -53,7 +53,7 @@ class BrotliCompressionResponseService implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/DdosProtectionResponseConfigure.php b/lib/Model/DdosProtectionResponseConfigure.php index 7a59fcde..4a05a6fa 100644 --- a/lib/Model/DdosProtectionResponseConfigure.php +++ b/lib/Model/DdosProtectionResponseConfigure.php @@ -54,7 +54,7 @@ class DdosProtectionResponseConfigure implements ModelInterface, ArrayAccess, \J */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\DdosProtectionResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', 'configuration' => '\Fastly\Model\DdosProtectionResponseConfigurationConfiguration', '_links' => '\Fastly\Model\DdosProtectionResponseLinksLinks' ]; @@ -244,7 +244,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -254,7 +254,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/DdosProtectionResponseEnable.php b/lib/Model/DdosProtectionResponseEnable.php index 1f92ead9..8f097700 100644 --- a/lib/Model/DdosProtectionResponseEnable.php +++ b/lib/Model/DdosProtectionResponseEnable.php @@ -54,7 +54,7 @@ class DdosProtectionResponseEnable implements ModelInterface, ArrayAccess, \Json */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\DdosProtectionResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\DdosProtectionResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/DdosProtectionResponseService.php b/lib/Model/DdosProtectionResponseService.php index 37e41e9a..1db05a52 100644 --- a/lib/Model/DdosProtectionResponseService.php +++ b/lib/Model/DdosProtectionResponseService.php @@ -53,7 +53,7 @@ class DdosProtectionResponseService implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/DdosProtectionRuleWithStats.php b/lib/Model/DdosProtectionRuleWithStats.php new file mode 100644 index 00000000..afa9d284 --- /dev/null +++ b/lib/Model/DdosProtectionRuleWithStats.php @@ -0,0 +1,704 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionRuleWithStats implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_rule_with_stats'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'created_at' => '\DateTime', + 'updated_at' => '\DateTime', + 'id' => 'string', + 'name' => 'string', + 'action' => 'string', + 'customer_id' => 'string', + 'service_id' => 'string', + 'source_ip' => 'string', + 'country_code' => 'string', + 'host' => 'string', + 'asn' => 'string', + 'source_ip_prefix' => 'string', + 'additional_attributes' => 'string[]', + 'traffic_stats' => '\Fastly\Model\DdosProtectionTrafficStats' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'created_at' => 'date-time', + 'updated_at' => 'date-time', + 'id' => null, + 'name' => null, + 'action' => null, + 'customer_id' => null, + 'service_id' => null, + 'source_ip' => null, + 'country_code' => null, + 'host' => null, + 'asn' => null, + 'source_ip_prefix' => null, + 'additional_attributes' => null, + 'traffic_stats' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'created_at' => 'created_at', + 'updated_at' => 'updated_at', + 'id' => 'id', + 'name' => 'name', + 'action' => 'action', + 'customer_id' => 'customer_id', + 'service_id' => 'service_id', + 'source_ip' => 'source_ip', + 'country_code' => 'country_code', + 'host' => 'host', + 'asn' => 'asn', + 'source_ip_prefix' => 'source_ip_prefix', + 'additional_attributes' => 'additional_attributes', + 'traffic_stats' => 'traffic_stats' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt', + 'id' => 'setId', + 'name' => 'setName', + 'action' => 'setAction', + 'customer_id' => 'setCustomerId', + 'service_id' => 'setServiceId', + 'source_ip' => 'setSourceIp', + 'country_code' => 'setCountryCode', + 'host' => 'setHost', + 'asn' => 'setAsn', + 'source_ip_prefix' => 'setSourceIpPrefix', + 'additional_attributes' => 'setAdditionalAttributes', + 'traffic_stats' => 'setTrafficStats' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt', + 'id' => 'getId', + 'name' => 'getName', + 'action' => 'getAction', + 'customer_id' => 'getCustomerId', + 'service_id' => 'getServiceId', + 'source_ip' => 'getSourceIp', + 'country_code' => 'getCountryCode', + 'host' => 'getHost', + 'asn' => 'getAsn', + 'source_ip_prefix' => 'getSourceIpPrefix', + 'additional_attributes' => 'getAdditionalAttributes', + 'traffic_stats' => 'getTrafficStats' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['name'] = $data['name'] ?? null; + $this->container['action'] = $data['action'] ?? 'default'; + $this->container['customer_id'] = $data['customer_id'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['source_ip'] = $data['source_ip'] ?? null; + $this->container['country_code'] = $data['country_code'] ?? null; + $this->container['host'] = $data['host'] ?? null; + $this->container['asn'] = $data['asn'] ?? null; + $this->container['source_ip_prefix'] = $data['source_ip_prefix'] ?? null; + $this->container['additional_attributes'] = $data['additional_attributes'] ?? null; + $this->container['traffic_stats'] = $data['traffic_stats'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created_at + * + * @return \DateTime|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime|null $created_at Date and time in ISO 8601 format. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime|null $updated_at Date and time in ISO 8601 format. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Unique ID of the rule. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name A human-readable name for the rule. + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets action + * + * @return string|null + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string|null $action Action types for a rule. Supported action values are default, block, log, off. The default action value follows the current protection mode of the associated service. + * + * @return self + */ + public function setAction($action) + { + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets customer_id + * + * @return string|null + */ + public function getCustomerId() + { + return $this->container['customer_id']; + } + + /** + * Sets customer_id + * + * @param string|null $customer_id Alphanumeric string identifying the customer. + * + * @return self + */ + public function setCustomerId($customer_id) + { + $this->container['customer_id'] = $customer_id; + + return $this; + } + + /** + * Gets service_id + * + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id Alphanumeric string identifying the service. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; + + return $this; + } + + /** + * Gets source_ip + * + * @return string|null + */ + public function getSourceIp() + { + return $this->container['source_ip']; + } + + /** + * Sets source_ip + * + * @param string|null $source_ip Source IP address attribute. + * + * @return self + */ + public function setSourceIp($source_ip) + { + $this->container['source_ip'] = $source_ip; + + return $this; + } + + /** + * Gets country_code + * + * @return string|null + */ + public function getCountryCode() + { + return $this->container['country_code']; + } + + /** + * Sets country_code + * + * @param string|null $country_code Country code attribute. + * + * @return self + */ + public function setCountryCode($country_code) + { + $this->container['country_code'] = $country_code; + + return $this; + } + + /** + * Gets host + * + * @return string|null + */ + public function getHost() + { + return $this->container['host']; + } + + /** + * Sets host + * + * @param string|null $host Host attribute. + * + * @return self + */ + public function setHost($host) + { + $this->container['host'] = $host; + + return $this; + } + + /** + * Gets asn + * + * @return string|null + */ + public function getAsn() + { + return $this->container['asn']; + } + + /** + * Sets asn + * + * @param string|null $asn ASN attribute. + * + * @return self + */ + public function setAsn($asn) + { + $this->container['asn'] = $asn; + + return $this; + } + + /** + * Gets source_ip_prefix + * + * @return string|null + */ + public function getSourceIpPrefix() + { + return $this->container['source_ip_prefix']; + } + + /** + * Sets source_ip_prefix + * + * @param string|null $source_ip_prefix Source IP prefix attribute. + * + * @return self + */ + public function setSourceIpPrefix($source_ip_prefix) + { + $this->container['source_ip_prefix'] = $source_ip_prefix; + + return $this; + } + + /** + * Gets additional_attributes + * + * @return string[]|null + */ + public function getAdditionalAttributes() + { + return $this->container['additional_attributes']; + } + + /** + * Sets additional_attributes + * + * @param string[]|null $additional_attributes Attribute category for additional, unlisted attributes used in a rule. + * + * @return self + */ + public function setAdditionalAttributes($additional_attributes) + { + $this->container['additional_attributes'] = $additional_attributes; + + return $this; + } + + /** + * Gets traffic_stats + * + * @return \Fastly\Model\DdosProtectionTrafficStats|null + */ + public function getTrafficStats() + { + return $this->container['traffic_stats']; + } + + /** + * Sets traffic_stats + * + * @param \Fastly\Model\DdosProtectionTrafficStats|null $traffic_stats traffic_stats + * + * @return self + */ + public function setTrafficStats($traffic_stats) + { + $this->container['traffic_stats'] = $traffic_stats; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionRuleWithStatsAllOf.php b/lib/Model/DdosProtectionRuleWithStatsAllOf.php new file mode 100644 index 00000000..d7500bd2 --- /dev/null +++ b/lib/Model/DdosProtectionRuleWithStatsAllOf.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionRuleWithStatsAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_rule_with_stats_allOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'traffic_stats' => '\Fastly\Model\DdosProtectionTrafficStats' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'traffic_stats' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'traffic_stats' => 'traffic_stats' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'traffic_stats' => 'setTrafficStats' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'traffic_stats' => 'getTrafficStats' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['traffic_stats'] = $data['traffic_stats'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets traffic_stats + * + * @return \Fastly\Model\DdosProtectionTrafficStats|null + */ + public function getTrafficStats() + { + return $this->container['traffic_stats']; + } + + /** + * Sets traffic_stats + * + * @param \Fastly\Model\DdosProtectionTrafficStats|null $traffic_stats traffic_stats + * + * @return self + */ + public function setTrafficStats($traffic_stats) + { + $this->container['traffic_stats'] = $traffic_stats; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DdosProtectionTrafficStats.php b/lib/Model/DdosProtectionTrafficStats.php index 5f40e692..8b509aff 100644 --- a/lib/Model/DdosProtectionTrafficStats.php +++ b/lib/Model/DdosProtectionTrafficStats.php @@ -57,7 +57,8 @@ class DdosProtectionTrafficStats implements ModelInterface, ArrayAccess, \JsonSe 'updated_at' => '\DateTime', 'customer_id' => 'string', 'service_id' => 'string', - 'attributes' => '\Fastly\Model\DdosProtectionAttributeStats[]' + 'attributes' => '\Fastly\Model\DdosProtectionAttributeStats[]', + 'traffic_percentage' => 'float' ]; /** @@ -72,7 +73,8 @@ class DdosProtectionTrafficStats implements ModelInterface, ArrayAccess, \JsonSe 'updated_at' => 'date-time', 'customer_id' => null, 'service_id' => null, - 'attributes' => null + 'attributes' => null, + 'traffic_percentage' => 'float' ]; /** @@ -106,7 +108,8 @@ public static function fastlyFormats() 'updated_at' => 'updated_at', 'customer_id' => 'customer_id', 'service_id' => 'service_id', - 'attributes' => 'attributes' + 'attributes' => 'attributes', + 'traffic_percentage' => 'traffic_percentage' ]; /** @@ -119,7 +122,8 @@ public static function fastlyFormats() 'updated_at' => 'setUpdatedAt', 'customer_id' => 'setCustomerId', 'service_id' => 'setServiceId', - 'attributes' => 'setAttributes' + 'attributes' => 'setAttributes', + 'traffic_percentage' => 'setTrafficPercentage' ]; /** @@ -132,7 +136,8 @@ public static function fastlyFormats() 'updated_at' => 'getUpdatedAt', 'customer_id' => 'getCustomerId', 'service_id' => 'getServiceId', - 'attributes' => 'getAttributes' + 'attributes' => 'getAttributes', + 'traffic_percentage' => 'getTrafficPercentage' ]; /** @@ -197,6 +202,7 @@ public function __construct(array $data = null) $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['traffic_percentage'] = $data['traffic_percentage'] ?? null; } /** @@ -342,6 +348,32 @@ public function setAttributes($attributes) return $this; } + + /** + * Gets traffic_percentage + * + * @return float|null + */ + public function getTrafficPercentage() + { + return $this->container['traffic_percentage']; + } + + /** + * Sets traffic_percentage + * + * @param float|null $traffic_percentage Rule traffic percentage for the event. + * + * @return self + */ + public function setTrafficPercentage($traffic_percentage) + { + + + $this->container['traffic_percentage'] = $traffic_percentage; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/DdosProtectionTrafficStatsAllOf.php b/lib/Model/DdosProtectionTrafficStatsAllOf.php index 36f3bb7f..d44430df 100644 --- a/lib/Model/DdosProtectionTrafficStatsAllOf.php +++ b/lib/Model/DdosProtectionTrafficStatsAllOf.php @@ -55,7 +55,8 @@ class DdosProtectionTrafficStatsAllOf implements ModelInterface, ArrayAccess, \J protected static $fastlyTypes = [ 'customer_id' => 'string', 'service_id' => 'string', - 'attributes' => '\Fastly\Model\DdosProtectionAttributeStats[]' + 'attributes' => '\Fastly\Model\DdosProtectionAttributeStats[]', + 'traffic_percentage' => 'float' ]; /** @@ -68,7 +69,8 @@ class DdosProtectionTrafficStatsAllOf implements ModelInterface, ArrayAccess, \J protected static $fastlyFormats = [ 'customer_id' => null, 'service_id' => null, - 'attributes' => null + 'attributes' => null, + 'traffic_percentage' => 'float' ]; /** @@ -100,7 +102,8 @@ public static function fastlyFormats() protected static $attributeMap = [ 'customer_id' => 'customer_id', 'service_id' => 'service_id', - 'attributes' => 'attributes' + 'attributes' => 'attributes', + 'traffic_percentage' => 'traffic_percentage' ]; /** @@ -111,7 +114,8 @@ public static function fastlyFormats() protected static $setters = [ 'customer_id' => 'setCustomerId', 'service_id' => 'setServiceId', - 'attributes' => 'setAttributes' + 'attributes' => 'setAttributes', + 'traffic_percentage' => 'setTrafficPercentage' ]; /** @@ -122,7 +126,8 @@ public static function fastlyFormats() protected static $getters = [ 'customer_id' => 'getCustomerId', 'service_id' => 'getServiceId', - 'attributes' => 'getAttributes' + 'attributes' => 'getAttributes', + 'traffic_percentage' => 'getTrafficPercentage' ]; /** @@ -185,6 +190,7 @@ public function __construct(array $data = null) $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['traffic_percentage'] = $data['traffic_percentage'] ?? null; } /** @@ -282,6 +288,32 @@ public function setAttributes($attributes) return $this; } + + /** + * Gets traffic_percentage + * + * @return float|null + */ + public function getTrafficPercentage() + { + return $this->container['traffic_percentage']; + } + + /** + * Sets traffic_percentage + * + * @param float|null $traffic_percentage Rule traffic percentage for the event. + * + * @return self + */ + public function setTrafficPercentage($traffic_percentage) + { + + + $this->container['traffic_percentage'] = $traffic_percentage; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/DomainInspectorResponseBodyEnable.php b/lib/Model/DomainInspectorResponseBodyEnable.php index 1fb13602..4e3522d7 100644 --- a/lib/Model/DomainInspectorResponseBodyEnable.php +++ b/lib/Model/DomainInspectorResponseBodyEnable.php @@ -54,7 +54,7 @@ class DomainInspectorResponseBodyEnable implements ModelInterface, ArrayAccess, */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\DomainInspectorResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\DomainInspectorResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/DomainInspectorResponseService.php b/lib/Model/DomainInspectorResponseService.php index 9d96d50f..e28732b6 100644 --- a/lib/Model/DomainInspectorResponseService.php +++ b/lib/Model/DomainInspectorResponseService.php @@ -53,7 +53,7 @@ class DomainInspectorResponseService implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/FanoutResponseBodyEnable.php b/lib/Model/FanoutResponseBodyEnable.php index 4306b398..2bf129ba 100644 --- a/lib/Model/FanoutResponseBodyEnable.php +++ b/lib/Model/FanoutResponseBodyEnable.php @@ -54,7 +54,7 @@ class FanoutResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\FanoutResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\FanoutResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/FanoutResponseService.php b/lib/Model/FanoutResponseService.php index c2727ca2..9c0f77e2 100644 --- a/lib/Model/FanoutResponseService.php +++ b/lib/Model/FanoutResponseService.php @@ -53,7 +53,7 @@ class FanoutResponseService implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/Healthcheck.php b/lib/Model/Healthcheck.php index ca83b6f4..801468da 100644 --- a/lib/Model/Healthcheck.php +++ b/lib/Model/Healthcheck.php @@ -256,6 +256,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['check_interval']) && ($this->container['check_interval'] > 3600000)) { + $invalidProperties[] = "invalid value for 'check_interval', must be smaller than or equal to 3600000."; + } + + if (!is_null($this->container['check_interval']) && ($this->container['check_interval'] < 1000)) { + $invalidProperties[] = "invalid value for 'check_interval', must be bigger than or equal to 1000."; + } + return $invalidProperties; } @@ -284,12 +292,20 @@ public function getCheckInterval() /** * Sets check_interval * - * @param int|null $check_interval How often to run the health check in milliseconds. + * @param int|null $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. * * @return self */ public function setCheckInterval($check_interval) { + + if (!is_null($check_interval) && ($check_interval > 3600000)) { + throw new \InvalidArgumentException('invalid value for $check_interval when calling Healthcheck., must be smaller than or equal to 3600000.'); + } + if (!is_null($check_interval) && ($check_interval < 1000)) { + throw new \InvalidArgumentException('invalid value for $check_interval when calling Healthcheck., must be bigger than or equal to 1000.'); + } + $this->container['check_interval'] = $check_interval; return $this; diff --git a/lib/Model/HealthcheckResponse.php b/lib/Model/HealthcheckResponse.php index 955d0185..a593e925 100644 --- a/lib/Model/HealthcheckResponse.php +++ b/lib/Model/HealthcheckResponse.php @@ -286,6 +286,14 @@ public function listInvalidProperties() { $invalidProperties = []; + if (!is_null($this->container['check_interval']) && ($this->container['check_interval'] > 3600000)) { + $invalidProperties[] = "invalid value for 'check_interval', must be smaller than or equal to 3600000."; + } + + if (!is_null($this->container['check_interval']) && ($this->container['check_interval'] < 1000)) { + $invalidProperties[] = "invalid value for 'check_interval', must be bigger than or equal to 1000."; + } + return $invalidProperties; } @@ -314,12 +322,20 @@ public function getCheckInterval() /** * Sets check_interval * - * @param int|null $check_interval How often to run the health check in milliseconds. + * @param int|null $check_interval How often to run the health check in milliseconds. Minimum 1 second, maximum 1 hour. * * @return self */ public function setCheckInterval($check_interval) { + + if (!is_null($check_interval) && ($check_interval > 3600000)) { + throw new \InvalidArgumentException('invalid value for $check_interval when calling HealthcheckResponse., must be smaller than or equal to 3600000.'); + } + if (!is_null($check_interval) && ($check_interval < 1000)) { + throw new \InvalidArgumentException('invalid value for $check_interval when calling HealthcheckResponse., must be bigger than or equal to 1000.'); + } + $this->container['check_interval'] = $check_interval; return $this; diff --git a/lib/Model/IamV1RoleListResponse.php b/lib/Model/IamV1RoleListResponse.php new file mode 100644 index 00000000..2466346d --- /dev/null +++ b/lib/Model/IamV1RoleListResponse.php @@ -0,0 +1,375 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class IamV1RoleListResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'iam_v1_role_list_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'limit' => 'int', + 'next_cursor' => 'string', + 'data' => '\Fastly\Model\IamV1RoleResponse[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'limit' => null, + 'next_cursor' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'limit' => 'limit', + 'next_cursor' => 'next_cursor', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'limit' => 'setLimit', + 'next_cursor' => 'setNextCursor', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'limit' => 'getLimit', + 'next_cursor' => 'getNextCursor', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['limit'] = $data['limit'] ?? null; + $this->container['next_cursor'] = $data['next_cursor'] ?? null; + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets limit + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit Maximum number of results returned. + * + * @return self + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets next_cursor + * + * @return string|null + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string|null $next_cursor Cursor for the next page. + * + * @return self + */ + public function setNextCursor($next_cursor) + { + $this->container['next_cursor'] = $next_cursor; + + return $this; + } + + /** + * Gets data + * + * @return \Fastly\Model\IamV1RoleResponse[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\IamV1RoleResponse[]|null $data Page of IAM roles (length ≤ limit). + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/IamRoleAllOf.php b/lib/Model/IamV1RoleResponse.php similarity index 75% rename from lib/Model/IamRoleAllOf.php rename to lib/Model/IamV1RoleResponse.php index ebd479ae..1379c6bc 100644 --- a/lib/Model/IamRoleAllOf.php +++ b/lib/Model/IamV1RoleResponse.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class IamRoleAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +class IamV1RoleResponse implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class IamRoleAllOf implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $fastlyModelName = 'iam_role_allOf'; + protected static $fastlyModelName = 'iam_v1_role_response'; /** * Array of property to type mappings. Used for (de)serialization @@ -54,11 +55,9 @@ class IamRoleAllOf implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyTypes = [ 'id' => 'string', - 'object' => 'string', 'name' => 'string', 'description' => 'string', - 'custom' => 'bool', - 'permissions_count' => 'int' + 'permissions' => 'string[]' ]; /** @@ -70,11 +69,9 @@ class IamRoleAllOf implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'id' => null, - 'object' => null, 'name' => null, 'description' => null, - 'custom' => null, - 'permissions_count' => null + 'permissions' => null ]; /** @@ -105,11 +102,9 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'object' => 'object', 'name' => 'name', 'description' => 'description', - 'custom' => 'custom', - 'permissions_count' => 'permissions_count' + 'permissions' => 'permissions' ]; /** @@ -119,11 +114,9 @@ public static function fastlyFormats() */ protected static $setters = [ 'id' => 'setId', - 'object' => 'setObject', 'name' => 'setName', 'description' => 'setDescription', - 'custom' => 'setCustom', - 'permissions_count' => 'setPermissionsCount' + 'permissions' => 'setPermissions' ]; /** @@ -133,11 +126,9 @@ public static function fastlyFormats() */ protected static $getters = [ 'id' => 'getId', - 'object' => 'getObject', 'name' => 'getName', 'description' => 'getDescription', - 'custom' => 'getCustom', - 'permissions_count' => 'getPermissionsCount' + 'permissions' => 'getPermissions' ]; /** @@ -198,11 +189,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; - $this->container['object'] = $data['object'] ?? null; $this->container['name'] = $data['name'] ?? null; $this->container['description'] = $data['description'] ?? null; - $this->container['custom'] = $data['custom'] ?? null; - $this->container['permissions_count'] = $data['permissions_count'] ?? null; + $this->container['permissions'] = $data['permissions'] ?? null; } /** @@ -242,7 +231,7 @@ public function getId() /** * Sets id * - * @param string|null $id Alphanumeric string identifying the role. + * @param string|null $id id * * @return self */ @@ -253,30 +242,6 @@ public function setId($id) return $this; } - /** - * Gets object - * - * @return string|null - */ - public function getObject() - { - return $this->container['object']; - } - - /** - * Sets object - * - * @param string|null $object The type of the object. - * - * @return self - */ - public function setObject($object) - { - $this->container['object'] = $object; - - return $this; - } - /** * Gets name * @@ -290,7 +255,7 @@ public function getName() /** * Sets name * - * @param string|null $name Name of the role. + * @param string|null $name name * * @return self */ @@ -314,7 +279,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description Description of the role. + * @param string|null $description description * * @return self */ @@ -326,49 +291,25 @@ public function setDescription($description) } /** - * Gets custom - * - * @return bool|null - */ - public function getCustom() - { - return $this->container['custom']; - } - - /** - * Sets custom - * - * @param bool|null $custom This attribute is set to `true` if the role is managed by the customer. It is set to `false` if the role was created by Fastly. - * - * @return self - */ - public function setCustom($custom) - { - $this->container['custom'] = $custom; - - return $this; - } - - /** - * Gets permissions_count + * Gets permissions * - * @return int|null + * @return string[]|null */ - public function getPermissionsCount() + public function getPermissions() { - return $this->container['permissions_count']; + return $this->container['permissions']; } /** - * Sets permissions_count + * Sets permissions * - * @param int|null $permissions_count Number of permissions assigned to the role. + * @param string[]|null $permissions The set of permissions granted to this role. * * @return self */ - public function setPermissionsCount($permissions_count) + public function setPermissions($permissions) { - $this->container['permissions_count'] = $permissions_count; + $this->container['permissions'] = $permissions; return $this; } diff --git a/lib/Model/ImageOptimizerResponseBodyEnable.php b/lib/Model/ImageOptimizerResponseBodyEnable.php index a4e49f74..f8e5e9e7 100644 --- a/lib/Model/ImageOptimizerResponseBodyEnable.php +++ b/lib/Model/ImageOptimizerResponseBodyEnable.php @@ -54,7 +54,7 @@ class ImageOptimizerResponseBodyEnable implements ModelInterface, ArrayAccess, \ */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\ImageOptimizerResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\ImageOptimizerResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/ImageOptimizerResponseService.php b/lib/Model/ImageOptimizerResponseService.php index 43315469..d069f0fa 100644 --- a/lib/Model/ImageOptimizerResponseService.php +++ b/lib/Model/ImageOptimizerResponseService.php @@ -53,7 +53,7 @@ class ImageOptimizerResponseService implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/InlineResponse20010.php b/lib/Model/InlineResponse20010.php new file mode 100644 index 00000000..8c269112 --- /dev/null +++ b/lib/Model/InlineResponse20010.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse20010 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'inline_response_200_10'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\ServiceAuthorizationResponseData[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\ServiceAuthorizationResponseData[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\ServiceAuthorizationResponseData[]|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse2003.php b/lib/Model/InlineResponse2003.php index cc128e0d..cf220fa7 100644 --- a/lib/Model/InlineResponse2003.php +++ b/lib/Model/InlineResponse2003.php @@ -53,7 +53,7 @@ class InlineResponse2003 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\DdosProtectionRule[]', + 'data' => '\Fastly\Model\DdosProtectionRuleWithStats[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -190,6 +190,12 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['meta'] === null) { + $invalidProperties[] = "'meta' can't be null"; + } return $invalidProperties; } @@ -208,7 +214,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\DdosProtectionRule[]|null + * @return \Fastly\Model\DdosProtectionRuleWithStats[] */ public function getData() { @@ -218,7 +224,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\DdosProtectionRule[]|null $data data + * @param \Fastly\Model\DdosProtectionRuleWithStats[] $data data * * @return self */ @@ -232,7 +238,7 @@ public function setData($data) /** * Gets meta * - * @return \Fastly\Model\PaginationCursorMeta|null + * @return \Fastly\Model\PaginationCursorMeta */ public function getMeta() { @@ -242,7 +248,7 @@ public function getMeta() /** * Sets meta * - * @param \Fastly\Model\PaginationCursorMeta|null $meta meta + * @param \Fastly\Model\PaginationCursorMeta $meta meta * * @return self */ diff --git a/lib/Model/InlineResponse2004.php b/lib/Model/InlineResponse2004.php index 9ede2ead..a53c7509 100644 --- a/lib/Model/InlineResponse2004.php +++ b/lib/Model/InlineResponse2004.php @@ -53,7 +53,8 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'expires_at' => 'string' + 'data' => '\Fastly\Model\SuccessfulResponseAsObject[]', + 'meta' => 'object' ]; /** @@ -64,7 +65,8 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'expires_at' => null + 'data' => null, + 'meta' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'expires_at' => 'expires_at' + 'data' => 'data', + 'meta' => 'meta' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'expires_at' => 'setExpiresAt' + 'data' => 'setData', + 'meta' => 'setMeta' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'expires_at' => 'getExpiresAt' + 'data' => 'getData', + 'meta' => 'getMeta' ]; /** @@ -172,7 +177,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['expires_at'] = $data['expires_at'] ?? null; + $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -200,25 +206,49 @@ public function valid() /** - * Gets expires_at + * Gets data * - * @return string|null + * @return \Fastly\Model\SuccessfulResponseAsObject[]|null */ - public function getExpiresAt() + public function getData() { - return $this->container['expires_at']; + return $this->container['data']; } /** - * Sets expires_at + * Sets data * - * @param string|null $expires_at Time-stamp (GMT) when the domain_ownership validation will expire. + * @param \Fastly\Model\SuccessfulResponseAsObject[]|null $data data * * @return self */ - public function setExpiresAt($expires_at) + public function setData($data) { - $this->container['expires_at'] = $expires_at; + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets meta + * + * @return object|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param object|null $meta Meta for the pagination. + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; return $this; } diff --git a/lib/Model/InlineResponse2005.php b/lib/Model/InlineResponse2005.php index fd3a7226..de851512 100644 --- a/lib/Model/InlineResponse2005.php +++ b/lib/Model/InlineResponse2005.php @@ -53,8 +53,7 @@ class InlineResponse2005 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\KvStoreDetails[]', - 'meta' => '\Fastly\Model\PaginationCursorMeta' + 'expires_at' => 'string' ]; /** @@ -65,8 +64,7 @@ class InlineResponse2005 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'meta' => null + 'expires_at' => null ]; /** @@ -96,8 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'meta' => 'meta' + 'expires_at' => 'expires_at' ]; /** @@ -106,8 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'meta' => 'setMeta' + 'expires_at' => 'setExpiresAt' ]; /** @@ -116,8 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'meta' => 'getMeta' + 'expires_at' => 'getExpiresAt' ]; /** @@ -177,8 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; + $this->container['expires_at'] = $data['expires_at'] ?? null; } /** @@ -206,49 +200,25 @@ public function valid() /** - * Gets data + * Gets expires_at * - * @return \Fastly\Model\KvStoreDetails[]|null + * @return string|null */ - public function getData() + public function getExpiresAt() { - return $this->container['data']; + return $this->container['expires_at']; } /** - * Sets data + * Sets expires_at * - * @param \Fastly\Model\KvStoreDetails[]|null $data data + * @param string|null $expires_at Time-stamp (GMT) when the domain_ownership validation will expire. * * @return self */ - public function setData($data) + public function setExpiresAt($expires_at) { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets meta - * - * @return \Fastly\Model\PaginationCursorMeta|null - */ - public function getMeta() - { - return $this->container['meta']; - } - - /** - * Sets meta - * - * @param \Fastly\Model\PaginationCursorMeta|null $meta meta - * - * @return self - */ - public function setMeta($meta) - { - $this->container['meta'] = $meta; + $this->container['expires_at'] = $expires_at; return $this; } diff --git a/lib/Model/InlineResponse2006.php b/lib/Model/InlineResponse2006.php index fc72ad8a..3462cf42 100644 --- a/lib/Model/InlineResponse2006.php +++ b/lib/Model/InlineResponse2006.php @@ -53,7 +53,7 @@ class InlineResponse2006 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => 'string[]', + 'data' => '\Fastly\Model\KvStoreDetails[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return string[]|null + * @return \Fastly\Model\KvStoreDetails[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param string[]|null $data data + * @param \Fastly\Model\KvStoreDetails[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2007.php b/lib/Model/InlineResponse2007.php index 3c116233..35687257 100644 --- a/lib/Model/InlineResponse2007.php +++ b/lib/Model/InlineResponse2007.php @@ -53,7 +53,7 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SecretStoreResponse[]', + 'data' => 'string[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\SecretStoreResponse[]|null + * @return string[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\SecretStoreResponse[]|null $data data + * @param string[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2008.php b/lib/Model/InlineResponse2008.php index 3819e3b7..8b65e408 100644 --- a/lib/Model/InlineResponse2008.php +++ b/lib/Model/InlineResponse2008.php @@ -53,7 +53,7 @@ class InlineResponse2008 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SecretResponse[]', + 'data' => '\Fastly\Model\SecretStoreResponse[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\SecretResponse[]|null + * @return \Fastly\Model\SecretStoreResponse[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\SecretResponse[]|null $data data + * @param \Fastly\Model\SecretStoreResponse[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2009.php b/lib/Model/InlineResponse2009.php index ec740a9d..0bf04e90 100644 --- a/lib/Model/InlineResponse2009.php +++ b/lib/Model/InlineResponse2009.php @@ -53,7 +53,8 @@ class InlineResponse2009 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\ServiceAuthorizationResponseData[]' + 'data' => '\Fastly\Model\SecretResponse[]', + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -64,7 +65,8 @@ class InlineResponse2009 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'data' => null, + 'meta' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'data' => 'data', + 'meta' => 'meta' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'data' => 'setData', + 'meta' => 'setMeta' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'data' => 'getData', + 'meta' => 'getMeta' ]; /** @@ -173,6 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -202,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\ServiceAuthorizationResponseData[]|null + * @return \Fastly\Model\SecretResponse[]|null */ public function getData() { @@ -212,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\ServiceAuthorizationResponseData[]|null $data data + * @param \Fastly\Model\SecretResponse[]|null $data data * * @return self */ @@ -222,6 +228,30 @@ public function setData($data) return $this; } + + /** + * Gets meta + * + * @return \Fastly\Model\PaginationCursorMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/InvitationDataAttributes.php b/lib/Model/InvitationDataAttributes.php index ce0e693d..56b45f8c 100644 --- a/lib/Model/InvitationDataAttributes.php +++ b/lib/Model/InvitationDataAttributes.php @@ -56,6 +56,7 @@ class InvitationDataAttributes implements ModelInterface, ArrayAccess, \JsonSeri 'email' => 'string', 'limit_services' => 'bool', 'role' => '\Fastly\Model\RoleUser', + 'roles' => 'string[]', 'status_code' => 'int' ]; @@ -70,6 +71,7 @@ class InvitationDataAttributes implements ModelInterface, ArrayAccess, \JsonSeri 'email' => null, 'limit_services' => null, 'role' => null, + 'roles' => null, 'status_code' => null ]; @@ -103,6 +105,7 @@ public static function fastlyFormats() 'email' => 'email', 'limit_services' => 'limit_services', 'role' => 'role', + 'roles' => 'roles', 'status_code' => 'status_code' ]; @@ -115,6 +118,7 @@ public static function fastlyFormats() 'email' => 'setEmail', 'limit_services' => 'setLimitServices', 'role' => 'setRole', + 'roles' => 'setRoles', 'status_code' => 'setStatusCode' ]; @@ -127,6 +131,7 @@ public static function fastlyFormats() 'email' => 'getEmail', 'limit_services' => 'getLimitServices', 'role' => 'getRole', + 'roles' => 'getRoles', 'status_code' => 'getStatusCode' ]; @@ -205,6 +210,7 @@ public function __construct(array $data = null) $this->container['email'] = $data['email'] ?? null; $this->container['limit_services'] = $data['limit_services'] ?? null; $this->container['role'] = $data['role'] ?? null; + $this->container['roles'] = $data['roles'] ?? null; $this->container['status_code'] = $data['status_code'] ?? null; } @@ -313,6 +319,30 @@ public function setRole($role) return $this; } + /** + * Gets roles + * + * @return string[]|null + */ + public function getRoles() + { + return $this->container['roles']; + } + + /** + * Sets roles + * + * @param string[]|null $roles roles + * + * @return self + */ + public function setRoles($roles) + { + $this->container['roles'] = $roles; + + return $this; + } + /** * Gets status_code * diff --git a/lib/Model/LogExplorerInsightsResponseBodyEnable.php b/lib/Model/LogExplorerInsightsResponseBodyEnable.php index a870efe2..398e23d0 100644 --- a/lib/Model/LogExplorerInsightsResponseBodyEnable.php +++ b/lib/Model/LogExplorerInsightsResponseBodyEnable.php @@ -54,7 +54,7 @@ class LogExplorerInsightsResponseBodyEnable implements ModelInterface, ArrayAcce */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\LogExplorerInsightsResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\LogExplorerInsightsResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/LogExplorerInsightsResponseService.php b/lib/Model/LogExplorerInsightsResponseService.php index 8bd0c21b..4ccbec7e 100644 --- a/lib/Model/LogExplorerInsightsResponseService.php +++ b/lib/Model/LogExplorerInsightsResponseService.php @@ -53,7 +53,7 @@ class LogExplorerInsightsResponseService implements ModelInterface, ArrayAccess, * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/LoggingHttpsAdditional.php b/lib/Model/LoggingHttpsAdditional.php index 20a976e0..fb343fb7 100644 --- a/lib/Model/LoggingHttpsAdditional.php +++ b/lib/Model/LoggingHttpsAdditional.php @@ -62,7 +62,8 @@ class LoggingHttpsAdditional implements ModelInterface, ArrayAccess, \JsonSerial 'header_value' => 'string', 'method' => 'string', 'json_format' => 'string', - 'format' => 'string' + 'format' => 'string', + 'period' => 'int' ]; /** @@ -82,7 +83,8 @@ class LoggingHttpsAdditional implements ModelInterface, ArrayAccess, \JsonSerial 'header_value' => null, 'method' => null, 'json_format' => null, - 'format' => null + 'format' => null, + 'period' => null ]; /** @@ -121,7 +123,8 @@ public static function fastlyFormats() 'header_value' => 'header_value', 'method' => 'method', 'json_format' => 'json_format', - 'format' => 'format' + 'format' => 'format', + 'period' => 'period' ]; /** @@ -139,7 +142,8 @@ public static function fastlyFormats() 'header_value' => 'setHeaderValue', 'method' => 'setMethod', 'json_format' => 'setJsonFormat', - 'format' => 'setFormat' + 'format' => 'setFormat', + 'period' => 'setPeriod' ]; /** @@ -157,7 +161,8 @@ public static function fastlyFormats() 'header_value' => 'getHeaderValue', 'method' => 'getMethod', 'json_format' => 'getJsonFormat', - 'format' => 'getFormat' + 'format' => 'getFormat', + 'period' => 'getPeriod' ]; /** @@ -259,6 +264,7 @@ public function __construct(array $data = null) $this->container['method'] = $data['method'] ?? 'POST'; $this->container['json_format'] = $data['json_format'] ?? null; $this->container['format'] = $data['format'] ?? '%h %l %u %t "%r" %>s %b'; + $this->container['period'] = $data['period'] ?? 5; } /** @@ -562,6 +568,30 @@ public function setFormat($format) return $this; } + + /** + * Gets period + * + * @return int|null + */ + public function getPeriod() + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param int|null $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. + * + * @return self + */ + public function setPeriod($period) + { + $this->container['period'] = $period; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoggingHttpsResponse.php b/lib/Model/LoggingHttpsResponse.php index 1677bc73..334f3a48 100644 --- a/lib/Model/LoggingHttpsResponse.php +++ b/lib/Model/LoggingHttpsResponse.php @@ -72,6 +72,7 @@ class LoggingHttpsResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'header_value' => 'string', 'method' => 'string', 'json_format' => 'string', + 'period' => 'int', 'created_at' => '\DateTime', 'deleted_at' => '\DateTime', 'updated_at' => '\DateTime', @@ -106,6 +107,7 @@ class LoggingHttpsResponse implements ModelInterface, ArrayAccess, \JsonSerializ 'header_value' => null, 'method' => null, 'json_format' => null, + 'period' => null, 'created_at' => 'date-time', 'deleted_at' => 'date-time', 'updated_at' => 'date-time', @@ -159,6 +161,7 @@ public static function fastlyFormats() 'header_value' => 'header_value', 'method' => 'method', 'json_format' => 'json_format', + 'period' => 'period', 'created_at' => 'created_at', 'deleted_at' => 'deleted_at', 'updated_at' => 'updated_at', @@ -191,6 +194,7 @@ public static function fastlyFormats() 'header_value' => 'setHeaderValue', 'method' => 'setMethod', 'json_format' => 'setJsonFormat', + 'period' => 'setPeriod', 'created_at' => 'setCreatedAt', 'deleted_at' => 'setDeletedAt', 'updated_at' => 'setUpdatedAt', @@ -223,6 +227,7 @@ public static function fastlyFormats() 'header_value' => 'getHeaderValue', 'method' => 'getMethod', 'json_format' => 'getJsonFormat', + 'period' => 'getPeriod', 'created_at' => 'getCreatedAt', 'deleted_at' => 'getDeletedAt', 'updated_at' => 'getUpdatedAt', @@ -385,6 +390,7 @@ public function __construct(array $data = null) $this->container['header_value'] = $data['header_value'] ?? 'null'; $this->container['method'] = $data['method'] ?? 'POST'; $this->container['json_format'] = $data['json_format'] ?? null; + $this->container['period'] = $data['period'] ?? 5; $this->container['created_at'] = $data['created_at'] ?? null; $this->container['deleted_at'] = $data['deleted_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; @@ -967,6 +973,30 @@ public function setJsonFormat($json_format) return $this; } + /** + * Gets period + * + * @return int|null + */ + public function getPeriod() + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param int|null $period How frequently, in seconds, batches of log data are sent to the HTTPS endpoint. A value of `0` sends logs at the same interval as the default, which is `5` seconds. + * + * @return self + */ + public function setPeriod($period) + { + $this->container['period'] = $period; + + return $this; + } + /** * Gets created_at * diff --git a/lib/Model/NgwafResponseConfigure.php b/lib/Model/NgwafResponseConfigure.php index fd01188d..5d26cf72 100644 --- a/lib/Model/NgwafResponseConfigure.php +++ b/lib/Model/NgwafResponseConfigure.php @@ -54,7 +54,7 @@ class NgwafResponseConfigure implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\NgwafResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', 'configuration' => '\Fastly\Model\NgwafResponseConfigurationConfiguration', '_links' => '\Fastly\Model\NgwafResponseLinksLinks' ]; @@ -244,7 +244,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -254,7 +254,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/NgwafResponseEnable.php b/lib/Model/NgwafResponseEnable.php index 89cba7ef..069edd75 100644 --- a/lib/Model/NgwafResponseEnable.php +++ b/lib/Model/NgwafResponseEnable.php @@ -54,7 +54,7 @@ class NgwafResponseEnable implements ModelInterface, ArrayAccess, \JsonSerializa */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\NgwafResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\NgwafResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/NgwafResponseService.php b/lib/Model/NgwafResponseService.php index 93a26273..25b9cc67 100644 --- a/lib/Model/NgwafResponseService.php +++ b/lib/Model/NgwafResponseService.php @@ -53,7 +53,7 @@ class NgwafResponseService implements ModelInterface, ArrayAccess, \JsonSerializ * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/OriginInspectorResponseBodyEnable.php b/lib/Model/OriginInspectorResponseBodyEnable.php index d3820e01..89bca2f2 100644 --- a/lib/Model/OriginInspectorResponseBodyEnable.php +++ b/lib/Model/OriginInspectorResponseBodyEnable.php @@ -54,7 +54,7 @@ class OriginInspectorResponseBodyEnable implements ModelInterface, ArrayAccess, */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\OriginInspectorResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\OriginInspectorResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/OriginInspectorResponseService.php b/lib/Model/OriginInspectorResponseService.php index d2d6c61a..f38ab3bb 100644 --- a/lib/Model/OriginInspectorResponseService.php +++ b/lib/Model/OriginInspectorResponseService.php @@ -53,7 +53,7 @@ class OriginInspectorResponseService implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/RealtimeEntryAggregated.php b/lib/Model/RealtimeEntryAggregated.php index ef0c6d75..ccd295bf 100644 --- a/lib/Model/RealtimeEntryAggregated.php +++ b/lib/Model/RealtimeEntryAggregated.php @@ -314,7 +314,8 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria 'aia_estimated_time_saved_ms' => 'int', 'request_collapse_usable_count' => 'int', 'request_collapse_unusable_count' => 'int', - 'compute_cache_operations_count' => 'int' + 'compute_cache_operations_count' => 'int', + 'api_discovery_requests_count' => 'int' ]; /** @@ -585,7 +586,8 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria 'aia_estimated_time_saved_ms' => 'int64', 'request_collapse_usable_count' => 'int64', 'request_collapse_unusable_count' => 'int64', - 'compute_cache_operations_count' => 'int64' + 'compute_cache_operations_count' => 'int64', + 'api_discovery_requests_count' => null ]; /** @@ -875,7 +877,8 @@ public static function fastlyFormats() 'aia_estimated_time_saved_ms' => 'aia_estimated_time_saved_ms', 'request_collapse_usable_count' => 'request_collapse_usable_count', 'request_collapse_unusable_count' => 'request_collapse_unusable_count', - 'compute_cache_operations_count' => 'compute_cache_operations_count' + 'compute_cache_operations_count' => 'compute_cache_operations_count', + 'api_discovery_requests_count' => 'api_discovery_requests_count' ]; /** @@ -1144,7 +1147,8 @@ public static function fastlyFormats() 'aia_estimated_time_saved_ms' => 'setAiaEstimatedTimeSavedMs', 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', - 'compute_cache_operations_count' => 'setComputeCacheOperationsCount' + 'compute_cache_operations_count' => 'setComputeCacheOperationsCount', + 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount' ]; /** @@ -1413,7 +1417,8 @@ public static function fastlyFormats() 'aia_estimated_time_saved_ms' => 'getAiaEstimatedTimeSavedMs', 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', - 'compute_cache_operations_count' => 'getComputeCacheOperationsCount' + 'compute_cache_operations_count' => 'getComputeCacheOperationsCount', + 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount' ]; /** @@ -1734,6 +1739,7 @@ public function __construct(array $data = null) $this->container['request_collapse_usable_count'] = $data['request_collapse_usable_count'] ?? null; $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; + $this->container['api_discovery_requests_count'] = $data['api_discovery_requests_count'] ?? null; } /** @@ -8027,6 +8033,30 @@ public function setComputeCacheOperationsCount($compute_cache_operations_count) return $this; } + + /** + * Gets api_discovery_requests_count + * + * @return int|null + */ + public function getApiDiscoveryRequestsCount() + { + return $this->container['api_discovery_requests_count']; + } + + /** + * Sets api_discovery_requests_count + * + * @param int|null $api_discovery_requests_count Number of requests processed by the API Discovery engine. + * + * @return self + */ + public function setApiDiscoveryRequestsCount($api_discovery_requests_count) + { + $this->container['api_discovery_requests_count'] = $api_discovery_requests_count; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RealtimeMeasurements.php b/lib/Model/RealtimeMeasurements.php index 88be41a6..ec3710c8 100644 --- a/lib/Model/RealtimeMeasurements.php +++ b/lib/Model/RealtimeMeasurements.php @@ -314,7 +314,8 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ 'aia_estimated_time_saved_ms' => 'int', 'request_collapse_usable_count' => 'int', 'request_collapse_unusable_count' => 'int', - 'compute_cache_operations_count' => 'int' + 'compute_cache_operations_count' => 'int', + 'api_discovery_requests_count' => 'int' ]; /** @@ -585,7 +586,8 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ 'aia_estimated_time_saved_ms' => 'int64', 'request_collapse_usable_count' => 'int64', 'request_collapse_unusable_count' => 'int64', - 'compute_cache_operations_count' => 'int64' + 'compute_cache_operations_count' => 'int64', + 'api_discovery_requests_count' => null ]; /** @@ -875,7 +877,8 @@ public static function fastlyFormats() 'aia_estimated_time_saved_ms' => 'aia_estimated_time_saved_ms', 'request_collapse_usable_count' => 'request_collapse_usable_count', 'request_collapse_unusable_count' => 'request_collapse_unusable_count', - 'compute_cache_operations_count' => 'compute_cache_operations_count' + 'compute_cache_operations_count' => 'compute_cache_operations_count', + 'api_discovery_requests_count' => 'api_discovery_requests_count' ]; /** @@ -1144,7 +1147,8 @@ public static function fastlyFormats() 'aia_estimated_time_saved_ms' => 'setAiaEstimatedTimeSavedMs', 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', - 'compute_cache_operations_count' => 'setComputeCacheOperationsCount' + 'compute_cache_operations_count' => 'setComputeCacheOperationsCount', + 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount' ]; /** @@ -1413,7 +1417,8 @@ public static function fastlyFormats() 'aia_estimated_time_saved_ms' => 'getAiaEstimatedTimeSavedMs', 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', - 'compute_cache_operations_count' => 'getComputeCacheOperationsCount' + 'compute_cache_operations_count' => 'getComputeCacheOperationsCount', + 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount' ]; /** @@ -1734,6 +1739,7 @@ public function __construct(array $data = null) $this->container['request_collapse_usable_count'] = $data['request_collapse_usable_count'] ?? null; $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; + $this->container['api_discovery_requests_count'] = $data['api_discovery_requests_count'] ?? null; } /** @@ -8027,6 +8033,30 @@ public function setComputeCacheOperationsCount($compute_cache_operations_count) return $this; } + + /** + * Gets api_discovery_requests_count + * + * @return int|null + */ + public function getApiDiscoveryRequestsCount() + { + return $this->container['api_discovery_requests_count']; + } + + /** + * Sets api_discovery_requests_count + * + * @param int|null $api_discovery_requests_count Number of requests processed by the API Discovery engine. + * + * @return self + */ + public function setApiDiscoveryRequestsCount($api_discovery_requests_count) + { + $this->container['api_discovery_requests_count'] = $api_discovery_requests_count; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RequestBodyForCreate.php b/lib/Model/RequestBodyForCreate.php new file mode 100644 index 00000000..49b51aa1 --- /dev/null +++ b/lib/Model/RequestBodyForCreate.php @@ -0,0 +1,378 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class RequestBodyForCreate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'request_body_for_create'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'fqdn' => 'string', + 'service_id' => 'string', + 'description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'fqdn' => null, + 'service_id' => null, + 'description' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'fqdn' => 'fqdn', + 'service_id' => 'service_id', + 'description' => 'description' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'fqdn' => 'setFqdn', + 'service_id' => 'setServiceId', + 'description' => 'setDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'fqdn' => 'getFqdn', + 'service_id' => 'getServiceId', + 'description' => 'getDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['fqdn'] = $data['fqdn'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['description'] = $data['description'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['fqdn'] === null) { + $invalidProperties[] = "'fqdn' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets fqdn + * + * @return string + */ + public function getFqdn() + { + return $this->container['fqdn']; + } + + /** + * Sets fqdn + * + * @param string $fqdn The fully-qualified domain name for your domain. Can be created, but not updated. + * + * @return self + */ + public function setFqdn($fqdn) + { + $this->container['fqdn'] = $fqdn; + + return $this; + } + + /** + * Gets service_id + * + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id The `service_id` associated with your domain or `null` if there is no association. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A freeform descriptive note. + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RequestBodyForUpdate.php b/lib/Model/RequestBodyForUpdate.php new file mode 100644 index 00000000..25e0beec --- /dev/null +++ b/lib/Model/RequestBodyForUpdate.php @@ -0,0 +1,345 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class RequestBodyForUpdate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'request_body_for_update'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'service_id' => 'string', + 'description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'service_id' => null, + 'description' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'service_id' => 'service_id', + 'description' => 'description' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'service_id' => 'setServiceId', + 'description' => 'setDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'service_id' => 'getServiceId', + 'description' => 'getDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['description'] = $data['description'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets service_id + * + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id The `service_id` associated with your domain or `null` if there is no association. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A freeform descriptive note. + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Results.php b/lib/Model/Results.php index e8ac52f9..afbca16a 100644 --- a/lib/Model/Results.php +++ b/lib/Model/Results.php @@ -322,6 +322,7 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'ngwaf_requests_blocked_count' => 'int', 'ngwaf_requests_timeout_count' => 'int', 'ngwaf_requests_challenged_count' => 'int', + 'api_discovery_requests_count' => 'int', 'service_id' => 'string', 'start_time' => 'int' ]; @@ -602,6 +603,7 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'ngwaf_requests_blocked_count' => null, 'ngwaf_requests_timeout_count' => null, 'ngwaf_requests_challenged_count' => null, + 'api_discovery_requests_count' => null, 'service_id' => null, 'start_time' => 'int64' ]; @@ -901,6 +903,7 @@ public static function fastlyFormats() 'ngwaf_requests_blocked_count' => 'ngwaf_requests_blocked_count', 'ngwaf_requests_timeout_count' => 'ngwaf_requests_timeout_count', 'ngwaf_requests_challenged_count' => 'ngwaf_requests_challenged_count', + 'api_discovery_requests_count' => 'api_discovery_requests_count', 'service_id' => 'service_id', 'start_time' => 'start_time' ]; @@ -1179,6 +1182,7 @@ public static function fastlyFormats() 'ngwaf_requests_blocked_count' => 'setNgwafRequestsBlockedCount', 'ngwaf_requests_timeout_count' => 'setNgwafRequestsTimeoutCount', 'ngwaf_requests_challenged_count' => 'setNgwafRequestsChallengedCount', + 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount', 'service_id' => 'setServiceId', 'start_time' => 'setStartTime' ]; @@ -1457,6 +1461,7 @@ public static function fastlyFormats() 'ngwaf_requests_blocked_count' => 'getNgwafRequestsBlockedCount', 'ngwaf_requests_timeout_count' => 'getNgwafRequestsTimeoutCount', 'ngwaf_requests_challenged_count' => 'getNgwafRequestsChallengedCount', + 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount', 'service_id' => 'getServiceId', 'start_time' => 'getStartTime' ]; @@ -1786,6 +1791,7 @@ public function __construct(array $data = null) $this->container['ngwaf_requests_blocked_count'] = $data['ngwaf_requests_blocked_count'] ?? null; $this->container['ngwaf_requests_timeout_count'] = $data['ngwaf_requests_timeout_count'] ?? null; $this->container['ngwaf_requests_challenged_count'] = $data['ngwaf_requests_challenged_count'] ?? null; + $this->container['api_discovery_requests_count'] = $data['api_discovery_requests_count'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['start_time'] = $data['start_time'] ?? null; } @@ -8250,6 +8256,30 @@ public function setNgwafRequestsChallengedCount($ngwaf_requests_challenged_count return $this; } + /** + * Gets api_discovery_requests_count + * + * @return int|null + */ + public function getApiDiscoveryRequestsCount() + { + return $this->container['api_discovery_requests_count']; + } + + /** + * Sets api_discovery_requests_count + * + * @param int|null $api_discovery_requests_count Number of requests processed by the API Discovery engine. + * + * @return self + */ + public function setApiDiscoveryRequestsCount($api_discovery_requests_count) + { + $this->container['api_discovery_requests_count'] = $api_discovery_requests_count; + + return $this; + } + /** * Gets service_id * diff --git a/lib/Model/RoleUser.php b/lib/Model/RoleUser.php index 72e695fe..5df13ebe 100644 --- a/lib/Model/RoleUser.php +++ b/lib/Model/RoleUser.php @@ -28,7 +28,7 @@ * RoleUser Class Doc Comment * * @category Class - * @description The permissions role assigned to the user. Can be `user`, `billing`, `engineer`, or `superuser`. + * @description The permissions role assigned to the user. Can be `user`, `tls_viewer`, `tls_admin`, `billing`, `engineer`, or `superuser`. * @package Fastly * @author oss@fastly.com */ @@ -39,6 +39,10 @@ class RoleUser */ const USER = 'user'; + const TLS_VIEWER = 'tls_viewer'; + + const TLS_ADMIN = 'tls_admin'; + const BILLING = 'billing'; const ENGINEER = 'engineer'; @@ -53,6 +57,8 @@ public static function getAllowableEnumValues() { return [ self::USER, + self::TLS_VIEWER, + self::TLS_ADMIN, self::BILLING, self::ENGINEER, self::SUPERUSER diff --git a/lib/Model/SchemasUserResponse.php b/lib/Model/SchemasUserResponse.php index 36ee50c7..7bfc6447 100644 --- a/lib/Model/SchemasUserResponse.php +++ b/lib/Model/SchemasUserResponse.php @@ -59,6 +59,7 @@ class SchemasUserResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'locked' => 'bool', 'require_new_password' => 'bool', 'role' => '\Fastly\Model\RoleUser', + 'roles' => 'string[]', 'two_factor_auth_enabled' => 'bool', 'two_factor_setup_required' => 'bool', 'created_at' => '\DateTime', @@ -83,6 +84,7 @@ class SchemasUserResponse implements ModelInterface, ArrayAccess, \JsonSerializa 'locked' => null, 'require_new_password' => null, 'role' => null, + 'roles' => null, 'two_factor_auth_enabled' => null, 'two_factor_setup_required' => null, 'created_at' => 'date-time', @@ -126,6 +128,7 @@ public static function fastlyFormats() 'locked' => 'locked', 'require_new_password' => 'require_new_password', 'role' => 'role', + 'roles' => 'roles', 'two_factor_auth_enabled' => 'two_factor_auth_enabled', 'two_factor_setup_required' => 'two_factor_setup_required', 'created_at' => 'created_at', @@ -148,6 +151,7 @@ public static function fastlyFormats() 'locked' => 'setLocked', 'require_new_password' => 'setRequireNewPassword', 'role' => 'setRole', + 'roles' => 'setRoles', 'two_factor_auth_enabled' => 'setTwoFactorAuthEnabled', 'two_factor_setup_required' => 'setTwoFactorSetupRequired', 'created_at' => 'setCreatedAt', @@ -170,6 +174,7 @@ public static function fastlyFormats() 'locked' => 'getLocked', 'require_new_password' => 'getRequireNewPassword', 'role' => 'getRole', + 'roles' => 'getRoles', 'two_factor_auth_enabled' => 'getTwoFactorAuthEnabled', 'two_factor_setup_required' => 'getTwoFactorSetupRequired', 'created_at' => 'getCreatedAt', @@ -243,6 +248,7 @@ public function __construct(array $data = null) $this->container['locked'] = $data['locked'] ?? null; $this->container['require_new_password'] = $data['require_new_password'] ?? null; $this->container['role'] = $data['role'] ?? null; + $this->container['roles'] = $data['roles'] ?? null; $this->container['two_factor_auth_enabled'] = $data['two_factor_auth_enabled'] ?? null; $this->container['two_factor_setup_required'] = $data['two_factor_setup_required'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; @@ -421,6 +427,30 @@ public function setRole($role) return $this; } + /** + * Gets roles + * + * @return string[]|null + */ + public function getRoles() + { + return $this->container['roles']; + } + + /** + * Sets roles + * + * @param string[]|null $roles A list of role IDs assigned to the user. + * + * @return self + */ + public function setRoles($roles) + { + $this->container['roles'] = $roles; + + return $this; + } + /** * Gets two_factor_auth_enabled * diff --git a/lib/Model/IamRole.php b/lib/Model/SuccessfulResponseAsObject.php similarity index 76% rename from lib/Model/IamRole.php rename to lib/Model/SuccessfulResponseAsObject.php index 7855b6ea..75b671d8 100644 --- a/lib/Model/IamRole.php +++ b/lib/Model/SuccessfulResponseAsObject.php @@ -1,6 +1,6 @@ * @template TKey int|null * @template TValue mixed|null */ -class IamRole implements ModelInterface, ArrayAccess, \JsonSerializable +class SuccessfulResponseAsObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -45,7 +46,7 @@ class IamRole implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $fastlyModelName = 'iam_role'; + protected static $fastlyModelName = 'successful_response_as_object'; /** * Array of property to type mappings. Used for (de)serialization @@ -56,11 +57,11 @@ class IamRole implements ModelInterface, ArrayAccess, \JsonSerializable 'created_at' => '\DateTime', 'updated_at' => '\DateTime', 'id' => 'string', - 'object' => 'string', - 'name' => 'string', + 'fqdn' => 'string', + 'service_id' => 'string', 'description' => 'string', - 'custom' => 'bool', - 'permissions_count' => 'int' + 'activated' => 'bool', + 'verified' => 'bool' ]; /** @@ -74,11 +75,11 @@ class IamRole implements ModelInterface, ArrayAccess, \JsonSerializable 'created_at' => 'date-time', 'updated_at' => 'date-time', 'id' => null, - 'object' => null, - 'name' => null, + 'fqdn' => null, + 'service_id' => null, 'description' => null, - 'custom' => null, - 'permissions_count' => null + 'activated' => null, + 'verified' => null ]; /** @@ -111,11 +112,11 @@ public static function fastlyFormats() 'created_at' => 'created_at', 'updated_at' => 'updated_at', 'id' => 'id', - 'object' => 'object', - 'name' => 'name', + 'fqdn' => 'fqdn', + 'service_id' => 'service_id', 'description' => 'description', - 'custom' => 'custom', - 'permissions_count' => 'permissions_count' + 'activated' => 'activated', + 'verified' => 'verified' ]; /** @@ -127,11 +128,11 @@ public static function fastlyFormats() 'created_at' => 'setCreatedAt', 'updated_at' => 'setUpdatedAt', 'id' => 'setId', - 'object' => 'setObject', - 'name' => 'setName', + 'fqdn' => 'setFqdn', + 'service_id' => 'setServiceId', 'description' => 'setDescription', - 'custom' => 'setCustom', - 'permissions_count' => 'setPermissionsCount' + 'activated' => 'setActivated', + 'verified' => 'setVerified' ]; /** @@ -143,11 +144,11 @@ public static function fastlyFormats() 'created_at' => 'getCreatedAt', 'updated_at' => 'getUpdatedAt', 'id' => 'getId', - 'object' => 'getObject', - 'name' => 'getName', + 'fqdn' => 'getFqdn', + 'service_id' => 'getServiceId', 'description' => 'getDescription', - 'custom' => 'getCustom', - 'permissions_count' => 'getPermissionsCount' + 'activated' => 'getActivated', + 'verified' => 'getVerified' ]; /** @@ -210,11 +211,11 @@ public function __construct(array $data = null) $this->container['created_at'] = $data['created_at'] ?? null; $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['id'] = $data['id'] ?? null; - $this->container['object'] = $data['object'] ?? null; - $this->container['name'] = $data['name'] ?? null; + $this->container['fqdn'] = $data['fqdn'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; $this->container['description'] = $data['description'] ?? null; - $this->container['custom'] = $data['custom'] ?? null; - $this->container['permissions_count'] = $data['permissions_count'] ?? null; + $this->container['activated'] = $data['activated'] ?? null; + $this->container['verified'] = $data['verified'] ?? null; } /** @@ -302,7 +303,7 @@ public function getId() /** * Sets id * - * @param string|null $id Alphanumeric string identifying the role. + * @param string|null $id Domain Identifier (UUID). * * @return self */ @@ -314,49 +315,49 @@ public function setId($id) } /** - * Gets object + * Gets fqdn * * @return string|null */ - public function getObject() + public function getFqdn() { - return $this->container['object']; + return $this->container['fqdn']; } /** - * Sets object + * Sets fqdn * - * @param string|null $object The type of the object. + * @param string|null $fqdn The fully-qualified domain name for your domain. Can be created, but not updated. * * @return self */ - public function setObject($object) + public function setFqdn($fqdn) { - $this->container['object'] = $object; + $this->container['fqdn'] = $fqdn; return $this; } /** - * Gets name + * Gets service_id * * @return string|null */ - public function getName() + public function getServiceId() { - return $this->container['name']; + return $this->container['service_id']; } /** - * Sets name + * Sets service_id * - * @param string|null $name Name of the role. + * @param string|null $service_id The `service_id` associated with your domain or `null` if there is no association. * * @return self */ - public function setName($name) + public function setServiceId($service_id) { - $this->container['name'] = $name; + $this->container['service_id'] = $service_id; return $this; } @@ -374,7 +375,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description Description of the role. + * @param string|null $description A freeform descriptive note. * * @return self */ @@ -386,49 +387,49 @@ public function setDescription($description) } /** - * Gets custom + * Gets activated * * @return bool|null */ - public function getCustom() + public function getActivated() { - return $this->container['custom']; + return $this->container['activated']; } /** - * Sets custom + * Sets activated * - * @param bool|null $custom This attribute is set to `true` if the role is managed by the customer. It is set to `false` if the role was created by Fastly. + * @param bool|null $activated Denotes if the domain has at least one TLS activation or not. * * @return self */ - public function setCustom($custom) + public function setActivated($activated) { - $this->container['custom'] = $custom; + $this->container['activated'] = $activated; return $this; } /** - * Gets permissions_count + * Gets verified * - * @return int|null + * @return bool|null */ - public function getPermissionsCount() + public function getVerified() { - return $this->container['permissions_count']; + return $this->container['verified']; } /** - * Sets permissions_count + * Sets verified * - * @param int|null $permissions_count Number of permissions assigned to the role. + * @param bool|null $verified Denotes that the customer has proven ownership over the domain by obtaining a Fastly-managed TLS certificate for it or by providing a their own TLS certificate from a publicly-trusted CA that includes the domain or matching wildcard. * * @return self */ - public function setPermissionsCount($permissions_count) + public function setVerified($verified) { - $this->container['permissions_count'] = $permissions_count; + $this->container['verified'] = $verified; return $this; } diff --git a/lib/Model/SuccessfulResponseAsObjectAllOf.php b/lib/Model/SuccessfulResponseAsObjectAllOf.php new file mode 100644 index 00000000..52c3c181 --- /dev/null +++ b/lib/Model/SuccessfulResponseAsObjectAllOf.php @@ -0,0 +1,464 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SuccessfulResponseAsObjectAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'successful_response_as_object_allOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'fqdn' => 'string', + 'service_id' => 'string', + 'description' => 'string', + 'activated' => 'bool', + 'verified' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'fqdn' => null, + 'service_id' => null, + 'description' => null, + 'activated' => null, + 'verified' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'fqdn' => 'fqdn', + 'service_id' => 'service_id', + 'description' => 'description', + 'activated' => 'activated', + 'verified' => 'verified' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'fqdn' => 'setFqdn', + 'service_id' => 'setServiceId', + 'description' => 'setDescription', + 'activated' => 'setActivated', + 'verified' => 'setVerified' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'fqdn' => 'getFqdn', + 'service_id' => 'getServiceId', + 'description' => 'getDescription', + 'activated' => 'getActivated', + 'verified' => 'getVerified' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['fqdn'] = $data['fqdn'] ?? null; + $this->container['service_id'] = $data['service_id'] ?? null; + $this->container['description'] = $data['description'] ?? null; + $this->container['activated'] = $data['activated'] ?? null; + $this->container['verified'] = $data['verified'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Domain Identifier (UUID). + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets fqdn + * + * @return string|null + */ + public function getFqdn() + { + return $this->container['fqdn']; + } + + /** + * Sets fqdn + * + * @param string|null $fqdn The fully-qualified domain name for your domain. Can be created, but not updated. + * + * @return self + */ + public function setFqdn($fqdn) + { + $this->container['fqdn'] = $fqdn; + + return $this; + } + + /** + * Gets service_id + * + * @return string|null + */ + public function getServiceId() + { + return $this->container['service_id']; + } + + /** + * Sets service_id + * + * @param string|null $service_id The `service_id` associated with your domain or `null` if there is no association. + * + * @return self + */ + public function setServiceId($service_id) + { + $this->container['service_id'] = $service_id; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A freeform descriptive note. + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets activated + * + * @return bool|null + */ + public function getActivated() + { + return $this->container['activated']; + } + + /** + * Sets activated + * + * @param bool|null $activated Denotes if the domain has at least one TLS activation or not. + * + * @return self + */ + public function setActivated($activated) + { + $this->container['activated'] = $activated; + + return $this; + } + + /** + * Gets verified + * + * @return bool|null + */ + public function getVerified() + { + return $this->container['verified']; + } + + /** + * Sets verified + * + * @param bool|null $verified Denotes that the customer has proven ownership over the domain by obtaining a Fastly-managed TLS certificate for it or by providing a their own TLS certificate from a publicly-trusted CA that includes the domain or matching wildcard. + * + * @return self + */ + public function setVerified($verified) + { + $this->container['verified'] = $verified; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/User.php b/lib/Model/User.php index 6457bd10..9cf15818 100644 --- a/lib/Model/User.php +++ b/lib/Model/User.php @@ -59,6 +59,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'locked' => 'bool', 'require_new_password' => 'bool', 'role' => '\Fastly\Model\RoleUser', + 'roles' => 'string[]', 'two_factor_auth_enabled' => 'bool', 'two_factor_setup_required' => 'bool' ]; @@ -77,6 +78,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable 'locked' => null, 'require_new_password' => null, 'role' => null, + 'roles' => null, 'two_factor_auth_enabled' => null, 'two_factor_setup_required' => null ]; @@ -114,6 +116,7 @@ public static function fastlyFormats() 'locked' => 'locked', 'require_new_password' => 'require_new_password', 'role' => 'role', + 'roles' => 'roles', 'two_factor_auth_enabled' => 'two_factor_auth_enabled', 'two_factor_setup_required' => 'two_factor_setup_required' ]; @@ -130,6 +133,7 @@ public static function fastlyFormats() 'locked' => 'setLocked', 'require_new_password' => 'setRequireNewPassword', 'role' => 'setRole', + 'roles' => 'setRoles', 'two_factor_auth_enabled' => 'setTwoFactorAuthEnabled', 'two_factor_setup_required' => 'setTwoFactorSetupRequired' ]; @@ -146,6 +150,7 @@ public static function fastlyFormats() 'locked' => 'getLocked', 'require_new_password' => 'getRequireNewPassword', 'role' => 'getRole', + 'roles' => 'getRoles', 'two_factor_auth_enabled' => 'getTwoFactorAuthEnabled', 'two_factor_setup_required' => 'getTwoFactorSetupRequired' ]; @@ -213,6 +218,7 @@ public function __construct(array $data = null) $this->container['locked'] = $data['locked'] ?? null; $this->container['require_new_password'] = $data['require_new_password'] ?? null; $this->container['role'] = $data['role'] ?? null; + $this->container['roles'] = $data['roles'] ?? null; $this->container['two_factor_auth_enabled'] = $data['two_factor_auth_enabled'] ?? null; $this->container['two_factor_setup_required'] = $data['two_factor_setup_required'] ?? null; } @@ -385,6 +391,30 @@ public function setRole($role) return $this; } + /** + * Gets roles + * + * @return string[]|null + */ + public function getRoles() + { + return $this->container['roles']; + } + + /** + * Sets roles + * + * @param string[]|null $roles A list of role IDs assigned to the user. + * + * @return self + */ + public function setRoles($roles) + { + $this->container['roles'] = $roles; + + return $this; + } + /** * Gets two_factor_auth_enabled * diff --git a/lib/Model/UserResponse.php b/lib/Model/UserResponse.php index 4478c0d1..c1ce39e5 100644 --- a/lib/Model/UserResponse.php +++ b/lib/Model/UserResponse.php @@ -59,6 +59,7 @@ class UserResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'locked' => 'bool', 'require_new_password' => 'bool', 'role' => '\Fastly\Model\RoleUser', + 'roles' => 'string[]', 'two_factor_auth_enabled' => 'bool', 'two_factor_setup_required' => 'bool', 'created_at' => '\DateTime', @@ -83,6 +84,7 @@ class UserResponse implements ModelInterface, ArrayAccess, \JsonSerializable 'locked' => null, 'require_new_password' => null, 'role' => null, + 'roles' => null, 'two_factor_auth_enabled' => null, 'two_factor_setup_required' => null, 'created_at' => 'date-time', @@ -126,6 +128,7 @@ public static function fastlyFormats() 'locked' => 'locked', 'require_new_password' => 'require_new_password', 'role' => 'role', + 'roles' => 'roles', 'two_factor_auth_enabled' => 'two_factor_auth_enabled', 'two_factor_setup_required' => 'two_factor_setup_required', 'created_at' => 'created_at', @@ -148,6 +151,7 @@ public static function fastlyFormats() 'locked' => 'setLocked', 'require_new_password' => 'setRequireNewPassword', 'role' => 'setRole', + 'roles' => 'setRoles', 'two_factor_auth_enabled' => 'setTwoFactorAuthEnabled', 'two_factor_setup_required' => 'setTwoFactorSetupRequired', 'created_at' => 'setCreatedAt', @@ -170,6 +174,7 @@ public static function fastlyFormats() 'locked' => 'getLocked', 'require_new_password' => 'getRequireNewPassword', 'role' => 'getRole', + 'roles' => 'getRoles', 'two_factor_auth_enabled' => 'getTwoFactorAuthEnabled', 'two_factor_setup_required' => 'getTwoFactorSetupRequired', 'created_at' => 'getCreatedAt', @@ -243,6 +248,7 @@ public function __construct(array $data = null) $this->container['locked'] = $data['locked'] ?? null; $this->container['require_new_password'] = $data['require_new_password'] ?? null; $this->container['role'] = $data['role'] ?? null; + $this->container['roles'] = $data['roles'] ?? null; $this->container['two_factor_auth_enabled'] = $data['two_factor_auth_enabled'] ?? null; $this->container['two_factor_setup_required'] = $data['two_factor_setup_required'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; @@ -421,6 +427,30 @@ public function setRole($role) return $this; } + /** + * Gets roles + * + * @return string[]|null + */ + public function getRoles() + { + return $this->container['roles']; + } + + /** + * Sets roles + * + * @param string[]|null $roles A list of role IDs assigned to the user. + * + * @return self + */ + public function setRoles($roles) + { + $this->container['roles'] = $roles; + + return $this; + } + /** * Gets two_factor_auth_enabled * diff --git a/lib/Model/WebsocketsResponseBodyEnable.php b/lib/Model/WebsocketsResponseBodyEnable.php index aea8a9be..b51187e5 100644 --- a/lib/Model/WebsocketsResponseBodyEnable.php +++ b/lib/Model/WebsocketsResponseBodyEnable.php @@ -54,7 +54,7 @@ class WebsocketsResponseBodyEnable implements ModelInterface, ArrayAccess, \Json */ protected static $fastlyTypes = [ 'product' => '\Fastly\Model\WebsocketsResponseProductProduct', - 'service' => '\Fastly\Model\BotManagementResponseServiceService', + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService', '_links' => '\Fastly\Model\WebsocketsResponseLinksLinks' ]; @@ -238,7 +238,7 @@ public function setProduct($product) /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -248,7 +248,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/lib/Model/WebsocketsResponseService.php b/lib/Model/WebsocketsResponseService.php index 28f047f8..7bcb3f9f 100644 --- a/lib/Model/WebsocketsResponseService.php +++ b/lib/Model/WebsocketsResponseService.php @@ -53,7 +53,7 @@ class WebsocketsResponseService implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $fastlyTypes = [ - 'service' => '\Fastly\Model\BotManagementResponseServiceService' + 'service' => '\Fastly\Model\ApiDiscoveryResponseServiceService' ]; /** @@ -202,7 +202,7 @@ public function valid() /** * Gets service * - * @return \Fastly\Model\BotManagementResponseServiceService|null + * @return \Fastly\Model\ApiDiscoveryResponseServiceService|null */ public function getService() { @@ -212,7 +212,7 @@ public function getService() /** * Sets service * - * @param \Fastly\Model\BotManagementResponseServiceService|null $service service + * @param \Fastly\Model\ApiDiscoveryResponseServiceService|null $service service * * @return self */ diff --git a/sig.json b/sig.json index 53345efb..a960467b 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "bb3cb969", "D": "3441d86a"} +{"G": "6ebb4bfe", "D": "db064767"} From ca33c6f237e8e7a8aa9c821d446db584e30b59d4 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 9 Dec 2025 09:44:49 +0000 Subject: [PATCH 8/8] Generated v12.1.0 --- CHANGELOG.md | 22 + README.md | 11 +- docs/Api/DomainInspectorHistoricalApi.md | 2 +- docs/Api/DomainResearchApi.md | 100 ++ docs/Api/KvStoreApi.md | 45 +- docs/Api/KvStoreItemApi.md | 4 +- docs/Api/MetricsPlatformApi.md | 75 ++ docs/Api/OriginInspectorHistoricalApi.md | 2 +- docs/Api/ProductDdosProtectionApi.md | 4 +- docs/Api/ProductDomainResearchApi.md | 116 ++ docs/Api/SecretStoreApi.md | 4 +- docs/Api/SecretStoreItemApi.md | 4 +- docs/Api/ServiceAuthorizationsApi.md | 4 +- docs/Model/DdosProtectionEvent.md | 2 + docs/Model/DdosProtectionEventAllOf.md | 2 + docs/Model/DdosProtectionRequestEnableMode.md | 10 + .../Model/DomainResearchResponseBodyEnable.md | 12 + docs/Model/DomainResearchResponseCustomer.md | 10 + docs/Model/DomainResearchResponseLinks.md | 10 + .../Model/DomainResearchResponseLinksLinks.md | 10 + docs/Model/DomainResearchResponseProduct.md | 10 + .../DomainResearchResponseProductProduct.md | 11 + docs/Model/IamV1RoleResponse.md | 1 + docs/Model/InlineResponse20010.md | 3 +- docs/Model/InlineResponse20011.md | 10 + docs/Model/InlineResponse2006.md | 3 +- docs/Model/InlineResponse2007.md | 2 +- docs/Model/InlineResponse2008.md | 2 +- docs/Model/InlineResponse2009.md | 2 +- docs/Model/KvStoreDetails.md | 2 + ...ate.md => KvStoreRequestCreateOrUpdate.md} | 2 +- docs/Model/NgwafRequestEnable.md | 1 + docs/Model/Offer.md | 12 + docs/Model/OfferAllOf.md | 12 + docs/Model/PlatformMetadata.md | 14 + docs/Model/PlatformMetricsResponse.md | 11 + docs/Model/PlatformValues.md | 25 + docs/Model/RealtimeEntryAggregated.md | 4 + docs/Model/RealtimeMeasurements.md | 4 + docs/Model/Results.md | 4 + docs/Model/Status.md | 15 + docs/Model/StatusAllOf.md | 15 + docs/Model/Suggestion.md | 13 + docs/Model/SuggestionAllOf.md | 13 + lib/Api/DomainResearchApi.php | 865 +++++++++++++++ lib/Api/KvStoreApi.php | 321 +++++- lib/Api/KvStoreItemApi.php | 14 +- lib/Api/MetricsPlatformApi.php | 617 +++++++++++ lib/Api/ProductDdosProtectionApi.php | 16 +- lib/Api/ProductDomainResearchApi.php | 991 ++++++++++++++++++ lib/Api/SecretStoreApi.php | 14 +- lib/Api/SecretStoreItemApi.php | 14 +- lib/Api/ServiceAuthorizationsApi.php | 14 +- lib/Configuration.php | 4 +- lib/Model/DdosProtectionEvent.php | 60 ++ lib/Model/DdosProtectionEventAllOf.php | 60 ++ lib/Model/DdosProtectionRequestEnableMode.php | 350 +++++++ .../DomainResearchResponseBodyEnable.php | 374 +++++++ lib/Model/DomainResearchResponseCustomer.php | 314 ++++++ lib/Model/DomainResearchResponseLinks.php | 314 ++++++ .../DomainResearchResponseLinksLinks.php | 314 ++++++ lib/Model/DomainResearchResponseProduct.php | 314 ++++++ .../DomainResearchResponseProductProduct.php | 344 ++++++ lib/Model/IamV1RoleResponse.php | 30 + lib/Model/InlineResponse20010.php | 44 +- lib/Model/InlineResponse20011.php | 314 ++++++ lib/Model/InlineResponse2006.php | 58 +- lib/Model/InlineResponse2007.php | 6 +- lib/Model/InlineResponse2008.php | 6 +- lib/Model/InlineResponse2009.php | 6 +- lib/Model/KvStoreDetails.php | 70 +- ...e.php => KvStoreRequestCreateOrUpdate.php} | 8 +- lib/Model/NgwafRequestEnable.php | 40 +- lib/Model/Offer.php | 375 +++++++ lib/Model/OfferAllOf.php | 374 +++++++ lib/Model/PlatformMetadata.php | 435 ++++++++ lib/Model/PlatformMetricsResponse.php | 344 ++++++ lib/Model/PlatformValues.php | 765 ++++++++++++++ lib/Model/RealtimeEntryAggregated.php | 130 ++- lib/Model/RealtimeMeasurements.php | 130 ++- lib/Model/Results.php | 120 +++ lib/Model/Status.php | 465 ++++++++ lib/Model/StatusAllOf.php | 464 ++++++++ lib/Model/Suggestion.php | 405 +++++++ lib/Model/SuggestionAllOf.php | 404 +++++++ sig.json | 2 +- 86 files changed, 10792 insertions(+), 157 deletions(-) create mode 100644 docs/Api/DomainResearchApi.md create mode 100644 docs/Api/MetricsPlatformApi.md create mode 100644 docs/Api/ProductDomainResearchApi.md create mode 100644 docs/Model/DdosProtectionRequestEnableMode.md create mode 100644 docs/Model/DomainResearchResponseBodyEnable.md create mode 100644 docs/Model/DomainResearchResponseCustomer.md create mode 100644 docs/Model/DomainResearchResponseLinks.md create mode 100644 docs/Model/DomainResearchResponseLinksLinks.md create mode 100644 docs/Model/DomainResearchResponseProduct.md create mode 100644 docs/Model/DomainResearchResponseProductProduct.md create mode 100644 docs/Model/InlineResponse20011.md rename docs/Model/{KvStoreRequestCreate.md => KvStoreRequestCreateOrUpdate.md} (91%) create mode 100644 docs/Model/Offer.md create mode 100644 docs/Model/OfferAllOf.md create mode 100644 docs/Model/PlatformMetadata.md create mode 100644 docs/Model/PlatformMetricsResponse.md create mode 100644 docs/Model/PlatformValues.md create mode 100644 docs/Model/Status.md create mode 100644 docs/Model/StatusAllOf.md create mode 100644 docs/Model/Suggestion.md create mode 100644 docs/Model/SuggestionAllOf.md create mode 100644 lib/Api/DomainResearchApi.php create mode 100644 lib/Api/MetricsPlatformApi.php create mode 100644 lib/Api/ProductDomainResearchApi.php create mode 100644 lib/Model/DdosProtectionRequestEnableMode.php create mode 100644 lib/Model/DomainResearchResponseBodyEnable.php create mode 100644 lib/Model/DomainResearchResponseCustomer.php create mode 100644 lib/Model/DomainResearchResponseLinks.php create mode 100644 lib/Model/DomainResearchResponseLinksLinks.php create mode 100644 lib/Model/DomainResearchResponseProduct.php create mode 100644 lib/Model/DomainResearchResponseProductProduct.php create mode 100644 lib/Model/InlineResponse20011.php rename lib/Model/{KvStoreRequestCreate.php => KvStoreRequestCreateOrUpdate.php} (97%) create mode 100644 lib/Model/Offer.php create mode 100644 lib/Model/OfferAllOf.php create mode 100644 lib/Model/PlatformMetadata.php create mode 100644 lib/Model/PlatformMetricsResponse.php create mode 100644 lib/Model/PlatformValues.php create mode 100644 lib/Model/Status.php create mode 100644 lib/Model/StatusAllOf.php create mode 100644 lib/Model/Suggestion.php create mode 100644 lib/Model/SuggestionAllOf.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 22ae3e3e..1c644573 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [v12.1.0](https://github.com/fastly/fastly-php/releases/tag/release/v12.1.0) (2025-12-09) + +**Enhancements:** + +- feat(realtime, historical): Add new metrics `imgopto_compute_requests`, `dns_billable_responses_count`, + `dns_nonbillable_responses_count`, and `upgrade`. +- feat(products[ngwaf]): Add new parameter `traffic_ramp` to `enable-product-ngwaf`. +- feat(products[ddos_protection]): Add new parameter `mode` to `enable-product-ddos-protection`. +- feat(kv_store): Add `kv-store-put` operation. +- feat(iam_roles): Add `DisplayName` field to model. +- feat(domain_research): Add new Domain Research API. +- feat(ddos_protection): Add `requests_allowed` and `requests_detected` fields to DDoS Protection event API. + +- feat(products): Add `domain_research` product to enablement API. + + + +**Documentation:** + +- doc(enabled-products): Add support for optional enablement parameters for some products. + + ## [v12.0.0](https://github.com/fastly/fastly-php/releases/tag/release/v12.0.0) (2025-10-31) **Bug fixes:** diff --git a/README.md b/README.md index 4a5e42a0..da59792a 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,8 @@ Class | Method | Description [*DomainInspectorRealtimeApi*](docs/Api/DomainInspectorRealtimeApi.md) | [**getDomainInspectorLastMaxEntries**](docs/Api/DomainInspectorRealtimeApi.md#getdomaininspectorlastmaxentries) | Get a limited number of real-time domain data entries [*DomainInspectorRealtimeApi*](docs/Api/DomainInspectorRealtimeApi.md) | [**getDomainInspectorLastSecond**](docs/Api/DomainInspectorRealtimeApi.md#getdomaininspectorlastsecond) | Get real-time domain data from a specified time [*DomainOwnershipsApi*](docs/Api/DomainOwnershipsApi.md) | [**listDomainOwnerships**](docs/Api/DomainOwnershipsApi.md#listdomainownerships) | List domain-ownerships +[*DomainResearchApi*](docs/Api/DomainResearchApi.md) | [**domainStatus**](docs/Api/DomainResearchApi.md#domainstatus) | Domain status +[*DomainResearchApi*](docs/Api/DomainResearchApi.md) | [**suggestDomains**](docs/Api/DomainResearchApi.md#suggestdomains) | Suggest domains [*EventsApi*](docs/Api/EventsApi.md) | [**getEvent**](docs/Api/EventsApi.md#getevent) | Get an event [*EventsApi*](docs/Api/EventsApi.md) | [**listEvents**](docs/Api/EventsApi.md#listevents) | List events [*GzipApi*](docs/Api/GzipApi.md) | [**createGzipConfig**](docs/Api/GzipApi.md#creategzipconfig) | Create a gzip configuration @@ -271,6 +273,7 @@ Class | Method | Description [*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreDelete**](docs/Api/KvStoreApi.md#kvstoredelete) | Delete a KV store. [*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreGet**](docs/Api/KvStoreApi.md#kvstoreget) | Describe a KV store. [*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStoreList**](docs/Api/KvStoreApi.md#kvstorelist) | List all KV stores. +[*KvStoreApi*](docs/Api/KvStoreApi.md) | [**kvStorePut**](docs/Api/KvStoreApi.md#kvstoreput) | Update a KV store. [*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreDeleteItem**](docs/Api/KvStoreItemApi.md#kvstoredeleteitem) | Delete an item. [*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreGetItem**](docs/Api/KvStoreItemApi.md#kvstoregetitem) | Get an item. [*KvStoreItemApi*](docs/Api/KvStoreItemApi.md) | [**kvStoreListItemKeys**](docs/Api/KvStoreItemApi.md#kvstorelistitemkeys) | List item keys. @@ -416,6 +419,7 @@ Class | Method | Description [*LoggingSyslogApi*](docs/Api/LoggingSyslogApi.md) | [**getLogSyslog**](docs/Api/LoggingSyslogApi.md#getlogsyslog) | Get a syslog log endpoint [*LoggingSyslogApi*](docs/Api/LoggingSyslogApi.md) | [**listLogSyslog**](docs/Api/LoggingSyslogApi.md#listlogsyslog) | List Syslog log endpoints [*LoggingSyslogApi*](docs/Api/LoggingSyslogApi.md) | [**updateLogSyslog**](docs/Api/LoggingSyslogApi.md#updatelogsyslog) | Update a syslog log endpoint +[*MetricsPlatformApi*](docs/Api/MetricsPlatformApi.md) | [**getPlatformMetricsServiceHistorical**](docs/Api/MetricsPlatformApi.md#getplatformmetricsservicehistorical) | Get historical time series metrics for a single service [*MutualAuthenticationApi*](docs/Api/MutualAuthenticationApi.md) | [**createMutualTlsAuthentication**](docs/Api/MutualAuthenticationApi.md#createmutualtlsauthentication) | Create a Mutual Authentication [*MutualAuthenticationApi*](docs/Api/MutualAuthenticationApi.md) | [**deleteMutualTls**](docs/Api/MutualAuthenticationApi.md#deletemutualtls) | Delete a Mutual TLS [*MutualAuthenticationApi*](docs/Api/MutualAuthenticationApi.md) | [**getMutualAuthentication**](docs/Api/MutualAuthenticationApi.md#getmutualauthentication) | Get a Mutual Authentication @@ -471,6 +475,9 @@ Class | Method | Description [*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**enableProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#enableproductdomaininspector) | Enable product [*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**getProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#getproductdomaininspector) | Get product enablement status [*ProductDomainInspectorApi*](docs/Api/ProductDomainInspectorApi.md) | [**getServicesProductDomainInspector**](docs/Api/ProductDomainInspectorApi.md#getservicesproductdomaininspector) | Get services with product enabled +[*ProductDomainResearchApi*](docs/Api/ProductDomainResearchApi.md) | [**disableProductDomainResearch**](docs/Api/ProductDomainResearchApi.md#disableproductdomainresearch) | Disable product +[*ProductDomainResearchApi*](docs/Api/ProductDomainResearchApi.md) | [**enableDomainResearch**](docs/Api/ProductDomainResearchApi.md#enabledomainresearch) | Enable product +[*ProductDomainResearchApi*](docs/Api/ProductDomainResearchApi.md) | [**getDomainResearch**](docs/Api/ProductDomainResearchApi.md#getdomainresearch) | Get product enablement status [*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**disableProductFanout**](docs/Api/ProductFanoutApi.md#disableproductfanout) | Disable product [*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**enableProductFanout**](docs/Api/ProductFanoutApi.md#enableproductfanout) | Enable product [*ProductFanoutApi*](docs/Api/ProductFanoutApi.md) | [**getProductFanout**](docs/Api/ProductFanoutApi.md#getproductfanout) | Get product enablement status @@ -662,8 +669,6 @@ The fastly-php API client currently does not support the following endpoints: - [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) - [`/dns/configurations/{dns_configuration_id}`](https://www.fastly.com/documentation/reference/api/) (DELETE, GET, PATCH) - [`/dns/configurations`](https://www.fastly.com/documentation/reference/api/) (GET, POST) -- [`/domains/v1/tools/status`](https://www.fastly.com/documentation/reference/api/) (GET) -- [`/domains/v1/tools/suggest`](https://www.fastly.com/documentation/reference/api/) (GET) - [`/ngwaf/v1/lists/{listId}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (DELETE, GET, PATCH) - [`/ngwaf/v1/lists`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/lists) (GET, POST) - [`/ngwaf/v1/signals/{signal_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/signals) (DELETE, GET, PATCH) @@ -676,6 +681,8 @@ The fastly-php API client currently does not support the following endpoints: - [`/ngwaf/v1/workspaces/{workspace_id}/alerts`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/workspace_alerts) (GET, POST) - [`/ngwaf/v1/workspaces/{workspace_id}/events/{event_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET, PATCH) - [`/ngwaf/v1/workspaces/{workspace_id}/events`](https://www.fastly.com/documentation/reference/api/ngwaf/events) (GET) +- [`/ngwaf/v1/workspaces/{workspace_id}/header-links/{header_link_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/header-links) (DELETE, GET, PUT) +- [`/ngwaf/v1/workspaces/{workspace_id}/header-links`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/header-links) (GET, POST) - [`/ngwaf/v1/workspaces/{workspace_id}/redactions/{redaction_id}`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (DELETE, GET, PATCH) - [`/ngwaf/v1/workspaces/{workspace_id}/redactions`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/redactions) (GET, POST) - [`/ngwaf/v1/workspaces/{workspace_id}/requests/{request_id}/report`](https://www.fastly.com/documentation/reference/api/ngwaf/v1/requests) (POST) diff --git a/docs/Api/DomainInspectorHistoricalApi.md b/docs/Api/DomainInspectorHistoricalApi.md index 21166675..89b4f80a 100644 --- a/docs/Api/DomainInspectorHistoricalApi.md +++ b/docs/Api/DomainInspectorHistoricalApi.md @@ -63,7 +63,7 @@ Name | Type | Description | Notes **group_by** | **string** | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). | [optional] [one of: 'domain', 'datacenter', 'region', 'none'] **limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] **cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] -**region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'africa_std', 'anzac', 'asia', 'asia_india', 'asia_southkorea', 'europe', 'mexico', 'southamerica_std', 'usa'] **datacenter** | **string** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] **domain** | **string** | Limit query to one or more specific domains. Values should be comma-separated. | [optional] diff --git a/docs/Api/DomainResearchApi.md b/docs/Api/DomainResearchApi.md new file mode 100644 index 00000000..ccc9fa31 --- /dev/null +++ b/docs/Api/DomainResearchApi.md @@ -0,0 +1,100 @@ +# Fastly\Api\DomainResearchApi + + +```php +$apiInstance = new Fastly\Api\DomainResearchApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**domainStatus()**](DomainResearchApi.md#domainStatus) | **GET** /domain-management/v1/tools/status | Domain status +[**suggestDomains()**](DomainResearchApi.md#suggestDomains) | **GET** /domain-management/v1/tools/suggest | Suggest domains + + +## `domainStatus()` + +```php +domainStatus($options): \Fastly\Model\Status // Domain status +``` + +The `Status` method checks the availability status of a single domain name. + +### Example +```php + $options['domain'] = acmecoffee.shop; // string +$options['scope'] = estimate; // string + +try { + $result = $apiInstance->domainStatus($options); +} catch (Exception $e) { + echo 'Exception when calling DomainResearchApi->domainStatus: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**domain** | **string** | | +**scope** | **string** | | [optional] + +### Return type + +[**\Fastly\Model\Status**](../Model/Status.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `suggestDomains()` + +```php +suggestDomains($options): \Fastly\Model\InlineResponse2006 // Suggest domains +``` + +The `Suggest` method performs a real-time query of the search term(s) against the [known zone database](http://zonedb.org), making recommendations, stemming, and applying Unicode folding, IDN normalization, registrar supported-zone restrictions, and other refinements. **Note:** `Suggest` method responses do not include domain availability status. + +### Example +```php + $options['query'] = foo%20bar; // string +$options['defaults'] = club; // string +$options['keywords'] = food,kitchen; // string +$options['location'] = de; // string +$options['vendor'] = dnsimple.com; // string + +try { + $result = $apiInstance->suggestDomains($options); +} catch (Exception $e) { + echo 'Exception when calling DomainResearchApi->suggestDomains: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**query** | **string** | | +**defaults** | **string** | | [optional] +**keywords** | **string** | | [optional] +**location** | **string** | | [optional] +**vendor** | **string** | | [optional] + +### Return type + +[**\Fastly\Model\InlineResponse2006**](../Model/InlineResponse2006.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/KvStoreApi.md b/docs/Api/KvStoreApi.md index 4c884954..dcbad1ef 100644 --- a/docs/Api/KvStoreApi.md +++ b/docs/Api/KvStoreApi.md @@ -21,6 +21,7 @@ Method | HTTP request | Description [**kvStoreDelete()**](KvStoreApi.md#kvStoreDelete) | **DELETE** /resources/stores/kv/{store_id} | Delete a KV store. [**kvStoreGet()**](KvStoreApi.md#kvStoreGet) | **GET** /resources/stores/kv/{store_id} | Describe a KV store. [**kvStoreList()**](KvStoreApi.md#kvStoreList) | **GET** /resources/stores/kv | List all KV stores. +[**kvStorePut()**](KvStoreApi.md#kvStorePut) | **PUT** /resources/stores/kv/{store_id} | Update a KV store. ## `kvStoreCreate()` @@ -34,7 +35,7 @@ Create a KV store. ### Example ```php $options['location'] = 'location_example'; // string -$options['kv_store_request_create'] = {"name":"my-store"}; // \Fastly\Model\KvStoreRequestCreate +$options['kv_store_request_create_or_update'] = {"name":"my-store"}; // \Fastly\Model\KvStoreRequestCreateOrUpdate try { $result = $apiInstance->kvStoreCreate($options); @@ -50,7 +51,7 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **location** | **string** | | [optional] [one of: 'US', 'EU', 'ASIA', 'AUS'] -**kv_store_request_create** | [**\Fastly\Model\KvStoreRequestCreate**](../Model/KvStoreRequestCreate.md) | | [optional] +**kv_store_request_create_or_update** | [**\Fastly\Model\KvStoreRequestCreateOrUpdate**](../Model/KvStoreRequestCreateOrUpdate.md) | | [optional] ### Return type @@ -130,7 +131,7 @@ Name | Type | Description | Notes ## `kvStoreList()` ```php -kvStoreList($options): \Fastly\Model\InlineResponse2006 // List all KV stores. +kvStoreList($options): \Fastly\Model\InlineResponse2007 // List all KV stores. ``` List all KV stores. @@ -160,7 +161,43 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2006**](../Model/InlineResponse2006.md) +[**\Fastly\Model\InlineResponse2007**](../Model/InlineResponse2007.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `kvStorePut()` + +```php +kvStorePut($options) // Update a KV store. +``` + +Update the name of a KV store. + +### Example +```php + $options['store_id'] = 'store_id_example'; // string +$options['kv_store_request_create_or_update'] = {"name":"my-renamed-store"}; // \Fastly\Model\KvStoreRequestCreateOrUpdate + +try { + $apiInstance->kvStorePut($options); +} catch (Exception $e) { + echo 'Exception when calling KvStoreApi->kvStorePut: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**store_id** | **string** | | +**kv_store_request_create_or_update** | [**\Fastly\Model\KvStoreRequestCreateOrUpdate**](../Model/KvStoreRequestCreateOrUpdate.md) | | [optional] + +### Return type + +void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/KvStoreItemApi.md b/docs/Api/KvStoreItemApi.md index 7b0dbefe..6de7f674 100644 --- a/docs/Api/KvStoreItemApi.md +++ b/docs/Api/KvStoreItemApi.md @@ -102,7 +102,7 @@ Name | Type | Description | Notes ## `kvStoreListItemKeys()` ```php -kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2007 // List item keys. +kvStoreListItemKeys($options): \Fastly\Model\InlineResponse2008 // List item keys. ``` Lists the matching item keys (or all item keys, if no prefix is supplied). @@ -136,7 +136,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\Fastly\Model\InlineResponse2008**](../Model/InlineResponse2008.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/MetricsPlatformApi.md b/docs/Api/MetricsPlatformApi.md new file mode 100644 index 00000000..9841ff8d --- /dev/null +++ b/docs/Api/MetricsPlatformApi.md @@ -0,0 +1,75 @@ +# Fastly\Api\MetricsPlatformApi + + +```php +$apiInstance = new Fastly\Api\MetricsPlatformApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**getPlatformMetricsServiceHistorical()**](MetricsPlatformApi.md#getPlatformMetricsServiceHistorical) | **GET** /metrics/platform/services/{service_id}/{granularity} | Get historical time series metrics for a single service + + +## `getPlatformMetricsServiceHistorical()` + +```php +getPlatformMetricsServiceHistorical($options): \Fastly\Model\PlatformMetricsResponse // Get historical time series metrics for a single service +``` + +Fetches historical metrics for a single service for a given granularity. + +### Example +```php + $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. +$options['granularity'] = daily; // string | Duration of sample windows. +$options['from'] = 2025-06-08T00:00:00.000Z; // string | A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. +$options['to'] = 2025-08-02T00:00:00.000Z; // string | A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. +$options['metric'] = ttfb_edge_p95_us,ttfb_edge_p99_us; // string | The metric(s) to retrieve. Multiple values should be comma-separated. +$options['metric_set'] = ttfb; // string | The metric set(s) to retrieve. Multiple values should be comma-separated. +$options['group_by'] = region; // string | Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. +$options['region'] = usa; // string | Limit query to one or more specific geographic regions. Values should be comma-separated. +$options['datacenter'] = SJC,STP; // string | Limit query to one or more specific POPs. Values should be comma-separated. +$options['cursor'] = 'cursor_example'; // string | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. +$options['limit'] = '1000'; // string | Number of results per page. The maximum is 10000. + +try { + $result = $apiInstance->getPlatformMetricsServiceHistorical($options); +} catch (Exception $e) { + echo 'Exception when calling MetricsPlatformApi->getPlatformMetricsServiceHistorical: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**service_id** | **string** | Alphanumeric string identifying the service. | +**granularity** | **string** | Duration of sample windows. | [one of: 'minutely', 'hourly', 'daily'] +**from** | **string** | A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. | [optional] +**to** | **string** | A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. | [optional] +**metric** | **string** | The metric(s) to retrieve. Multiple values should be comma-separated. | [optional] +**metric_set** | **string** | The metric set(s) to retrieve. Multiple values should be comma-separated. | [optional] [one of: 'ttfb'] +**group_by** | **string** | Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. | [optional] [one of: 'datacenter', 'region'] +**region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'africa_std', 'anzac', 'asia', 'asia_india', 'asia_southkorea', 'europe', 'mexico', 'southamerica_std', 'usa'] +**datacenter** | **string** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] +**cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] +**limit** | **string** | Number of results per page. The maximum is 10000. | [optional] [defaults to '1000'] + +### Return type + +[**\Fastly\Model\PlatformMetricsResponse**](../Model/PlatformMetricsResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/OriginInspectorHistoricalApi.md b/docs/Api/OriginInspectorHistoricalApi.md index 93f26e74..fead951a 100644 --- a/docs/Api/OriginInspectorHistoricalApi.md +++ b/docs/Api/OriginInspectorHistoricalApi.md @@ -63,7 +63,7 @@ Name | Type | Description | Notes **group_by** | **string** | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. | [optional] [one of: 'host', 'datacenter', 'region', 'none'] **limit** | **string** | Number of results per page. The maximum is 200. | [optional] [defaults to '100'] **cursor** | **string** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] -**region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'usa', 'europe', 'asia', 'asia_india', 'asia_southkorea', 'africa_std', 'southamerica_std'] +**region** | **string** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] [one of: 'africa_std', 'anzac', 'asia', 'asia_india', 'asia_southkorea', 'europe', 'mexico', 'southamerica_std', 'usa'] **datacenter** | **string** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] **host** | **string** | Limit query to one or more specific origin hosts. Values should be comma-separated. | [optional] diff --git a/docs/Api/ProductDdosProtectionApi.md b/docs/Api/ProductDdosProtectionApi.md index c292b1fd..6b7537de 100644 --- a/docs/Api/ProductDdosProtectionApi.md +++ b/docs/Api/ProductDdosProtectionApi.md @@ -65,11 +65,12 @@ void (empty response body) enableProductDdosProtection($options): \Fastly\Model\DdosProtectionResponseEnable // Enable product ``` -Enable the DDoS Protection product on a service in 'log' mode. +Enable the DDoS Protection product on a service in default 'log' mode unless otherwise specified in the request body. ### Example ```php $options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service. +$options['ddos_protection_request_enable_mode'] = {"mode":"block"}; // \Fastly\Model\DdosProtectionRequestEnableMode try { $result = $apiInstance->enableProductDdosProtection($options); @@ -85,6 +86,7 @@ Note: the input parameter is an associative array with the keys listed below. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **service_id** | **string** | Alphanumeric string identifying the service. | +**ddos_protection_request_enable_mode** | [**\Fastly\Model\DdosProtectionRequestEnableMode**](../Model/DdosProtectionRequestEnableMode.md) | | [optional] ### Return type diff --git a/docs/Api/ProductDomainResearchApi.md b/docs/Api/ProductDomainResearchApi.md new file mode 100644 index 00000000..69cddc0e --- /dev/null +++ b/docs/Api/ProductDomainResearchApi.md @@ -0,0 +1,116 @@ +# Fastly\Api\ProductDomainResearchApi + + +```php +$apiInstance = new Fastly\Api\ProductDomainResearchApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +``` + +## Methods + +> [!NOTE] +> All URIs are relative to `https://api.fastly.com` + +Method | HTTP request | Description +------ | ------------ | ----------- +[**disableProductDomainResearch()**](ProductDomainResearchApi.md#disableProductDomainResearch) | **DELETE** /enabled-products/v1/domain_research | Disable product +[**enableDomainResearch()**](ProductDomainResearchApi.md#enableDomainResearch) | **PUT** /enabled-products/v1/domain_research | Enable product +[**getDomainResearch()**](ProductDomainResearchApi.md#getDomainResearch) | **GET** /enabled-products/v1/domain_research | Get product enablement status + + +## `disableProductDomainResearch()` + +```php +disableProductDomainResearch($options) // Disable product +``` + +Disable the Domain Research product. + +### Example +```php + +try { + $apiInstance->disableProductDomainResearch($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainResearchApi->disableProductDomainResearch: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +void (empty response body) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `enableDomainResearch()` + +```php +enableDomainResearch($options): \Fastly\Model\DomainResearchResponseBodyEnable // Enable product +``` + +Enable the Domain Research product. + +### Example +```php + +try { + $result = $apiInstance->enableDomainResearch($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainResearchApi->enableDomainResearch: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\DomainResearchResponseBodyEnable**](../Model/DomainResearchResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) + +## `getDomainResearch()` + +```php +getDomainResearch($options): \Fastly\Model\DomainResearchResponseBodyEnable // Get product enablement status +``` + +Get the enablement status of the Domain Research product. + +### Example +```php + +try { + $result = $apiInstance->getDomainResearch($options); +} catch (Exception $e) { + echo 'Exception when calling ProductDomainResearchApi->getDomainResearch: ', $e->getMessage(), PHP_EOL; +} +``` + +### Options + +Note: the input parameter is an associative array with the keys listed below. + +This endpoint does not need any parameters. + +### Return type + +[**\Fastly\Model\DomainResearchResponseBodyEnable**](../Model/DomainResearchResponseBodyEnable.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Api/SecretStoreApi.md b/docs/Api/SecretStoreApi.md index e22af495..28d9ef30 100644 --- a/docs/Api/SecretStoreApi.md +++ b/docs/Api/SecretStoreApi.md @@ -161,7 +161,7 @@ Name | Type | Description | Notes ## `getSecretStores()` ```php -getSecretStores($options): \Fastly\Model\InlineResponse2008 // Get all secret stores +getSecretStores($options): \Fastly\Model\InlineResponse2009 // Get all secret stores ``` Get all secret stores. @@ -191,7 +191,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2008**](../Model/InlineResponse2008.md) +[**\Fastly\Model\InlineResponse2009**](../Model/InlineResponse2009.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/SecretStoreItemApi.md b/docs/Api/SecretStoreItemApi.md index 4585861f..f4627a76 100644 --- a/docs/Api/SecretStoreItemApi.md +++ b/docs/Api/SecretStoreItemApi.md @@ -136,7 +136,7 @@ Name | Type | Description | Notes ## `getSecrets()` ```php -getSecrets($options): \Fastly\Model\InlineResponse2009 // List secrets within a store. +getSecrets($options): \Fastly\Model\InlineResponse20010 // List secrets within a store. ``` List all secrets within a store. @@ -166,7 +166,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse2009**](../Model/InlineResponse2009.md) +[**\Fastly\Model\InlineResponse20010**](../Model/InlineResponse20010.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Api/ServiceAuthorizationsApi.md b/docs/Api/ServiceAuthorizationsApi.md index d09af97e..9c1254fa 100644 --- a/docs/Api/ServiceAuthorizationsApi.md +++ b/docs/Api/ServiceAuthorizationsApi.md @@ -97,7 +97,7 @@ void (empty response body) ## `deleteServiceAuthorization2()` ```php -deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse20010 // Delete service authorizations +deleteServiceAuthorization2($options): \Fastly\Model\InlineResponse20011 // Delete service authorizations ``` Delete service authorizations. @@ -123,7 +123,7 @@ Name | Type | Description | Notes ### Return type -[**\Fastly\Model\InlineResponse20010**](../Model/InlineResponse20010.md) +[**\Fastly\Model\InlineResponse20011**](../Model/InlineResponse20011.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DdosProtectionEvent.md b/docs/Model/DdosProtectionEvent.md index aa485a0a..a3990223 100644 --- a/docs/Model/DdosProtectionEvent.md +++ b/docs/Model/DdosProtectionEvent.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **updated_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] **id** | **string** | Unique ID of the event. | [optional] **name** | **string** | A human-readable name for the event. | [optional] +**requests_allowed** | **int** | Number of requests classified as non-attack traffic for an event. | [optional] +**requests_detected** | **int** | Number of requests classified as DDoS attack traffic for an event. | [optional] **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **service_id** | **string** | Alphanumeric string identifying the service. | [optional] **started_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/DdosProtectionEventAllOf.md b/docs/Model/DdosProtectionEventAllOf.md index 4c74e1bd..b9a569bd 100644 --- a/docs/Model/DdosProtectionEventAllOf.md +++ b/docs/Model/DdosProtectionEventAllOf.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | Unique ID of the event. | [optional] **name** | **string** | A human-readable name for the event. | [optional] +**requests_allowed** | **int** | Number of requests classified as non-attack traffic for an event. | [optional] +**requests_detected** | **int** | Number of requests classified as DDoS attack traffic for an event. | [optional] **customer_id** | **string** | Alphanumeric string identifying the customer. | [optional] **service_id** | **string** | Alphanumeric string identifying the service. | [optional] **started_at** | **\DateTime** | Date and time in ISO 8601 format. | [optional] [readonly] diff --git a/docs/Model/DdosProtectionRequestEnableMode.md b/docs/Model/DdosProtectionRequestEnableMode.md new file mode 100644 index 00000000..7ec07032 --- /dev/null +++ b/docs/Model/DdosProtectionRequestEnableMode.md @@ -0,0 +1,10 @@ +# # DdosProtectionRequestEnableMode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **string** | Operation mode | [optional] [one of: 'false', 'log', 'block'] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainResearchResponseBodyEnable.md b/docs/Model/DomainResearchResponseBodyEnable.md new file mode 100644 index 00000000..c376365a --- /dev/null +++ b/docs/Model/DomainResearchResponseBodyEnable.md @@ -0,0 +1,12 @@ +# # DomainResearchResponseBodyEnable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DomainResearchResponseProductProduct**](DomainResearchResponseProductProduct.md) | | [optional] +**customer** | [**\Fastly\Model\AiAcceleratorResponseCustomerCustomer**](AiAcceleratorResponseCustomerCustomer.md) | | [optional] +**_links** | [**\Fastly\Model\DomainResearchResponseLinksLinks**](DomainResearchResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainResearchResponseCustomer.md b/docs/Model/DomainResearchResponseCustomer.md new file mode 100644 index 00000000..7a9c6f65 --- /dev/null +++ b/docs/Model/DomainResearchResponseCustomer.md @@ -0,0 +1,10 @@ +# # DomainResearchResponseCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer** | [**\Fastly\Model\AiAcceleratorResponseCustomerCustomer**](AiAcceleratorResponseCustomerCustomer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainResearchResponseLinks.md b/docs/Model/DomainResearchResponseLinks.md new file mode 100644 index 00000000..b3cda9d8 --- /dev/null +++ b/docs/Model/DomainResearchResponseLinks.md @@ -0,0 +1,10 @@ +# # DomainResearchResponseLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\Fastly\Model\DomainResearchResponseLinksLinks**](DomainResearchResponseLinksLinks.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainResearchResponseLinksLinks.md b/docs/Model/DomainResearchResponseLinksLinks.md new file mode 100644 index 00000000..9f91c964 --- /dev/null +++ b/docs/Model/DomainResearchResponseLinksLinks.md @@ -0,0 +1,10 @@ +# # DomainResearchResponseLinksLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**self** | **string** | Location of resource | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainResearchResponseProduct.md b/docs/Model/DomainResearchResponseProduct.md new file mode 100644 index 00000000..e326e653 --- /dev/null +++ b/docs/Model/DomainResearchResponseProduct.md @@ -0,0 +1,10 @@ +# # DomainResearchResponseProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**product** | [**\Fastly\Model\DomainResearchResponseProductProduct**](DomainResearchResponseProductProduct.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DomainResearchResponseProductProduct.md b/docs/Model/DomainResearchResponseProductProduct.md new file mode 100644 index 00000000..bd569e11 --- /dev/null +++ b/docs/Model/DomainResearchResponseProductProduct.md @@ -0,0 +1,11 @@ +# # DomainResearchResponseProductProduct + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Product identifier | [optional] +**object** | **string** | Name of the object | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IamV1RoleResponse.md b/docs/Model/IamV1RoleResponse.md index 013213c4..68323ba0 100644 --- a/docs/Model/IamV1RoleResponse.md +++ b/docs/Model/IamV1RoleResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | | [optional] **name** | **string** | | [optional] +**display_name** | **string** | | [optional] **description** | **string** | | [optional] **permissions** | **string[]** | The set of permissions granted to this role. | [optional] diff --git a/docs/Model/InlineResponse20010.md b/docs/Model/InlineResponse20010.md index ad759b3d..fb5a9acc 100644 --- a/docs/Model/InlineResponse20010.md +++ b/docs/Model/InlineResponse20010.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\ServiceAuthorizationResponseData[]**](ServiceAuthorizationResponseData.md) | | [optional] +**data** | [**\Fastly\Model\SecretResponse[]**](SecretResponse.md) | | [optional] +**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20011.md b/docs/Model/InlineResponse20011.md new file mode 100644 index 00000000..cab609a4 --- /dev/null +++ b/docs/Model/InlineResponse20011.md @@ -0,0 +1,10 @@ +# # InlineResponse20011 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\Fastly\Model\ServiceAuthorizationResponseData[]**](ServiceAuthorizationResponseData.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2006.md b/docs/Model/InlineResponse2006.md index 3244fb64..53d19240 100644 --- a/docs/Model/InlineResponse2006.md +++ b/docs/Model/InlineResponse2006.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] -**meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] +**results** | [**\Fastly\Model\Suggestion[]**](Suggestion.md) | | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2007.md b/docs/Model/InlineResponse2007.md index ffb9f1f9..ef6c4e2c 100644 --- a/docs/Model/InlineResponse2007.md +++ b/docs/Model/InlineResponse2007.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | **string[]** | | [optional] +**data** | [**\Fastly\Model\KvStoreDetails[]**](KvStoreDetails.md) | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2008.md b/docs/Model/InlineResponse2008.md index 222f00bc..840811d5 100644 --- a/docs/Model/InlineResponse2008.md +++ b/docs/Model/InlineResponse2008.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SecretStoreResponse[]**](SecretStoreResponse.md) | | [optional] +**data** | **string[]** | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/InlineResponse2009.md b/docs/Model/InlineResponse2009.md index 8d9b195f..a7d9e18a 100644 --- a/docs/Model/InlineResponse2009.md +++ b/docs/Model/InlineResponse2009.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**\Fastly\Model\SecretResponse[]**](SecretResponse.md) | | [optional] +**data** | [**\Fastly\Model\SecretStoreResponse[]**](SecretStoreResponse.md) | | [optional] **meta** | [**\Fastly\Model\PaginationCursorMeta**](PaginationCursorMeta.md) | | [optional] diff --git a/docs/Model/KvStoreDetails.md b/docs/Model/KvStoreDetails.md index 28fbd519..5fd537ed 100644 --- a/docs/Model/KvStoreDetails.md +++ b/docs/Model/KvStoreDetails.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | ID of the store. | [optional] **name** | **string** | Name of the store. | [optional] +**created_at** | **string** | Timestamp at which the store was created. | [optional] +**updated_at** | **string** | Timestamp at which the store was last updated. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/KvStoreRequestCreate.md b/docs/Model/KvStoreRequestCreateOrUpdate.md similarity index 91% rename from docs/Model/KvStoreRequestCreate.md rename to docs/Model/KvStoreRequestCreateOrUpdate.md index e156104e..08fc7267 100644 --- a/docs/Model/KvStoreRequestCreate.md +++ b/docs/Model/KvStoreRequestCreateOrUpdate.md @@ -1,4 +1,4 @@ -# # KvStoreRequestCreate +# # KvStoreRequestCreateOrUpdate ## Properties diff --git a/docs/Model/NgwafRequestEnable.md b/docs/Model/NgwafRequestEnable.md index bb541458..5469124a 100644 --- a/docs/Model/NgwafRequestEnable.md +++ b/docs/Model/NgwafRequestEnable.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **workspace_id** | **string** | The workspace to link. | +**traffic_ramp** | **string** | The percentage of traffic to inspect. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Offer.md b/docs/Model/Offer.md new file mode 100644 index 00000000..3a9da649 --- /dev/null +++ b/docs/Model/Offer.md @@ -0,0 +1,12 @@ +# # Offer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vendor** | **string** | The aftermarket vendor. | [optional] +**price** | **string** | The price for the domain from the aftermarket vendor. | [optional] +**currency** | **string** | The currency for the aftermarket offer. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OfferAllOf.md b/docs/Model/OfferAllOf.md new file mode 100644 index 00000000..ce070c71 --- /dev/null +++ b/docs/Model/OfferAllOf.md @@ -0,0 +1,12 @@ +# # OfferAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vendor** | **string** | The aftermarket vendor. | [optional] +**price** | **string** | The price for the domain from the aftermarket vendor. | [optional] +**currency** | **string** | The currency for the aftermarket offer. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PlatformMetadata.md b/docs/Model/PlatformMetadata.md new file mode 100644 index 00000000..fa62dc44 --- /dev/null +++ b/docs/Model/PlatformMetadata.md @@ -0,0 +1,14 @@ +# # PlatformMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **\DateTime** | An RFC-8339-formatted date and time indicating the inclusive start of the query time range. | [optional] +**to** | **\DateTime** | An RFC-8339-formatted date and time indicating the exclusive end of the query time range. | [optional] +**next_cursor** | **string** | A string that can be used to request the next page of results, if any. | [optional] +**group_by** | **string** | A comma-separated list of fields used to group and order the results. | [optional] +**limit** | **int** | The maximum number of results to return. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PlatformMetricsResponse.md b/docs/Model/PlatformMetricsResponse.md new file mode 100644 index 00000000..8c0d43d8 --- /dev/null +++ b/docs/Model/PlatformMetricsResponse.md @@ -0,0 +1,11 @@ +# # PlatformMetricsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**meta** | [**\Fastly\Model\PlatformMetadata**](PlatformMetadata.md) | | [optional] +**data** | [**\Fastly\Model\PlatformValues[]**](PlatformValues.md) | An array of values representing the metric values at each point in time. Note that this dataset is sparse: only the keys with non-zero values will be included in the record. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PlatformValues.md b/docs/Model/PlatformValues.md new file mode 100644 index 00000000..5b75f08f --- /dev/null +++ b/docs/Model/PlatformValues.md @@ -0,0 +1,25 @@ +# # PlatformValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timestamp** | **\DateTime** | Timestamp of the metrics data point. | [optional] +**ttfb_origin_p25_us** | **float** | 25th percentile of time to first byte from origin, in microseconds. | [optional] +**ttfb_origin_p50_us** | **float** | 50th percentile of time to first byte from origin, in microseconds. | [optional] +**ttfb_origin_p75_us** | **float** | 75th percentile of time to first byte from origin, in microseconds. | [optional] +**ttfb_origin_p95_us** | **float** | 95th percentile of time to first byte from origin, in microseconds. | [optional] +**ttfb_origin_p99_us** | **float** | 99th percentile of time to first byte from origin, in microseconds. | [optional] +**ttfb_shield_p25_us** | **float** | 25th percentile of time to first byte from shield, in microseconds. | [optional] +**ttfb_shield_p50_us** | **float** | 50th percentile of time to first byte from shield, in microseconds. | [optional] +**ttfb_shield_p75_us** | **float** | 75th percentile of time to first byte from shield, in microseconds. | [optional] +**ttfb_shield_p95_us** | **float** | 95th percentile of time to first byte from shield, in microseconds. | [optional] +**ttfb_shield_p99_us** | **float** | 99th percentile of time to first byte from shield, in microseconds. | [optional] +**ttfb_edge_p25_us** | **float** | 25th percentile of time to first byte from edge, in microseconds. | [optional] +**ttfb_edge_p50_us** | **float** | 50th percentile of time to first byte from edge, in microseconds. | [optional] +**ttfb_edge_p75_us** | **float** | 75th percentile of time to first byte from edge, in microseconds. | [optional] +**ttfb_edge_p95_us** | **float** | 95th percentile of time to first byte from edge, in microseconds. | [optional] +**ttfb_edge_p99_us** | **float** | 99th percentile of time to first byte from edge, in microseconds. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RealtimeEntryAggregated.md b/docs/Model/RealtimeEntryAggregated.md index 6c630367..36018490 100644 --- a/docs/Model/RealtimeEntryAggregated.md +++ b/docs/Model/RealtimeEntryAggregated.md @@ -266,6 +266,10 @@ Name | Type | Description | Notes **request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] **compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] **api_discovery_requests_count** | **int** | Number of requests processed by the API Discovery engine. | [optional] +**imgopto_compute_requests** | **int** | The number of Image Optimizer requests made from Compute services. | [optional] +**dns_billable_responses_count** | **int** | Number of billable DNS responses (e.g., A, CNAME). | [optional] +**dns_nonbillable_responses_count** | **int** | Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN). | [optional] +**upgrade** | **int** | Number of requests that resulted in a WebSocket upgrade. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RealtimeMeasurements.md b/docs/Model/RealtimeMeasurements.md index 2a567b4c..1e2c95bc 100644 --- a/docs/Model/RealtimeMeasurements.md +++ b/docs/Model/RealtimeMeasurements.md @@ -266,6 +266,10 @@ Name | Type | Description | Notes **request_collapse_unusable_count** | **int** | Number of requests that were collapsed and unable to be satisfied by the resulting cache object. | [optional] **compute_cache_operations_count** | **int** | Number of cache operations executed by the Compute platform. | [optional] **api_discovery_requests_count** | **int** | Number of requests processed by the API Discovery engine. | [optional] +**imgopto_compute_requests** | **int** | The number of Image Optimizer requests made from Compute services. | [optional] +**dns_billable_responses_count** | **int** | Number of billable DNS responses (e.g., A, CNAME). | [optional] +**dns_nonbillable_responses_count** | **int** | Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN). | [optional] +**upgrade** | **int** | Number of requests that resulted in a WebSocket upgrade. | [optional] [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Results.md b/docs/Model/Results.md index 2100635c..8e513fc2 100644 --- a/docs/Model/Results.md +++ b/docs/Model/Results.md @@ -273,6 +273,10 @@ Name | Type | Description | Notes **ngwaf_requests_timeout_count** | **int** | Count of Edge WAF requests timed outcome. | [optional] **ngwaf_requests_challenged_count** | **int** | Count of Edge WAF requests challenged. | [optional] **api_discovery_requests_count** | **int** | Number of requests processed by the API Discovery engine. | [optional] +**imgopto_compute_requests** | **int** | The number of Image Optimizer requests made from Compute services. | [optional] +**dns_billable_responses_count** | **int** | Number of billable DNS responses (e.g., A, CNAME). | [optional] +**dns_nonbillable_responses_count** | **int** | Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN). | [optional] +**upgrade** | **int** | Number of requests that resulted in a WebSocket upgrade. | [optional] **service_id** | **string** | | [optional] [readonly] **start_time** | **int** | Timestamp for the start of the time period being reported | [optional] diff --git a/docs/Model/Status.md b/docs/Model/Status.md new file mode 100644 index 00000000..176efe5d --- /dev/null +++ b/docs/Model/Status.md @@ -0,0 +1,15 @@ +# # Status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **string** | The scope provided in the status request. | [optional] +**domain** | **string** | The domain provided in the status request. | [optional] +**zone** | **string** | The zone of the domain provided of the status request. | [optional] +**status** | **string** | A space-delimited string of the varying statuses associated with the domain provided. | [optional] +**tags** | **string** | A space-delimited string of the varying tags associated with the domain provided. | [optional] +**offers** | [**\Fastly\Model\Offer[]**](Offer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatusAllOf.md b/docs/Model/StatusAllOf.md new file mode 100644 index 00000000..c7caa0c1 --- /dev/null +++ b/docs/Model/StatusAllOf.md @@ -0,0 +1,15 @@ +# # StatusAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **string** | The scope provided in the status request. | [optional] +**domain** | **string** | The domain provided in the status request. | [optional] +**zone** | **string** | The zone of the domain provided of the status request. | [optional] +**status** | **string** | A space-delimited string of the varying statuses associated with the domain provided. | [optional] +**tags** | **string** | A space-delimited string of the varying tags associated with the domain provided. | [optional] +**offers** | [**\Fastly\Model\Offer[]**](Offer.md) | | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Suggestion.md b/docs/Model/Suggestion.md new file mode 100644 index 00000000..7f19c9af --- /dev/null +++ b/docs/Model/Suggestion.md @@ -0,0 +1,13 @@ +# # Suggestion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | The suggested domain, consisting of a subdomain and zone. | [optional] +**subdomain** | **string** | The subdomain of the suggested domain. | [optional] +**zone** | **string** | The zone of the suggested domain. | [optional] +**path** | **string** | If present, the path is to be appended to the domain to complete the suggestion. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SuggestionAllOf.md b/docs/Model/SuggestionAllOf.md new file mode 100644 index 00000000..a1948860 --- /dev/null +++ b/docs/Model/SuggestionAllOf.md @@ -0,0 +1,13 @@ +# # SuggestionAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **string** | The suggested domain, consisting of a subdomain and zone. | [optional] +**subdomain** | **string** | The subdomain of the suggested domain. | [optional] +**zone** | **string** | The zone of the suggested domain. | [optional] +**path** | **string** | If present, the path is to be appended to the domain to complete the suggestion. | [optional] + + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/DomainResearchApi.php b/lib/Api/DomainResearchApi.php new file mode 100644 index 00000000..db78911c --- /dev/null +++ b/lib/Api/DomainResearchApi.php @@ -0,0 +1,865 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation domainStatus + * + * Domain status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain domain (required) + * @param string $scope scope (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\Status + */ + public function domainStatus($options) + { + list($response) = $this->domainStatusWithHttpInfo($options); + return $response; + } + + /** + * Operation domainStatusWithHttpInfo + * + * Domain status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain (required) + * @param string $scope (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\Status, HTTP status code, HTTP response headers (array of strings) + */ + public function domainStatusWithHttpInfo($options) + { + $request = $this->domainStatusRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\Status' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\Status', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\Status'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\Status', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation domainStatusAsync + * + * Domain status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain (required) + * @param string $scope (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function domainStatusAsync($options) + { + return $this->domainStatusAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation domainStatusAsyncWithHttpInfo + * + * Domain status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain (required) + * @param string $scope (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function domainStatusAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\Status'; + $request = $this->domainStatusRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'domainStatus' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $domain (required) + * @param string $scope (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function domainStatusRequest($options) + { + // unbox the parameters from the associative array + $domain = array_key_exists('domain', $options) ? $options['domain'] : null; + $scope = array_key_exists('scope', $options) ? $options['scope'] : null; + + // verify the required parameter 'domain' is set + if ($domain === null || (is_array($domain) && count($domain) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domain when calling domainStatus' + ); + } + + $resourcePath = '/domain-management/v1/tools/status'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($domain !== null) { + if('form' === 'form' && is_array($domain)) { + foreach($domain as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['domain'] = ObjectSerializer::toString($domain); + } + } + // query params + if ($scope !== null) { + if('form' === 'form' && is_array($scope)) { + foreach($scope as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['scope'] = ObjectSerializer::toString($scope); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation suggestDomains + * + * Suggest domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $query query (required) + * @param string $defaults defaults (optional) + * @param string $keywords keywords (optional) + * @param string $location location (optional) + * @param string $vendor vendor (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\InlineResponse2006 + */ + public function suggestDomains($options) + { + list($response) = $this->suggestDomainsWithHttpInfo($options); + return $response; + } + + /** + * Operation suggestDomainsWithHttpInfo + * + * Suggest domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $query (required) + * @param string $defaults (optional) + * @param string $keywords (optional) + * @param string $location (optional) + * @param string $vendor (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + */ + public function suggestDomainsWithHttpInfo($options) + { + $request = $this->suggestDomainsRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\InlineResponse2006' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2006', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\InlineResponse2006'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\InlineResponse2006', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation suggestDomainsAsync + * + * Suggest domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $query (required) + * @param string $defaults (optional) + * @param string $keywords (optional) + * @param string $location (optional) + * @param string $vendor (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function suggestDomainsAsync($options) + { + return $this->suggestDomainsAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation suggestDomainsAsyncWithHttpInfo + * + * Suggest domains + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $query (required) + * @param string $defaults (optional) + * @param string $keywords (optional) + * @param string $location (optional) + * @param string $vendor (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function suggestDomainsAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\InlineResponse2006'; + $request = $this->suggestDomainsRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'suggestDomains' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $query (required) + * @param string $defaults (optional) + * @param string $keywords (optional) + * @param string $location (optional) + * @param string $vendor (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function suggestDomainsRequest($options) + { + // unbox the parameters from the associative array + $query = array_key_exists('query', $options) ? $options['query'] : null; + $defaults = array_key_exists('defaults', $options) ? $options['defaults'] : null; + $keywords = array_key_exists('keywords', $options) ? $options['keywords'] : null; + $location = array_key_exists('location', $options) ? $options['location'] : null; + $vendor = array_key_exists('vendor', $options) ? $options['vendor'] : null; + + // verify the required parameter 'query' is set + if ($query === null || (is_array($query) && count($query) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $query when calling suggestDomains' + ); + } + + $resourcePath = '/domain-management/v1/tools/suggest'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($query !== null) { + if('form' === 'form' && is_array($query)) { + foreach($query as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['query'] = ObjectSerializer::toString($query); + } + } + // query params + if ($defaults !== null) { + if('form' === 'form' && is_array($defaults)) { + foreach($defaults as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['defaults'] = ObjectSerializer::toString($defaults); + } + } + // query params + if ($keywords !== null) { + if('form' === 'form' && is_array($keywords)) { + foreach($keywords as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['keywords'] = ObjectSerializer::toString($keywords); + } + } + // query params + if ($location !== null) { + if('form' === 'form' && is_array($location)) { + foreach($location as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['location'] = ObjectSerializer::toString($location); + } + } + // query params + if ($vendor !== null) { + if('form' === 'form' && is_array($vendor)) { + foreach($vendor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['vendor'] = ObjectSerializer::toString($vendor); + } + } + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/KvStoreApi.php b/lib/Api/KvStoreApi.php index 8b50e62d..81073428 100644 --- a/lib/Api/KvStoreApi.php +++ b/lib/Api/KvStoreApi.php @@ -120,7 +120,7 @@ public function getConfig() * URL: https://api.fastly.com * * @param string $location location (optional) - * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create kv_store_request_create (optional) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update kv_store_request_create_or_update (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -143,7 +143,7 @@ public function kvStoreCreate($options) * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -254,7 +254,7 @@ public function kvStoreCreateWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -280,7 +280,7 @@ function ($response) { * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -332,7 +332,7 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $location (optional) - * @param \Fastly\Model\KvStoreRequestCreate $kv_store_request_create (optional) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -341,7 +341,7 @@ public function kvStoreCreateRequest($options) { // unbox the parameters from the associative array $location = array_key_exists('location', $options) ? $options['location'] : null; - $kv_store_request_create = array_key_exists('kv_store_request_create', $options) ? $options['kv_store_request_create'] : null; + $kv_store_request_create_or_update = array_key_exists('kv_store_request_create_or_update', $options) ? $options['kv_store_request_create_or_update'] : null; $resourcePath = '/resources/stores/kv'; @@ -378,11 +378,11 @@ public function kvStoreCreateRequest($options) } // for model (json/xml) - if (isset($kv_store_request_create)) { + if (isset($kv_store_request_create_or_update)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($kv_store_request_create)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($kv_store_request_create_or_update)); } else { - $httpBody = $kv_store_request_create; + $httpBody = $kv_store_request_create_or_update; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1055,7 +1055,7 @@ public function kvStoreGetRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2006 + * @return \Fastly\Model\InlineResponse2007 */ public function kvStoreList($options) { @@ -1079,7 +1079,7 @@ public function kvStoreList($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreListWithHttpInfo($options) { @@ -1134,20 +1134,20 @@ public function kvStoreListWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2006' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2007' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2006', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2007', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2006'; + $returnType = '\Fastly\Model\InlineResponse2007'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1165,7 +1165,7 @@ public function kvStoreListWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2006', + '\Fastly\Model\InlineResponse2007', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1221,7 +1221,7 @@ function ($response) { */ public function kvStoreListAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2006'; + $returnType = '\Fastly\Model\InlineResponse2007'; $request = $this->kvStoreListRequest($options); return $this->client @@ -1396,6 +1396,295 @@ public function kvStoreListRequest($options) ); } + /** + * Operation kvStorePut + * + * Update a KV store. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $store_id store_id (required) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update kv_store_request_create_or_update (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function kvStorePut($options) + { + $this->kvStorePutWithHttpInfo($options); + } + + /** + * Operation kvStorePutWithHttpInfo + * + * Update a KV store. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $store_id (required) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function kvStorePutWithHttpInfo($options) + { + $request = $this->kvStorePutRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation kvStorePutAsync + * + * Update a KV store. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $store_id (required) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function kvStorePutAsync($options) + { + return $this->kvStorePutAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation kvStorePutAsyncWithHttpInfo + * + * Update a KV store. + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $store_id (required) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function kvStorePutAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->kvStorePutRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'kvStorePut' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $store_id (required) + * @param \Fastly\Model\KvStoreRequestCreateOrUpdate $kv_store_request_create_or_update (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function kvStorePutRequest($options) + { + // unbox the parameters from the associative array + $store_id = array_key_exists('store_id', $options) ? $options['store_id'] : null; + $kv_store_request_create_or_update = array_key_exists('kv_store_request_create_or_update', $options) ? $options['kv_store_request_create_or_update'] : null; + + // verify the required parameter 'store_id' is set + if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $store_id when calling kvStorePut' + ); + } + + $resourcePath = '/resources/stores/kv/{store_id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($store_id !== null) { + $resourcePath = str_replace( + '{' . 'store_id' . '}', + ObjectSerializer::toPathValue($store_id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($kv_store_request_create_or_update)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($kv_store_request_create_or_update)); + } else { + $httpBody = $kv_store_request_create_or_update; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Create http client option * diff --git a/lib/Api/KvStoreItemApi.php b/lib/Api/KvStoreItemApi.php index ccd015c7..f7841a5a 100644 --- a/lib/Api/KvStoreItemApi.php +++ b/lib/Api/KvStoreItemApi.php @@ -793,7 +793,7 @@ public function kvStoreGetItemRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2007 + * @return \Fastly\Model\InlineResponse2008 */ public function kvStoreListItemKeys($options) { @@ -819,7 +819,7 @@ public function kvStoreListItemKeys($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) */ public function kvStoreListItemKeysWithHttpInfo($options) { @@ -874,20 +874,20 @@ public function kvStoreListItemKeysWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2007' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2008' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2008', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2007'; + $returnType = '\Fastly\Model\InlineResponse2008'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -905,7 +905,7 @@ public function kvStoreListItemKeysWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2007', + '\Fastly\Model\InlineResponse2008', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -965,7 +965,7 @@ function ($response) { */ public function kvStoreListItemKeysAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2007'; + $returnType = '\Fastly\Model\InlineResponse2008'; $request = $this->kvStoreListItemKeysRequest($options); return $this->client diff --git a/lib/Api/MetricsPlatformApi.php b/lib/Api/MetricsPlatformApi.php new file mode 100644 index 00000000..ffd8bfa6 --- /dev/null +++ b/lib/Api/MetricsPlatformApi.php @@ -0,0 +1,617 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getPlatformMetricsServiceHistorical + * + * Get historical time series metrics for a single service + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param string $granularity Duration of sample windows. (required) + * @param string $from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $metric The metric(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $metric_set The metric set(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. (optional) + * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) + * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\PlatformMetricsResponse + */ + public function getPlatformMetricsServiceHistorical($options) + { + list($response) = $this->getPlatformMetricsServiceHistoricalWithHttpInfo($options); + return $response; + } + + /** + * Operation getPlatformMetricsServiceHistoricalWithHttpInfo + * + * Get historical time series metrics for a single service + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param string $granularity Duration of sample windows. (required) + * @param string $from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $metric The metric(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $metric_set The metric set(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. (optional) + * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) + * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\PlatformMetricsResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getPlatformMetricsServiceHistoricalWithHttpInfo($options) + { + $request = $this->getPlatformMetricsServiceHistoricalRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\PlatformMetricsResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\PlatformMetricsResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\PlatformMetricsResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\PlatformMetricsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getPlatformMetricsServiceHistoricalAsync + * + * Get historical time series metrics for a single service + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param string $granularity Duration of sample windows. (required) + * @param string $from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $metric The metric(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $metric_set The metric set(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. (optional) + * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) + * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getPlatformMetricsServiceHistoricalAsync($options) + { + return $this->getPlatformMetricsServiceHistoricalAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getPlatformMetricsServiceHistoricalAsyncWithHttpInfo + * + * Get historical time series metrics for a single service + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param string $granularity Duration of sample windows. (required) + * @param string $from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $metric The metric(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $metric_set The metric set(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. (optional) + * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) + * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getPlatformMetricsServiceHistoricalAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\PlatformMetricsResponse'; + $request = $this->getPlatformMetricsServiceHistoricalRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getPlatformMetricsServiceHistorical' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * @param string $service_id Alphanumeric string identifying the service. (required) + * @param string $granularity Duration of sample windows. (required) + * @param string $from A valid RFC-8339-formatted date and time indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $to A valid RFC-8339-formatted date and time indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `granularity` value. (optional) + * @param string $metric The metric(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $metric_set The metric set(s) to retrieve. Multiple values should be comma-separated. (optional) + * @param string $group_by Field to group_by in the query. For example, `group_by=region` will return entries for grouped by timestamp and region. (optional) + * @param string $region Limit query to one or more specific geographic regions. Values should be comma-separated. (optional) + * @param string $datacenter Limit query to one or more specific POPs. Values should be comma-separated. (optional) + * @param string $cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. (optional) + * @param string $limit Number of results per page. The maximum is 10000. (optional, default to '1000') + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getPlatformMetricsServiceHistoricalRequest($options) + { + // unbox the parameters from the associative array + $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $granularity = array_key_exists('granularity', $options) ? $options['granularity'] : null; + $from = array_key_exists('from', $options) ? $options['from'] : null; + $to = array_key_exists('to', $options) ? $options['to'] : null; + $metric = array_key_exists('metric', $options) ? $options['metric'] : null; + $metric_set = array_key_exists('metric_set', $options) ? $options['metric_set'] : null; + $group_by = array_key_exists('group_by', $options) ? $options['group_by'] : null; + $region = array_key_exists('region', $options) ? $options['region'] : null; + $datacenter = array_key_exists('datacenter', $options) ? $options['datacenter'] : null; + $cursor = array_key_exists('cursor', $options) ? $options['cursor'] : null; + $limit = array_key_exists('limit', $options) ? $options['limit'] : '1000'; + + // verify the required parameter 'service_id' is set + if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $service_id when calling getPlatformMetricsServiceHistorical' + ); + } + // verify the required parameter 'granularity' is set + if ($granularity === null || (is_array($granularity) && count($granularity) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $granularity when calling getPlatformMetricsServiceHistorical' + ); + } + + $resourcePath = '/metrics/platform/services/{service_id}/{granularity}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($from !== null) { + if('form' === 'form' && is_array($from)) { + foreach($from as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['from'] = ObjectSerializer::toString($from); + } + } + // query params + if ($to !== null) { + if('form' === 'form' && is_array($to)) { + foreach($to as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['to'] = ObjectSerializer::toString($to); + } + } + // query params + if ($metric !== null) { + if('form' === 'form' && is_array($metric)) { + foreach($metric as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['metric'] = ObjectSerializer::toString($metric); + } + } + // query params + if ($metric_set !== null) { + if('form' === 'form' && is_array($metric_set)) { + foreach($metric_set as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['metric_set'] = ObjectSerializer::toString($metric_set); + } + } + // query params + if ($group_by !== null) { + if('form' === 'form' && is_array($group_by)) { + foreach($group_by as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['group_by'] = ObjectSerializer::toString($group_by); + } + } + // query params + if (is_array($region)) { + $region = ObjectSerializer::serializeCollection($region, 'form', true); + } + if ($region !== null) { + $queryParams['region'] = ObjectSerializer::toString($region); + } + // query params + if (is_array($datacenter)) { + $datacenter = ObjectSerializer::serializeCollection($datacenter, 'form', true); + } + if ($datacenter !== null) { + $queryParams['datacenter'] = ObjectSerializer::toString($datacenter); + } + // query params + if ($cursor !== null) { + if('form' === 'form' && is_array($cursor)) { + foreach($cursor as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['cursor'] = ObjectSerializer::toString($cursor); + } + } + // query params + if ($limit !== null) { + if('form' === 'form' && is_array($limit)) { + foreach($limit as $key => $value) { + $queryParams[$key] = ObjectSerializer::toString($value); + } + } + else { + $queryParams['limit'] = ObjectSerializer::toString($limit); + } + } + + + // path params + if ($service_id !== null) { + $resourcePath = str_replace( + '{' . 'service_id' . '}', + ObjectSerializer::toPathValue($service_id), + $resourcePath + ); + } + // path params + if ($granularity !== null) { + $resourcePath = str_replace( + '{' . 'granularity' . '}', + ObjectSerializer::toPathValue($granularity), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/ProductDdosProtectionApi.php b/lib/Api/ProductDdosProtectionApi.php index dcf7610d..342f2610 100644 --- a/lib/Api/ProductDdosProtectionApi.php +++ b/lib/Api/ProductDdosProtectionApi.php @@ -397,6 +397,7 @@ public function disableProductDdosProtectionRequest($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestEnableMode $ddos_protection_request_enable_mode ddos_protection_request_enable_mode (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -419,6 +420,7 @@ public function enableProductDdosProtection($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestEnableMode $ddos_protection_request_enable_mode (optional) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -529,6 +531,7 @@ public function enableProductDdosProtectionWithHttpInfo($options) * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestEnableMode $ddos_protection_request_enable_mode (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -554,6 +557,7 @@ function ($response) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestEnableMode $ddos_protection_request_enable_mode (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -605,6 +609,7 @@ function ($exception) { * URL: https://api.fastly.com * * @param string $service_id Alphanumeric string identifying the service. (required) + * @param \Fastly\Model\DdosProtectionRequestEnableMode $ddos_protection_request_enable_mode (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -613,6 +618,7 @@ public function enableProductDdosProtectionRequest($options) { // unbox the parameters from the associative array $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null; + $ddos_protection_request_enable_mode = array_key_exists('ddos_protection_request_enable_mode', $options) ? $options['ddos_protection_request_enable_mode'] : null; // verify the required parameter 'service_id' is set if ($service_id === null || (is_array($service_id) && count($service_id) === 0)) { @@ -647,12 +653,18 @@ public function enableProductDdosProtectionRequest($options) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } // for model (json/xml) - if (count($formParams) > 0) { + if (isset($ddos_protection_request_enable_mode)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($ddos_protection_request_enable_mode)); + } else { + $httpBody = $ddos_protection_request_enable_mode; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { diff --git a/lib/Api/ProductDomainResearchApi.php b/lib/Api/ProductDomainResearchApi.php new file mode 100644 index 00000000..3b3e2e63 --- /dev/null +++ b/lib/Api/ProductDomainResearchApi.php @@ -0,0 +1,991 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation disableProductDomainResearch + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function disableProductDomainResearch($options) + { + $this->disableProductDomainResearchWithHttpInfo($options); + } + + /** + * Operation disableProductDomainResearchWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function disableProductDomainResearchWithHttpInfo($options) + { + $request = $this->disableProductDomainResearchRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation disableProductDomainResearchAsync + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductDomainResearchAsync($options) + { + return $this->disableProductDomainResearchAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation disableProductDomainResearchAsyncWithHttpInfo + * + * Disable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function disableProductDomainResearchAsyncWithHttpInfo($options) + { + $returnType = ''; + $request = $this->disableProductDomainResearchRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'disableProductDomainResearch' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function disableProductDomainResearchRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/domain_research'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation enableDomainResearch + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DomainResearchResponseBodyEnable + */ + public function enableDomainResearch($options) + { + list($response) = $this->enableDomainResearchWithHttpInfo($options); + return $response; + } + + /** + * Operation enableDomainResearchWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DomainResearchResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function enableDomainResearchWithHttpInfo($options) + { + $request = $this->enableDomainResearchRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('PUT' != 'GET' && 'PUT' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DomainResearchResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DomainResearchResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DomainResearchResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DomainResearchResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation enableDomainResearchAsync + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableDomainResearchAsync($options) + { + return $this->enableDomainResearchAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation enableDomainResearchAsyncWithHttpInfo + * + * Enable product + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function enableDomainResearchAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DomainResearchResponseBodyEnable'; + $request = $this->enableDomainResearchRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'enableDomainResearch' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function enableDomainResearchRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/domain_research'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getDomainResearch + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Fastly\Model\DomainResearchResponseBodyEnable + */ + public function getDomainResearch($options) + { + list($response) = $this->getDomainResearchWithHttpInfo($options); + return $response; + } + + /** + * Operation getDomainResearchWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains Fastly API host(s). Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \Fastly\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Fastly\Model\DomainResearchResponseBodyEnable, HTTP status code, HTTP response headers (array of strings) + */ + public function getDomainResearchWithHttpInfo($options) + { + $request = $this->getDomainResearchRequest($options); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + if ('GET' != 'GET' && 'GET' != 'HEAD') { + $header = $response->getHeader('Fastly-RateLimit-Remaining'); + if (count($header) > 0) { + $this->config->setRateLimitRemaining($header[0]); + } + + $header = $response->getHeader('Fastly-RateLimit-Reset'); + if (count($header) > 0) { + $this->config->setRateLimitReset($header[0]); + } + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Fastly\Model\DomainResearchResponseBodyEnable' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Fastly\Model\DomainResearchResponseBodyEnable', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Fastly\Model\DomainResearchResponseBodyEnable'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Fastly\Model\DomainResearchResponseBodyEnable', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getDomainResearchAsync + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDomainResearchAsync($options) + { + return $this->getDomainResearchAsyncWithHttpInfo($options) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getDomainResearchAsyncWithHttpInfo + * + * Get product enablement status + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getDomainResearchAsyncWithHttpInfo($options) + { + $returnType = '\Fastly\Model\DomainResearchResponseBodyEnable'; + $request = $this->getDomainResearchRequest($options); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getDomainResearch' + * + * Note: the input parameter is an associative array with the keys listed as the parameter name below + * + * This operation contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host. + * URL: https://api.fastly.com + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getDomainResearchRequest($options) + { + // unbox the parameters from the associative array + + + $resourcePath = '/enabled-products/v1/domain_research'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API token authentication + $apiToken = $this->config->getApiTokenWithPrefix('Fastly-Key'); + if ($apiToken !== null) { + $headers['Fastly-Key'] = $apiToken; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHosts = ["https://api.fastly.com"]; + if ($this->hostIndex < 0 || $this->hostIndex >= sizeof($operationHosts)) { + throw new \InvalidArgumentException("Invalid index {$this->hostIndex} when selecting the host. Must be less than ".sizeof($operationHosts)); + } + $operationHost = $operationHosts[$this->hostIndex]; + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/lib/Api/SecretStoreApi.php b/lib/Api/SecretStoreApi.php index c1a36f19..6895d236 100644 --- a/lib/Api/SecretStoreApi.php +++ b/lib/Api/SecretStoreApi.php @@ -1340,7 +1340,7 @@ public function getSecretStoreRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2008 + * @return \Fastly\Model\InlineResponse2009 */ public function getSecretStores($options) { @@ -1364,7 +1364,7 @@ public function getSecretStores($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ public function getSecretStoresWithHttpInfo($options) { @@ -1419,20 +1419,20 @@ public function getSecretStoresWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2008' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse2009' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2008', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2008'; + $returnType = '\Fastly\Model\InlineResponse2009'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1450,7 +1450,7 @@ public function getSecretStoresWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2008', + '\Fastly\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1506,7 +1506,7 @@ function ($response) { */ public function getSecretStoresAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2008'; + $returnType = '\Fastly\Model\InlineResponse2009'; $request = $this->getSecretStoresRequest($options); return $this->client diff --git a/lib/Api/SecretStoreItemApi.php b/lib/Api/SecretStoreItemApi.php index fffcd77b..58ae1830 100644 --- a/lib/Api/SecretStoreItemApi.php +++ b/lib/Api/SecretStoreItemApi.php @@ -1098,7 +1098,7 @@ public function getSecretRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse2009 + * @return \Fastly\Model\InlineResponse20010 */ public function getSecrets($options) { @@ -1122,7 +1122,7 @@ public function getSecrets($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse20010, HTTP status code, HTTP response headers (array of strings) */ public function getSecretsWithHttpInfo($options) { @@ -1177,20 +1177,20 @@ public function getSecretsWithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse2009' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse20010' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse2009', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse20010', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse2009'; + $returnType = '\Fastly\Model\InlineResponse20010'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1208,7 +1208,7 @@ public function getSecretsWithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse2009', + '\Fastly\Model\InlineResponse20010', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1264,7 +1264,7 @@ function ($response) { */ public function getSecretsAsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse2009'; + $returnType = '\Fastly\Model\InlineResponse20010'; $request = $this->getSecretsRequest($options); return $this->client diff --git a/lib/Api/ServiceAuthorizationsApi.php b/lib/Api/ServiceAuthorizationsApi.php index 750f6a02..30619936 100644 --- a/lib/Api/ServiceAuthorizationsApi.php +++ b/lib/Api/ServiceAuthorizationsApi.php @@ -714,7 +714,7 @@ public function deleteServiceAuthorizationRequest($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Fastly\Model\InlineResponse20010 + * @return \Fastly\Model\InlineResponse20011 */ public function deleteServiceAuthorization2($options) { @@ -736,7 +736,7 @@ public function deleteServiceAuthorization2($options) * * @throws \Fastly\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Fastly\Model\InlineResponse20010, HTTP status code, HTTP response headers (array of strings) + * @return array of \Fastly\Model\InlineResponse20011, HTTP status code, HTTP response headers (array of strings) */ public function deleteServiceAuthorization2WithHttpInfo($options) { @@ -791,20 +791,20 @@ public function deleteServiceAuthorization2WithHttpInfo($options) switch($statusCode) { case 200: - if ('\Fastly\Model\InlineResponse20010' === '\SplFileObject') { + if ('\Fastly\Model\InlineResponse20011' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse20010', []), + ObjectSerializer::deserialize($content, '\Fastly\Model\InlineResponse20011', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Fastly\Model\InlineResponse20010'; + $returnType = '\Fastly\Model\InlineResponse20011'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -822,7 +822,7 @@ public function deleteServiceAuthorization2WithHttpInfo($options) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Fastly\Model\InlineResponse20010', + '\Fastly\Model\InlineResponse20011', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -874,7 +874,7 @@ function ($response) { */ public function deleteServiceAuthorization2AsyncWithHttpInfo($options) { - $returnType = '\Fastly\Model\InlineResponse20010'; + $returnType = '\Fastly\Model\InlineResponse20011'; $request = $this->deleteServiceAuthorization2Request($options); return $this->client diff --git a/lib/Configuration.php b/lib/Configuration.php index fcd80485..1335f40b 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -89,7 +89,7 @@ class Configuration * * @var string */ - protected $userAgent = 'fastly-php/12.0.0'; + protected $userAgent = 'fastly-php/12.1.0'; /** * Debug switch (default set to false) @@ -460,7 +460,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the schema document: 1.0.0' . PHP_EOL; - $report .= ' SDK Package Version: 12.0.0' . PHP_EOL; + $report .= ' SDK Package Version: 12.1.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Model/DdosProtectionEvent.php b/lib/Model/DdosProtectionEvent.php index 75e9f427..0251fe55 100644 --- a/lib/Model/DdosProtectionEvent.php +++ b/lib/Model/DdosProtectionEvent.php @@ -57,6 +57,8 @@ class DdosProtectionEvent implements ModelInterface, ArrayAccess, \JsonSerializa 'updated_at' => '\DateTime', 'id' => 'string', 'name' => 'string', + 'requests_allowed' => 'int', + 'requests_detected' => 'int', 'customer_id' => 'string', 'service_id' => 'string', 'started_at' => '\DateTime', @@ -75,6 +77,8 @@ class DdosProtectionEvent implements ModelInterface, ArrayAccess, \JsonSerializa 'updated_at' => 'date-time', 'id' => null, 'name' => null, + 'requests_allowed' => null, + 'requests_detected' => null, 'customer_id' => null, 'service_id' => null, 'started_at' => 'date-time', @@ -112,6 +116,8 @@ public static function fastlyFormats() 'updated_at' => 'updated_at', 'id' => 'id', 'name' => 'name', + 'requests_allowed' => 'requests_allowed', + 'requests_detected' => 'requests_detected', 'customer_id' => 'customer_id', 'service_id' => 'service_id', 'started_at' => 'started_at', @@ -128,6 +134,8 @@ public static function fastlyFormats() 'updated_at' => 'setUpdatedAt', 'id' => 'setId', 'name' => 'setName', + 'requests_allowed' => 'setRequestsAllowed', + 'requests_detected' => 'setRequestsDetected', 'customer_id' => 'setCustomerId', 'service_id' => 'setServiceId', 'started_at' => 'setStartedAt', @@ -144,6 +152,8 @@ public static function fastlyFormats() 'updated_at' => 'getUpdatedAt', 'id' => 'getId', 'name' => 'getName', + 'requests_allowed' => 'getRequestsAllowed', + 'requests_detected' => 'getRequestsDetected', 'customer_id' => 'getCustomerId', 'service_id' => 'getServiceId', 'started_at' => 'getStartedAt', @@ -211,6 +221,8 @@ public function __construct(array $data = null) $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['requests_allowed'] = $data['requests_allowed'] ?? null; + $this->container['requests_detected'] = $data['requests_detected'] ?? null; $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; @@ -337,6 +349,54 @@ public function setName($name) return $this; } + /** + * Gets requests_allowed + * + * @return int|null + */ + public function getRequestsAllowed() + { + return $this->container['requests_allowed']; + } + + /** + * Sets requests_allowed + * + * @param int|null $requests_allowed Number of requests classified as non-attack traffic for an event. + * + * @return self + */ + public function setRequestsAllowed($requests_allowed) + { + $this->container['requests_allowed'] = $requests_allowed; + + return $this; + } + + /** + * Gets requests_detected + * + * @return int|null + */ + public function getRequestsDetected() + { + return $this->container['requests_detected']; + } + + /** + * Sets requests_detected + * + * @param int|null $requests_detected Number of requests classified as DDoS attack traffic for an event. + * + * @return self + */ + public function setRequestsDetected($requests_detected) + { + $this->container['requests_detected'] = $requests_detected; + + return $this; + } + /** * Gets customer_id * diff --git a/lib/Model/DdosProtectionEventAllOf.php b/lib/Model/DdosProtectionEventAllOf.php index 6f66f203..f90376f8 100644 --- a/lib/Model/DdosProtectionEventAllOf.php +++ b/lib/Model/DdosProtectionEventAllOf.php @@ -55,6 +55,8 @@ class DdosProtectionEventAllOf implements ModelInterface, ArrayAccess, \JsonSeri protected static $fastlyTypes = [ 'id' => 'string', 'name' => 'string', + 'requests_allowed' => 'int', + 'requests_detected' => 'int', 'customer_id' => 'string', 'service_id' => 'string', 'started_at' => '\DateTime', @@ -71,6 +73,8 @@ class DdosProtectionEventAllOf implements ModelInterface, ArrayAccess, \JsonSeri protected static $fastlyFormats = [ 'id' => null, 'name' => null, + 'requests_allowed' => null, + 'requests_detected' => null, 'customer_id' => null, 'service_id' => null, 'started_at' => 'date-time', @@ -106,6 +110,8 @@ public static function fastlyFormats() protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', + 'requests_allowed' => 'requests_allowed', + 'requests_detected' => 'requests_detected', 'customer_id' => 'customer_id', 'service_id' => 'service_id', 'started_at' => 'started_at', @@ -120,6 +126,8 @@ public static function fastlyFormats() protected static $setters = [ 'id' => 'setId', 'name' => 'setName', + 'requests_allowed' => 'setRequestsAllowed', + 'requests_detected' => 'setRequestsDetected', 'customer_id' => 'setCustomerId', 'service_id' => 'setServiceId', 'started_at' => 'setStartedAt', @@ -134,6 +142,8 @@ public static function fastlyFormats() protected static $getters = [ 'id' => 'getId', 'name' => 'getName', + 'requests_allowed' => 'getRequestsAllowed', + 'requests_detected' => 'getRequestsDetected', 'customer_id' => 'getCustomerId', 'service_id' => 'getServiceId', 'started_at' => 'getStartedAt', @@ -199,6 +209,8 @@ public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['requests_allowed'] = $data['requests_allowed'] ?? null; + $this->container['requests_detected'] = $data['requests_detected'] ?? null; $this->container['customer_id'] = $data['customer_id'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; @@ -277,6 +289,54 @@ public function setName($name) return $this; } + /** + * Gets requests_allowed + * + * @return int|null + */ + public function getRequestsAllowed() + { + return $this->container['requests_allowed']; + } + + /** + * Sets requests_allowed + * + * @param int|null $requests_allowed Number of requests classified as non-attack traffic for an event. + * + * @return self + */ + public function setRequestsAllowed($requests_allowed) + { + $this->container['requests_allowed'] = $requests_allowed; + + return $this; + } + + /** + * Gets requests_detected + * + * @return int|null + */ + public function getRequestsDetected() + { + return $this->container['requests_detected']; + } + + /** + * Sets requests_detected + * + * @param int|null $requests_detected Number of requests classified as DDoS attack traffic for an event. + * + * @return self + */ + public function setRequestsDetected($requests_detected) + { + $this->container['requests_detected'] = $requests_detected; + + return $this; + } + /** * Gets customer_id * diff --git a/lib/Model/DdosProtectionRequestEnableMode.php b/lib/Model/DdosProtectionRequestEnableMode.php new file mode 100644 index 00000000..9216bef2 --- /dev/null +++ b/lib/Model/DdosProtectionRequestEnableMode.php @@ -0,0 +1,350 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DdosProtectionRequestEnableMode implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'ddos_protection_request_enable_mode'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'mode' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'mode' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'mode' => 'mode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'mode' => 'setMode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'mode' => 'getMode' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + const MODE_FALSE = 'false'; + const MODE_LOG = 'log'; + const MODE_BLOCK = 'block'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getModeAllowableValues() + { + return [ + self::MODE_FALSE, + self::MODE_LOG, + self::MODE_BLOCK, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['mode'] = $data['mode'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($this->container['mode']) && !in_array($this->container['mode'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'mode', must be one of '%s'", + $this->container['mode'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mode + * + * @return string|null + */ + public function getMode() + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param string|null $mode Operation mode + * + * @return self + */ + public function setMode($mode) + { + $allowedValues = $this->getModeAllowableValues(); + if (!is_null($mode) && !in_array($mode, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'mode', must be one of '%s'", + $mode, + implode("', '", $allowedValues) + ) + ); + } + $this->container['mode'] = $mode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainResearchResponseBodyEnable.php b/lib/Model/DomainResearchResponseBodyEnable.php new file mode 100644 index 00000000..fba2b131 --- /dev/null +++ b/lib/Model/DomainResearchResponseBodyEnable.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainResearchResponseBodyEnable implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_research_response_body_enable'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DomainResearchResponseProductProduct', + 'customer' => '\Fastly\Model\AiAcceleratorResponseCustomerCustomer', + '_links' => '\Fastly\Model\DomainResearchResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null, + 'customer' => null, + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product', + 'customer' => 'customer', + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct', + 'customer' => 'setCustomer', + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct', + 'customer' => 'getCustomer', + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + $this->container['customer'] = $data['customer'] ?? null; + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DomainResearchResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DomainResearchResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets customer + * + * @return \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + + /** + * Gets _links + * + * @return \Fastly\Model\DomainResearchResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DomainResearchResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainResearchResponseCustomer.php b/lib/Model/DomainResearchResponseCustomer.php new file mode 100644 index 00000000..956170e9 --- /dev/null +++ b/lib/Model/DomainResearchResponseCustomer.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainResearchResponseCustomer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_research_response_customer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'customer' => '\Fastly\Model\AiAcceleratorResponseCustomerCustomer' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'customer' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customer' => 'customer' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customer' => 'setCustomer' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customer' => 'getCustomer' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customer'] = $data['customer'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customer + * + * @return \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null + */ + public function getCustomer() + { + return $this->container['customer']; + } + + /** + * Sets customer + * + * @param \Fastly\Model\AiAcceleratorResponseCustomerCustomer|null $customer customer + * + * @return self + */ + public function setCustomer($customer) + { + $this->container['customer'] = $customer; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainResearchResponseLinks.php b/lib/Model/DomainResearchResponseLinks.php new file mode 100644 index 00000000..77433dfd --- /dev/null +++ b/lib/Model/DomainResearchResponseLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainResearchResponseLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_research_response_links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + '_links' => '\Fastly\Model\DomainResearchResponseLinksLinks' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + '_links' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['_links'] = $data['_links'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \Fastly\Model\DomainResearchResponseLinksLinks|null + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \Fastly\Model\DomainResearchResponseLinksLinks|null $_links _links + * + * @return self + */ + public function setLinks($_links) + { + $this->container['_links'] = $_links; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainResearchResponseLinksLinks.php b/lib/Model/DomainResearchResponseLinksLinks.php new file mode 100644 index 00000000..2f647593 --- /dev/null +++ b/lib/Model/DomainResearchResponseLinksLinks.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainResearchResponseLinksLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_research_response_links__links'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'self' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'self' => 'uri' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['self'] = $data['self'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets self + * + * @return string|null + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param string|null $self Location of resource + * + * @return self + */ + public function setSelf($self) + { + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainResearchResponseProduct.php b/lib/Model/DomainResearchResponseProduct.php new file mode 100644 index 00000000..21e4c02d --- /dev/null +++ b/lib/Model/DomainResearchResponseProduct.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainResearchResponseProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_research_response_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'product' => '\Fastly\Model\DomainResearchResponseProductProduct' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'product' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'product' => 'product' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'product' => 'setProduct' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'product' => 'getProduct' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['product'] = $data['product'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets product + * + * @return \Fastly\Model\DomainResearchResponseProductProduct|null + */ + public function getProduct() + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param \Fastly\Model\DomainResearchResponseProductProduct|null $product product + * + * @return self + */ + public function setProduct($product) + { + $this->container['product'] = $product; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DomainResearchResponseProductProduct.php b/lib/Model/DomainResearchResponseProductProduct.php new file mode 100644 index 00000000..c2b03b2b --- /dev/null +++ b/lib/Model/DomainResearchResponseProductProduct.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class DomainResearchResponseProductProduct implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'domain_research_response_product_product'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'id' => 'string', + 'object' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'id' => null, + 'object' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'object' => 'object' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'object' => 'setObject' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'object' => 'getObject' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data['id'] ?? null; + $this->container['object'] = $data['object'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Product identifier + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets object + * + * @return string|null + */ + public function getObject() + { + return $this->container['object']; + } + + /** + * Sets object + * + * @param string|null $object Name of the object + * + * @return self + */ + public function setObject($object) + { + $this->container['object'] = $object; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/IamV1RoleResponse.php b/lib/Model/IamV1RoleResponse.php index 1379c6bc..e707359b 100644 --- a/lib/Model/IamV1RoleResponse.php +++ b/lib/Model/IamV1RoleResponse.php @@ -56,6 +56,7 @@ class IamV1RoleResponse implements ModelInterface, ArrayAccess, \JsonSerializabl protected static $fastlyTypes = [ 'id' => 'string', 'name' => 'string', + 'display_name' => 'string', 'description' => 'string', 'permissions' => 'string[]' ]; @@ -70,6 +71,7 @@ class IamV1RoleResponse implements ModelInterface, ArrayAccess, \JsonSerializabl protected static $fastlyFormats = [ 'id' => null, 'name' => null, + 'display_name' => null, 'description' => null, 'permissions' => null ]; @@ -103,6 +105,7 @@ public static function fastlyFormats() protected static $attributeMap = [ 'id' => 'id', 'name' => 'name', + 'display_name' => 'display_name', 'description' => 'description', 'permissions' => 'permissions' ]; @@ -115,6 +118,7 @@ public static function fastlyFormats() protected static $setters = [ 'id' => 'setId', 'name' => 'setName', + 'display_name' => 'setDisplayName', 'description' => 'setDescription', 'permissions' => 'setPermissions' ]; @@ -127,6 +131,7 @@ public static function fastlyFormats() protected static $getters = [ 'id' => 'getId', 'name' => 'getName', + 'display_name' => 'getDisplayName', 'description' => 'getDescription', 'permissions' => 'getPermissions' ]; @@ -190,6 +195,7 @@ public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['display_name'] = $data['display_name'] ?? null; $this->container['description'] = $data['description'] ?? null; $this->container['permissions'] = $data['permissions'] ?? null; } @@ -266,6 +272,30 @@ public function setName($name) return $this; } + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName() + { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name display_name + * + * @return self + */ + public function setDisplayName($display_name) + { + $this->container['display_name'] = $display_name; + + return $this; + } + /** * Gets description * diff --git a/lib/Model/InlineResponse20010.php b/lib/Model/InlineResponse20010.php index 8c269112..b5c83750 100644 --- a/lib/Model/InlineResponse20010.php +++ b/lib/Model/InlineResponse20010.php @@ -53,7 +53,8 @@ class InlineResponse20010 implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\ServiceAuthorizationResponseData[]' + 'data' => '\Fastly\Model\SecretResponse[]', + 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; /** @@ -64,7 +65,8 @@ class InlineResponse20010 implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null + 'data' => null, + 'meta' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data' + 'data' => 'data', + 'meta' => 'meta' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData' + 'data' => 'setData', + 'meta' => 'setMeta' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData' + 'data' => 'getData', + 'meta' => 'getMeta' ]; /** @@ -173,6 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['data'] = $data['data'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; } /** @@ -202,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\ServiceAuthorizationResponseData[]|null + * @return \Fastly\Model\SecretResponse[]|null */ public function getData() { @@ -212,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\ServiceAuthorizationResponseData[]|null $data data + * @param \Fastly\Model\SecretResponse[]|null $data data * * @return self */ @@ -222,6 +228,30 @@ public function setData($data) return $this; } + + /** + * Gets meta + * + * @return \Fastly\Model\PaginationCursorMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\PaginationCursorMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/InlineResponse20011.php b/lib/Model/InlineResponse20011.php new file mode 100644 index 00000000..d3de14b0 --- /dev/null +++ b/lib/Model/InlineResponse20011.php @@ -0,0 +1,314 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse20011 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'inline_response_200_11'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'data' => '\Fastly\Model\ServiceAuthorizationResponseData[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \Fastly\Model\ServiceAuthorizationResponseData[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\ServiceAuthorizationResponseData[]|null $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/InlineResponse2006.php b/lib/Model/InlineResponse2006.php index 3462cf42..f567fa63 100644 --- a/lib/Model/InlineResponse2006.php +++ b/lib/Model/InlineResponse2006.php @@ -53,8 +53,7 @@ class InlineResponse2006 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\KvStoreDetails[]', - 'meta' => '\Fastly\Model\PaginationCursorMeta' + 'results' => '\Fastly\Model\Suggestion[]' ]; /** @@ -65,8 +64,7 @@ class InlineResponse2006 implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'data' => null, - 'meta' => null + 'results' => null ]; /** @@ -96,8 +94,7 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'data' => 'data', - 'meta' => 'meta' + 'results' => 'results' ]; /** @@ -106,8 +103,7 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'data' => 'setData', - 'meta' => 'setMeta' + 'results' => 'setResults' ]; /** @@ -116,8 +112,7 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'data' => 'getData', - 'meta' => 'getMeta' + 'results' => 'getResults' ]; /** @@ -177,8 +172,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['data'] = $data['data'] ?? null; - $this->container['meta'] = $data['meta'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -206,49 +200,25 @@ public function valid() /** - * Gets data + * Gets results * - * @return \Fastly\Model\KvStoreDetails[]|null + * @return \Fastly\Model\Suggestion[]|null */ - public function getData() + public function getResults() { - return $this->container['data']; + return $this->container['results']; } /** - * Sets data + * Sets results * - * @param \Fastly\Model\KvStoreDetails[]|null $data data + * @param \Fastly\Model\Suggestion[]|null $results results * * @return self */ - public function setData($data) + public function setResults($results) { - $this->container['data'] = $data; - - return $this; - } - - /** - * Gets meta - * - * @return \Fastly\Model\PaginationCursorMeta|null - */ - public function getMeta() - { - return $this->container['meta']; - } - - /** - * Sets meta - * - * @param \Fastly\Model\PaginationCursorMeta|null $meta meta - * - * @return self - */ - public function setMeta($meta) - { - $this->container['meta'] = $meta; + $this->container['results'] = $results; return $this; } diff --git a/lib/Model/InlineResponse2007.php b/lib/Model/InlineResponse2007.php index 35687257..af12255a 100644 --- a/lib/Model/InlineResponse2007.php +++ b/lib/Model/InlineResponse2007.php @@ -53,7 +53,7 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => 'string[]', + 'data' => '\Fastly\Model\KvStoreDetails[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return string[]|null + * @return \Fastly\Model\KvStoreDetails[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param string[]|null $data data + * @param \Fastly\Model\KvStoreDetails[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2008.php b/lib/Model/InlineResponse2008.php index 8b65e408..5c9a74f4 100644 --- a/lib/Model/InlineResponse2008.php +++ b/lib/Model/InlineResponse2008.php @@ -53,7 +53,7 @@ class InlineResponse2008 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SecretStoreResponse[]', + 'data' => 'string[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\SecretStoreResponse[]|null + * @return string[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\SecretStoreResponse[]|null $data data + * @param string[]|null $data data * * @return self */ diff --git a/lib/Model/InlineResponse2009.php b/lib/Model/InlineResponse2009.php index 0bf04e90..3c139392 100644 --- a/lib/Model/InlineResponse2009.php +++ b/lib/Model/InlineResponse2009.php @@ -53,7 +53,7 @@ class InlineResponse2009 implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $fastlyTypes = [ - 'data' => '\Fastly\Model\SecretResponse[]', + 'data' => '\Fastly\Model\SecretStoreResponse[]', 'meta' => '\Fastly\Model\PaginationCursorMeta' ]; @@ -208,7 +208,7 @@ public function valid() /** * Gets data * - * @return \Fastly\Model\SecretResponse[]|null + * @return \Fastly\Model\SecretStoreResponse[]|null */ public function getData() { @@ -218,7 +218,7 @@ public function getData() /** * Sets data * - * @param \Fastly\Model\SecretResponse[]|null $data data + * @param \Fastly\Model\SecretStoreResponse[]|null $data data * * @return self */ diff --git a/lib/Model/KvStoreDetails.php b/lib/Model/KvStoreDetails.php index cf7c34cc..950c7028 100644 --- a/lib/Model/KvStoreDetails.php +++ b/lib/Model/KvStoreDetails.php @@ -54,7 +54,9 @@ class KvStoreDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyTypes = [ 'id' => 'string', - 'name' => 'string' + 'name' => 'string', + 'created_at' => 'string', + 'updated_at' => 'string' ]; /** @@ -66,7 +68,9 @@ class KvStoreDetails implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $fastlyFormats = [ 'id' => null, - 'name' => null + 'name' => null, + 'created_at' => null, + 'updated_at' => null ]; /** @@ -97,7 +101,9 @@ public static function fastlyFormats() */ protected static $attributeMap = [ 'id' => 'id', - 'name' => 'name' + 'name' => 'name', + 'created_at' => 'created_at', + 'updated_at' => 'updated_at' ]; /** @@ -107,7 +113,9 @@ public static function fastlyFormats() */ protected static $setters = [ 'id' => 'setId', - 'name' => 'setName' + 'name' => 'setName', + 'created_at' => 'setCreatedAt', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -117,7 +125,9 @@ public static function fastlyFormats() */ protected static $getters = [ 'id' => 'getId', - 'name' => 'getName' + 'name' => 'getName', + 'created_at' => 'getCreatedAt', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -179,6 +189,8 @@ public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['created_at'] = $data['created_at'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -252,6 +264,54 @@ public function setName($name) return $this; } + + /** + * Gets created_at + * + * @return string|null + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param string|null $created_at Timestamp at which the store was created. + * + * @return self + */ + public function setCreatedAt($created_at) + { + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets updated_at + * + * @return string|null + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param string|null $updated_at Timestamp at which the store was last updated. + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + $this->container['updated_at'] = $updated_at; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/KvStoreRequestCreate.php b/lib/Model/KvStoreRequestCreateOrUpdate.php similarity index 97% rename from lib/Model/KvStoreRequestCreate.php rename to lib/Model/KvStoreRequestCreateOrUpdate.php index 9f0980dd..51db719f 100644 --- a/lib/Model/KvStoreRequestCreate.php +++ b/lib/Model/KvStoreRequestCreateOrUpdate.php @@ -1,6 +1,6 @@ 'string' + 'workspace_id' => 'string', + 'traffic_ramp' => 'string' ]; /** @@ -64,7 +65,8 @@ class NgwafRequestEnable implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $fastlyFormats = [ - 'workspace_id' => null + 'workspace_id' => null, + 'traffic_ramp' => null ]; /** @@ -94,7 +96,8 @@ public static function fastlyFormats() * @var string[] */ protected static $attributeMap = [ - 'workspace_id' => 'workspace_id' + 'workspace_id' => 'workspace_id', + 'traffic_ramp' => 'traffic_ramp' ]; /** @@ -103,7 +106,8 @@ public static function fastlyFormats() * @var string[] */ protected static $setters = [ - 'workspace_id' => 'setWorkspaceId' + 'workspace_id' => 'setWorkspaceId', + 'traffic_ramp' => 'setTrafficRamp' ]; /** @@ -112,7 +116,8 @@ public static function fastlyFormats() * @var string[] */ protected static $getters = [ - 'workspace_id' => 'getWorkspaceId' + 'workspace_id' => 'getWorkspaceId', + 'traffic_ramp' => 'getTrafficRamp' ]; /** @@ -173,6 +178,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['workspace_id'] = $data['workspace_id'] ?? null; + $this->container['traffic_ramp'] = $data['traffic_ramp'] ?? null; } /** @@ -225,6 +231,30 @@ public function setWorkspaceId($workspace_id) return $this; } + + /** + * Gets traffic_ramp + * + * @return string|null + */ + public function getTrafficRamp() + { + return $this->container['traffic_ramp']; + } + + /** + * Sets traffic_ramp + * + * @param string|null $traffic_ramp The percentage of traffic to inspect. + * + * @return self + */ + public function setTrafficRamp($traffic_ramp) + { + $this->container['traffic_ramp'] = $traffic_ramp; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Offer.php b/lib/Model/Offer.php new file mode 100644 index 00000000..4fe6fdda --- /dev/null +++ b/lib/Model/Offer.php @@ -0,0 +1,375 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Offer implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'offer'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'vendor' => 'string', + 'price' => 'string', + 'currency' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'vendor' => null, + 'price' => null, + 'currency' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vendor' => 'vendor', + 'price' => 'price', + 'currency' => 'currency' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vendor' => 'setVendor', + 'price' => 'setPrice', + 'currency' => 'setCurrency' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vendor' => 'getVendor', + 'price' => 'getPrice', + 'currency' => 'getCurrency' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['vendor'] = $data['vendor'] ?? null; + $this->container['price'] = $data['price'] ?? null; + $this->container['currency'] = $data['currency'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vendor + * + * @return string|null + */ + public function getVendor() + { + return $this->container['vendor']; + } + + /** + * Sets vendor + * + * @param string|null $vendor The aftermarket vendor. + * + * @return self + */ + public function setVendor($vendor) + { + $this->container['vendor'] = $vendor; + + return $this; + } + + /** + * Gets price + * + * @return string|null + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param string|null $price The price for the domain from the aftermarket vendor. + * + * @return self + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets currency + * + * @return string|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency The currency for the aftermarket offer. + * + * @return self + */ + public function setCurrency($currency) + { + $this->container['currency'] = $currency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OfferAllOf.php b/lib/Model/OfferAllOf.php new file mode 100644 index 00000000..f8e3115f --- /dev/null +++ b/lib/Model/OfferAllOf.php @@ -0,0 +1,374 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OfferAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'offer_allOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'vendor' => 'string', + 'price' => 'string', + 'currency' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'vendor' => null, + 'price' => null, + 'currency' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'vendor' => 'vendor', + 'price' => 'price', + 'currency' => 'currency' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'vendor' => 'setVendor', + 'price' => 'setPrice', + 'currency' => 'setCurrency' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'vendor' => 'getVendor', + 'price' => 'getPrice', + 'currency' => 'getCurrency' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['vendor'] = $data['vendor'] ?? null; + $this->container['price'] = $data['price'] ?? null; + $this->container['currency'] = $data['currency'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets vendor + * + * @return string|null + */ + public function getVendor() + { + return $this->container['vendor']; + } + + /** + * Sets vendor + * + * @param string|null $vendor The aftermarket vendor. + * + * @return self + */ + public function setVendor($vendor) + { + $this->container['vendor'] = $vendor; + + return $this; + } + + /** + * Gets price + * + * @return string|null + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param string|null $price The price for the domain from the aftermarket vendor. + * + * @return self + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets currency + * + * @return string|null + */ + public function getCurrency() + { + return $this->container['currency']; + } + + /** + * Sets currency + * + * @param string|null $currency The currency for the aftermarket offer. + * + * @return self + */ + public function setCurrency($currency) + { + $this->container['currency'] = $currency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PlatformMetadata.php b/lib/Model/PlatformMetadata.php new file mode 100644 index 00000000..f8945d55 --- /dev/null +++ b/lib/Model/PlatformMetadata.php @@ -0,0 +1,435 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class PlatformMetadata implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'platform_metadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'from' => '\DateTime', + 'to' => '\DateTime', + 'next_cursor' => 'string', + 'group_by' => 'string', + 'limit' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'from' => 'date-time', + 'to' => 'date-time', + 'next_cursor' => null, + 'group_by' => null, + 'limit' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'from' => 'from', + 'to' => 'to', + 'next_cursor' => 'next_cursor', + 'group_by' => 'group_by', + 'limit' => 'limit' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'from' => 'setFrom', + 'to' => 'setTo', + 'next_cursor' => 'setNextCursor', + 'group_by' => 'setGroupBy', + 'limit' => 'setLimit' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'from' => 'getFrom', + 'to' => 'getTo', + 'next_cursor' => 'getNextCursor', + 'group_by' => 'getGroupBy', + 'limit' => 'getLimit' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['from'] = $data['from'] ?? null; + $this->container['to'] = $data['to'] ?? null; + $this->container['next_cursor'] = $data['next_cursor'] ?? null; + $this->container['group_by'] = $data['group_by'] ?? null; + $this->container['limit'] = $data['limit'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return \DateTime|null + */ + public function getFrom() + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param \DateTime|null $from An RFC-8339-formatted date and time indicating the inclusive start of the query time range. + * + * @return self + */ + public function setFrom($from) + { + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return \DateTime|null + */ + public function getTo() + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param \DateTime|null $to An RFC-8339-formatted date and time indicating the exclusive end of the query time range. + * + * @return self + */ + public function setTo($to) + { + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets next_cursor + * + * @return string|null + */ + public function getNextCursor() + { + return $this->container['next_cursor']; + } + + /** + * Sets next_cursor + * + * @param string|null $next_cursor A string that can be used to request the next page of results, if any. + * + * @return self + */ + public function setNextCursor($next_cursor) + { + $this->container['next_cursor'] = $next_cursor; + + return $this; + } + + /** + * Gets group_by + * + * @return string|null + */ + public function getGroupBy() + { + return $this->container['group_by']; + } + + /** + * Sets group_by + * + * @param string|null $group_by A comma-separated list of fields used to group and order the results. + * + * @return self + */ + public function setGroupBy($group_by) + { + $this->container['group_by'] = $group_by; + + return $this; + } + + /** + * Gets limit + * + * @return int|null + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int|null $limit The maximum number of results to return. + * + * @return self + */ + public function setLimit($limit) + { + $this->container['limit'] = $limit; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PlatformMetricsResponse.php b/lib/Model/PlatformMetricsResponse.php new file mode 100644 index 00000000..7ab6de0f --- /dev/null +++ b/lib/Model/PlatformMetricsResponse.php @@ -0,0 +1,344 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class PlatformMetricsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'platform_metrics_response'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'meta' => '\Fastly\Model\PlatformMetadata', + 'data' => '\Fastly\Model\PlatformValues[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'meta' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'meta' => 'meta', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'meta' => 'setMeta', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'meta' => 'getMeta', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['meta'] = $data['meta'] ?? null; + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets meta + * + * @return \Fastly\Model\PlatformMetadata|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \Fastly\Model\PlatformMetadata|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets data + * + * @return \Fastly\Model\PlatformValues[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \Fastly\Model\PlatformValues[]|null $data An array of values representing the metric values at each point in time. Note that this dataset is sparse: only the keys with non-zero values will be included in the record. + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/PlatformValues.php b/lib/Model/PlatformValues.php new file mode 100644 index 00000000..eda31152 --- /dev/null +++ b/lib/Model/PlatformValues.php @@ -0,0 +1,765 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class PlatformValues implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'platform_values'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'timestamp' => '\DateTime', + 'ttfb_origin_p25_us' => 'float', + 'ttfb_origin_p50_us' => 'float', + 'ttfb_origin_p75_us' => 'float', + 'ttfb_origin_p95_us' => 'float', + 'ttfb_origin_p99_us' => 'float', + 'ttfb_shield_p25_us' => 'float', + 'ttfb_shield_p50_us' => 'float', + 'ttfb_shield_p75_us' => 'float', + 'ttfb_shield_p95_us' => 'float', + 'ttfb_shield_p99_us' => 'float', + 'ttfb_edge_p25_us' => 'float', + 'ttfb_edge_p50_us' => 'float', + 'ttfb_edge_p75_us' => 'float', + 'ttfb_edge_p95_us' => 'float', + 'ttfb_edge_p99_us' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'timestamp' => 'date-time', + 'ttfb_origin_p25_us' => 'float', + 'ttfb_origin_p50_us' => 'float', + 'ttfb_origin_p75_us' => 'float', + 'ttfb_origin_p95_us' => 'float', + 'ttfb_origin_p99_us' => 'float', + 'ttfb_shield_p25_us' => 'float', + 'ttfb_shield_p50_us' => 'float', + 'ttfb_shield_p75_us' => 'float', + 'ttfb_shield_p95_us' => 'float', + 'ttfb_shield_p99_us' => 'float', + 'ttfb_edge_p25_us' => 'float', + 'ttfb_edge_p50_us' => 'float', + 'ttfb_edge_p75_us' => 'float', + 'ttfb_edge_p95_us' => 'float', + 'ttfb_edge_p99_us' => 'float' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'timestamp' => 'timestamp', + 'ttfb_origin_p25_us' => 'ttfb_origin_p25_us', + 'ttfb_origin_p50_us' => 'ttfb_origin_p50_us', + 'ttfb_origin_p75_us' => 'ttfb_origin_p75_us', + 'ttfb_origin_p95_us' => 'ttfb_origin_p95_us', + 'ttfb_origin_p99_us' => 'ttfb_origin_p99_us', + 'ttfb_shield_p25_us' => 'ttfb_shield_p25_us', + 'ttfb_shield_p50_us' => 'ttfb_shield_p50_us', + 'ttfb_shield_p75_us' => 'ttfb_shield_p75_us', + 'ttfb_shield_p95_us' => 'ttfb_shield_p95_us', + 'ttfb_shield_p99_us' => 'ttfb_shield_p99_us', + 'ttfb_edge_p25_us' => 'ttfb_edge_p25_us', + 'ttfb_edge_p50_us' => 'ttfb_edge_p50_us', + 'ttfb_edge_p75_us' => 'ttfb_edge_p75_us', + 'ttfb_edge_p95_us' => 'ttfb_edge_p95_us', + 'ttfb_edge_p99_us' => 'ttfb_edge_p99_us' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'timestamp' => 'setTimestamp', + 'ttfb_origin_p25_us' => 'setTtfbOriginP25Us', + 'ttfb_origin_p50_us' => 'setTtfbOriginP50Us', + 'ttfb_origin_p75_us' => 'setTtfbOriginP75Us', + 'ttfb_origin_p95_us' => 'setTtfbOriginP95Us', + 'ttfb_origin_p99_us' => 'setTtfbOriginP99Us', + 'ttfb_shield_p25_us' => 'setTtfbShieldP25Us', + 'ttfb_shield_p50_us' => 'setTtfbShieldP50Us', + 'ttfb_shield_p75_us' => 'setTtfbShieldP75Us', + 'ttfb_shield_p95_us' => 'setTtfbShieldP95Us', + 'ttfb_shield_p99_us' => 'setTtfbShieldP99Us', + 'ttfb_edge_p25_us' => 'setTtfbEdgeP25Us', + 'ttfb_edge_p50_us' => 'setTtfbEdgeP50Us', + 'ttfb_edge_p75_us' => 'setTtfbEdgeP75Us', + 'ttfb_edge_p95_us' => 'setTtfbEdgeP95Us', + 'ttfb_edge_p99_us' => 'setTtfbEdgeP99Us' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'timestamp' => 'getTimestamp', + 'ttfb_origin_p25_us' => 'getTtfbOriginP25Us', + 'ttfb_origin_p50_us' => 'getTtfbOriginP50Us', + 'ttfb_origin_p75_us' => 'getTtfbOriginP75Us', + 'ttfb_origin_p95_us' => 'getTtfbOriginP95Us', + 'ttfb_origin_p99_us' => 'getTtfbOriginP99Us', + 'ttfb_shield_p25_us' => 'getTtfbShieldP25Us', + 'ttfb_shield_p50_us' => 'getTtfbShieldP50Us', + 'ttfb_shield_p75_us' => 'getTtfbShieldP75Us', + 'ttfb_shield_p95_us' => 'getTtfbShieldP95Us', + 'ttfb_shield_p99_us' => 'getTtfbShieldP99Us', + 'ttfb_edge_p25_us' => 'getTtfbEdgeP25Us', + 'ttfb_edge_p50_us' => 'getTtfbEdgeP50Us', + 'ttfb_edge_p75_us' => 'getTtfbEdgeP75Us', + 'ttfb_edge_p95_us' => 'getTtfbEdgeP95Us', + 'ttfb_edge_p99_us' => 'getTtfbEdgeP99Us' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['timestamp'] = $data['timestamp'] ?? null; + $this->container['ttfb_origin_p25_us'] = $data['ttfb_origin_p25_us'] ?? null; + $this->container['ttfb_origin_p50_us'] = $data['ttfb_origin_p50_us'] ?? null; + $this->container['ttfb_origin_p75_us'] = $data['ttfb_origin_p75_us'] ?? null; + $this->container['ttfb_origin_p95_us'] = $data['ttfb_origin_p95_us'] ?? null; + $this->container['ttfb_origin_p99_us'] = $data['ttfb_origin_p99_us'] ?? null; + $this->container['ttfb_shield_p25_us'] = $data['ttfb_shield_p25_us'] ?? null; + $this->container['ttfb_shield_p50_us'] = $data['ttfb_shield_p50_us'] ?? null; + $this->container['ttfb_shield_p75_us'] = $data['ttfb_shield_p75_us'] ?? null; + $this->container['ttfb_shield_p95_us'] = $data['ttfb_shield_p95_us'] ?? null; + $this->container['ttfb_shield_p99_us'] = $data['ttfb_shield_p99_us'] ?? null; + $this->container['ttfb_edge_p25_us'] = $data['ttfb_edge_p25_us'] ?? null; + $this->container['ttfb_edge_p50_us'] = $data['ttfb_edge_p50_us'] ?? null; + $this->container['ttfb_edge_p75_us'] = $data['ttfb_edge_p75_us'] ?? null; + $this->container['ttfb_edge_p95_us'] = $data['ttfb_edge_p95_us'] ?? null; + $this->container['ttfb_edge_p99_us'] = $data['ttfb_edge_p99_us'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets timestamp + * + * @return \DateTime|null + */ + public function getTimestamp() + { + return $this->container['timestamp']; + } + + /** + * Sets timestamp + * + * @param \DateTime|null $timestamp Timestamp of the metrics data point. + * + * @return self + */ + public function setTimestamp($timestamp) + { + $this->container['timestamp'] = $timestamp; + + return $this; + } + + /** + * Gets ttfb_origin_p25_us + * + * @return float|null + */ + public function getTtfbOriginP25Us() + { + return $this->container['ttfb_origin_p25_us']; + } + + /** + * Sets ttfb_origin_p25_us + * + * @param float|null $ttfb_origin_p25_us 25th percentile of time to first byte from origin, in microseconds. + * + * @return self + */ + public function setTtfbOriginP25Us($ttfb_origin_p25_us) + { + $this->container['ttfb_origin_p25_us'] = $ttfb_origin_p25_us; + + return $this; + } + + /** + * Gets ttfb_origin_p50_us + * + * @return float|null + */ + public function getTtfbOriginP50Us() + { + return $this->container['ttfb_origin_p50_us']; + } + + /** + * Sets ttfb_origin_p50_us + * + * @param float|null $ttfb_origin_p50_us 50th percentile of time to first byte from origin, in microseconds. + * + * @return self + */ + public function setTtfbOriginP50Us($ttfb_origin_p50_us) + { + $this->container['ttfb_origin_p50_us'] = $ttfb_origin_p50_us; + + return $this; + } + + /** + * Gets ttfb_origin_p75_us + * + * @return float|null + */ + public function getTtfbOriginP75Us() + { + return $this->container['ttfb_origin_p75_us']; + } + + /** + * Sets ttfb_origin_p75_us + * + * @param float|null $ttfb_origin_p75_us 75th percentile of time to first byte from origin, in microseconds. + * + * @return self + */ + public function setTtfbOriginP75Us($ttfb_origin_p75_us) + { + $this->container['ttfb_origin_p75_us'] = $ttfb_origin_p75_us; + + return $this; + } + + /** + * Gets ttfb_origin_p95_us + * + * @return float|null + */ + public function getTtfbOriginP95Us() + { + return $this->container['ttfb_origin_p95_us']; + } + + /** + * Sets ttfb_origin_p95_us + * + * @param float|null $ttfb_origin_p95_us 95th percentile of time to first byte from origin, in microseconds. + * + * @return self + */ + public function setTtfbOriginP95Us($ttfb_origin_p95_us) + { + $this->container['ttfb_origin_p95_us'] = $ttfb_origin_p95_us; + + return $this; + } + + /** + * Gets ttfb_origin_p99_us + * + * @return float|null + */ + public function getTtfbOriginP99Us() + { + return $this->container['ttfb_origin_p99_us']; + } + + /** + * Sets ttfb_origin_p99_us + * + * @param float|null $ttfb_origin_p99_us 99th percentile of time to first byte from origin, in microseconds. + * + * @return self + */ + public function setTtfbOriginP99Us($ttfb_origin_p99_us) + { + $this->container['ttfb_origin_p99_us'] = $ttfb_origin_p99_us; + + return $this; + } + + /** + * Gets ttfb_shield_p25_us + * + * @return float|null + */ + public function getTtfbShieldP25Us() + { + return $this->container['ttfb_shield_p25_us']; + } + + /** + * Sets ttfb_shield_p25_us + * + * @param float|null $ttfb_shield_p25_us 25th percentile of time to first byte from shield, in microseconds. + * + * @return self + */ + public function setTtfbShieldP25Us($ttfb_shield_p25_us) + { + $this->container['ttfb_shield_p25_us'] = $ttfb_shield_p25_us; + + return $this; + } + + /** + * Gets ttfb_shield_p50_us + * + * @return float|null + */ + public function getTtfbShieldP50Us() + { + return $this->container['ttfb_shield_p50_us']; + } + + /** + * Sets ttfb_shield_p50_us + * + * @param float|null $ttfb_shield_p50_us 50th percentile of time to first byte from shield, in microseconds. + * + * @return self + */ + public function setTtfbShieldP50Us($ttfb_shield_p50_us) + { + $this->container['ttfb_shield_p50_us'] = $ttfb_shield_p50_us; + + return $this; + } + + /** + * Gets ttfb_shield_p75_us + * + * @return float|null + */ + public function getTtfbShieldP75Us() + { + return $this->container['ttfb_shield_p75_us']; + } + + /** + * Sets ttfb_shield_p75_us + * + * @param float|null $ttfb_shield_p75_us 75th percentile of time to first byte from shield, in microseconds. + * + * @return self + */ + public function setTtfbShieldP75Us($ttfb_shield_p75_us) + { + $this->container['ttfb_shield_p75_us'] = $ttfb_shield_p75_us; + + return $this; + } + + /** + * Gets ttfb_shield_p95_us + * + * @return float|null + */ + public function getTtfbShieldP95Us() + { + return $this->container['ttfb_shield_p95_us']; + } + + /** + * Sets ttfb_shield_p95_us + * + * @param float|null $ttfb_shield_p95_us 95th percentile of time to first byte from shield, in microseconds. + * + * @return self + */ + public function setTtfbShieldP95Us($ttfb_shield_p95_us) + { + $this->container['ttfb_shield_p95_us'] = $ttfb_shield_p95_us; + + return $this; + } + + /** + * Gets ttfb_shield_p99_us + * + * @return float|null + */ + public function getTtfbShieldP99Us() + { + return $this->container['ttfb_shield_p99_us']; + } + + /** + * Sets ttfb_shield_p99_us + * + * @param float|null $ttfb_shield_p99_us 99th percentile of time to first byte from shield, in microseconds. + * + * @return self + */ + public function setTtfbShieldP99Us($ttfb_shield_p99_us) + { + $this->container['ttfb_shield_p99_us'] = $ttfb_shield_p99_us; + + return $this; + } + + /** + * Gets ttfb_edge_p25_us + * + * @return float|null + */ + public function getTtfbEdgeP25Us() + { + return $this->container['ttfb_edge_p25_us']; + } + + /** + * Sets ttfb_edge_p25_us + * + * @param float|null $ttfb_edge_p25_us 25th percentile of time to first byte from edge, in microseconds. + * + * @return self + */ + public function setTtfbEdgeP25Us($ttfb_edge_p25_us) + { + $this->container['ttfb_edge_p25_us'] = $ttfb_edge_p25_us; + + return $this; + } + + /** + * Gets ttfb_edge_p50_us + * + * @return float|null + */ + public function getTtfbEdgeP50Us() + { + return $this->container['ttfb_edge_p50_us']; + } + + /** + * Sets ttfb_edge_p50_us + * + * @param float|null $ttfb_edge_p50_us 50th percentile of time to first byte from edge, in microseconds. + * + * @return self + */ + public function setTtfbEdgeP50Us($ttfb_edge_p50_us) + { + $this->container['ttfb_edge_p50_us'] = $ttfb_edge_p50_us; + + return $this; + } + + /** + * Gets ttfb_edge_p75_us + * + * @return float|null + */ + public function getTtfbEdgeP75Us() + { + return $this->container['ttfb_edge_p75_us']; + } + + /** + * Sets ttfb_edge_p75_us + * + * @param float|null $ttfb_edge_p75_us 75th percentile of time to first byte from edge, in microseconds. + * + * @return self + */ + public function setTtfbEdgeP75Us($ttfb_edge_p75_us) + { + $this->container['ttfb_edge_p75_us'] = $ttfb_edge_p75_us; + + return $this; + } + + /** + * Gets ttfb_edge_p95_us + * + * @return float|null + */ + public function getTtfbEdgeP95Us() + { + return $this->container['ttfb_edge_p95_us']; + } + + /** + * Sets ttfb_edge_p95_us + * + * @param float|null $ttfb_edge_p95_us 95th percentile of time to first byte from edge, in microseconds. + * + * @return self + */ + public function setTtfbEdgeP95Us($ttfb_edge_p95_us) + { + $this->container['ttfb_edge_p95_us'] = $ttfb_edge_p95_us; + + return $this; + } + + /** + * Gets ttfb_edge_p99_us + * + * @return float|null + */ + public function getTtfbEdgeP99Us() + { + return $this->container['ttfb_edge_p99_us']; + } + + /** + * Sets ttfb_edge_p99_us + * + * @param float|null $ttfb_edge_p99_us 99th percentile of time to first byte from edge, in microseconds. + * + * @return self + */ + public function setTtfbEdgeP99Us($ttfb_edge_p99_us) + { + $this->container['ttfb_edge_p99_us'] = $ttfb_edge_p99_us; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RealtimeEntryAggregated.php b/lib/Model/RealtimeEntryAggregated.php index ccd295bf..c425ead1 100644 --- a/lib/Model/RealtimeEntryAggregated.php +++ b/lib/Model/RealtimeEntryAggregated.php @@ -315,7 +315,11 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria 'request_collapse_usable_count' => 'int', 'request_collapse_unusable_count' => 'int', 'compute_cache_operations_count' => 'int', - 'api_discovery_requests_count' => 'int' + 'api_discovery_requests_count' => 'int', + 'imgopto_compute_requests' => 'int', + 'dns_billable_responses_count' => 'int', + 'dns_nonbillable_responses_count' => 'int', + 'upgrade' => 'int' ]; /** @@ -587,7 +591,11 @@ class RealtimeEntryAggregated implements ModelInterface, ArrayAccess, \JsonSeria 'request_collapse_usable_count' => 'int64', 'request_collapse_unusable_count' => 'int64', 'compute_cache_operations_count' => 'int64', - 'api_discovery_requests_count' => null + 'api_discovery_requests_count' => null, + 'imgopto_compute_requests' => null, + 'dns_billable_responses_count' => null, + 'dns_nonbillable_responses_count' => null, + 'upgrade' => null ]; /** @@ -878,7 +886,11 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'request_collapse_usable_count', 'request_collapse_unusable_count' => 'request_collapse_unusable_count', 'compute_cache_operations_count' => 'compute_cache_operations_count', - 'api_discovery_requests_count' => 'api_discovery_requests_count' + 'api_discovery_requests_count' => 'api_discovery_requests_count', + 'imgopto_compute_requests' => 'imgopto_compute_requests', + 'dns_billable_responses_count' => 'dns_billable_responses_count', + 'dns_nonbillable_responses_count' => 'dns_nonbillable_responses_count', + 'upgrade' => 'upgrade' ]; /** @@ -1148,7 +1160,11 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', 'compute_cache_operations_count' => 'setComputeCacheOperationsCount', - 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount' + 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount', + 'imgopto_compute_requests' => 'setImgoptoComputeRequests', + 'dns_billable_responses_count' => 'setDnsBillableResponsesCount', + 'dns_nonbillable_responses_count' => 'setDnsNonbillableResponsesCount', + 'upgrade' => 'setUpgrade' ]; /** @@ -1418,7 +1434,11 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', 'compute_cache_operations_count' => 'getComputeCacheOperationsCount', - 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount' + 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount', + 'imgopto_compute_requests' => 'getImgoptoComputeRequests', + 'dns_billable_responses_count' => 'getDnsBillableResponsesCount', + 'dns_nonbillable_responses_count' => 'getDnsNonbillableResponsesCount', + 'upgrade' => 'getUpgrade' ]; /** @@ -1740,6 +1760,10 @@ public function __construct(array $data = null) $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; $this->container['api_discovery_requests_count'] = $data['api_discovery_requests_count'] ?? null; + $this->container['imgopto_compute_requests'] = $data['imgopto_compute_requests'] ?? null; + $this->container['dns_billable_responses_count'] = $data['dns_billable_responses_count'] ?? null; + $this->container['dns_nonbillable_responses_count'] = $data['dns_nonbillable_responses_count'] ?? null; + $this->container['upgrade'] = $data['upgrade'] ?? null; } /** @@ -8057,6 +8081,102 @@ public function setApiDiscoveryRequestsCount($api_discovery_requests_count) return $this; } + + /** + * Gets imgopto_compute_requests + * + * @return int|null + */ + public function getImgoptoComputeRequests() + { + return $this->container['imgopto_compute_requests']; + } + + /** + * Sets imgopto_compute_requests + * + * @param int|null $imgopto_compute_requests The number of Image Optimizer requests made from Compute services. + * + * @return self + */ + public function setImgoptoComputeRequests($imgopto_compute_requests) + { + $this->container['imgopto_compute_requests'] = $imgopto_compute_requests; + + return $this; + } + + /** + * Gets dns_billable_responses_count + * + * @return int|null + */ + public function getDnsBillableResponsesCount() + { + return $this->container['dns_billable_responses_count']; + } + + /** + * Sets dns_billable_responses_count + * + * @param int|null $dns_billable_responses_count Number of billable DNS responses (e.g., A, CNAME). + * + * @return self + */ + public function setDnsBillableResponsesCount($dns_billable_responses_count) + { + $this->container['dns_billable_responses_count'] = $dns_billable_responses_count; + + return $this; + } + + /** + * Gets dns_nonbillable_responses_count + * + * @return int|null + */ + public function getDnsNonbillableResponsesCount() + { + return $this->container['dns_nonbillable_responses_count']; + } + + /** + * Sets dns_nonbillable_responses_count + * + * @param int|null $dns_nonbillable_responses_count Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN). + * + * @return self + */ + public function setDnsNonbillableResponsesCount($dns_nonbillable_responses_count) + { + $this->container['dns_nonbillable_responses_count'] = $dns_nonbillable_responses_count; + + return $this; + } + + /** + * Gets upgrade + * + * @return int|null + */ + public function getUpgrade() + { + return $this->container['upgrade']; + } + + /** + * Sets upgrade + * + * @param int|null $upgrade Number of requests that resulted in a WebSocket upgrade. + * + * @return self + */ + public function setUpgrade($upgrade) + { + $this->container['upgrade'] = $upgrade; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/RealtimeMeasurements.php b/lib/Model/RealtimeMeasurements.php index ec3710c8..6a20a7ab 100644 --- a/lib/Model/RealtimeMeasurements.php +++ b/lib/Model/RealtimeMeasurements.php @@ -315,7 +315,11 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ 'request_collapse_usable_count' => 'int', 'request_collapse_unusable_count' => 'int', 'compute_cache_operations_count' => 'int', - 'api_discovery_requests_count' => 'int' + 'api_discovery_requests_count' => 'int', + 'imgopto_compute_requests' => 'int', + 'dns_billable_responses_count' => 'int', + 'dns_nonbillable_responses_count' => 'int', + 'upgrade' => 'int' ]; /** @@ -587,7 +591,11 @@ class RealtimeMeasurements implements ModelInterface, ArrayAccess, \JsonSerializ 'request_collapse_usable_count' => 'int64', 'request_collapse_unusable_count' => 'int64', 'compute_cache_operations_count' => 'int64', - 'api_discovery_requests_count' => null + 'api_discovery_requests_count' => null, + 'imgopto_compute_requests' => null, + 'dns_billable_responses_count' => null, + 'dns_nonbillable_responses_count' => null, + 'upgrade' => null ]; /** @@ -878,7 +886,11 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'request_collapse_usable_count', 'request_collapse_unusable_count' => 'request_collapse_unusable_count', 'compute_cache_operations_count' => 'compute_cache_operations_count', - 'api_discovery_requests_count' => 'api_discovery_requests_count' + 'api_discovery_requests_count' => 'api_discovery_requests_count', + 'imgopto_compute_requests' => 'imgopto_compute_requests', + 'dns_billable_responses_count' => 'dns_billable_responses_count', + 'dns_nonbillable_responses_count' => 'dns_nonbillable_responses_count', + 'upgrade' => 'upgrade' ]; /** @@ -1148,7 +1160,11 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'setRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'setRequestCollapseUnusableCount', 'compute_cache_operations_count' => 'setComputeCacheOperationsCount', - 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount' + 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount', + 'imgopto_compute_requests' => 'setImgoptoComputeRequests', + 'dns_billable_responses_count' => 'setDnsBillableResponsesCount', + 'dns_nonbillable_responses_count' => 'setDnsNonbillableResponsesCount', + 'upgrade' => 'setUpgrade' ]; /** @@ -1418,7 +1434,11 @@ public static function fastlyFormats() 'request_collapse_usable_count' => 'getRequestCollapseUsableCount', 'request_collapse_unusable_count' => 'getRequestCollapseUnusableCount', 'compute_cache_operations_count' => 'getComputeCacheOperationsCount', - 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount' + 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount', + 'imgopto_compute_requests' => 'getImgoptoComputeRequests', + 'dns_billable_responses_count' => 'getDnsBillableResponsesCount', + 'dns_nonbillable_responses_count' => 'getDnsNonbillableResponsesCount', + 'upgrade' => 'getUpgrade' ]; /** @@ -1740,6 +1760,10 @@ public function __construct(array $data = null) $this->container['request_collapse_unusable_count'] = $data['request_collapse_unusable_count'] ?? null; $this->container['compute_cache_operations_count'] = $data['compute_cache_operations_count'] ?? null; $this->container['api_discovery_requests_count'] = $data['api_discovery_requests_count'] ?? null; + $this->container['imgopto_compute_requests'] = $data['imgopto_compute_requests'] ?? null; + $this->container['dns_billable_responses_count'] = $data['dns_billable_responses_count'] ?? null; + $this->container['dns_nonbillable_responses_count'] = $data['dns_nonbillable_responses_count'] ?? null; + $this->container['upgrade'] = $data['upgrade'] ?? null; } /** @@ -8057,6 +8081,102 @@ public function setApiDiscoveryRequestsCount($api_discovery_requests_count) return $this; } + + /** + * Gets imgopto_compute_requests + * + * @return int|null + */ + public function getImgoptoComputeRequests() + { + return $this->container['imgopto_compute_requests']; + } + + /** + * Sets imgopto_compute_requests + * + * @param int|null $imgopto_compute_requests The number of Image Optimizer requests made from Compute services. + * + * @return self + */ + public function setImgoptoComputeRequests($imgopto_compute_requests) + { + $this->container['imgopto_compute_requests'] = $imgopto_compute_requests; + + return $this; + } + + /** + * Gets dns_billable_responses_count + * + * @return int|null + */ + public function getDnsBillableResponsesCount() + { + return $this->container['dns_billable_responses_count']; + } + + /** + * Sets dns_billable_responses_count + * + * @param int|null $dns_billable_responses_count Number of billable DNS responses (e.g., A, CNAME). + * + * @return self + */ + public function setDnsBillableResponsesCount($dns_billable_responses_count) + { + $this->container['dns_billable_responses_count'] = $dns_billable_responses_count; + + return $this; + } + + /** + * Gets dns_nonbillable_responses_count + * + * @return int|null + */ + public function getDnsNonbillableResponsesCount() + { + return $this->container['dns_nonbillable_responses_count']; + } + + /** + * Sets dns_nonbillable_responses_count + * + * @param int|null $dns_nonbillable_responses_count Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN). + * + * @return self + */ + public function setDnsNonbillableResponsesCount($dns_nonbillable_responses_count) + { + $this->container['dns_nonbillable_responses_count'] = $dns_nonbillable_responses_count; + + return $this; + } + + /** + * Gets upgrade + * + * @return int|null + */ + public function getUpgrade() + { + return $this->container['upgrade']; + } + + /** + * Sets upgrade + * + * @param int|null $upgrade Number of requests that resulted in a WebSocket upgrade. + * + * @return self + */ + public function setUpgrade($upgrade) + { + $this->container['upgrade'] = $upgrade; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/Results.php b/lib/Model/Results.php index afbca16a..da5504a4 100644 --- a/lib/Model/Results.php +++ b/lib/Model/Results.php @@ -323,6 +323,10 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'ngwaf_requests_timeout_count' => 'int', 'ngwaf_requests_challenged_count' => 'int', 'api_discovery_requests_count' => 'int', + 'imgopto_compute_requests' => 'int', + 'dns_billable_responses_count' => 'int', + 'dns_nonbillable_responses_count' => 'int', + 'upgrade' => 'int', 'service_id' => 'string', 'start_time' => 'int' ]; @@ -604,6 +608,10 @@ class Results implements ModelInterface, ArrayAccess, \JsonSerializable 'ngwaf_requests_timeout_count' => null, 'ngwaf_requests_challenged_count' => null, 'api_discovery_requests_count' => null, + 'imgopto_compute_requests' => null, + 'dns_billable_responses_count' => null, + 'dns_nonbillable_responses_count' => null, + 'upgrade' => null, 'service_id' => null, 'start_time' => 'int64' ]; @@ -904,6 +912,10 @@ public static function fastlyFormats() 'ngwaf_requests_timeout_count' => 'ngwaf_requests_timeout_count', 'ngwaf_requests_challenged_count' => 'ngwaf_requests_challenged_count', 'api_discovery_requests_count' => 'api_discovery_requests_count', + 'imgopto_compute_requests' => 'imgopto_compute_requests', + 'dns_billable_responses_count' => 'dns_billable_responses_count', + 'dns_nonbillable_responses_count' => 'dns_nonbillable_responses_count', + 'upgrade' => 'upgrade', 'service_id' => 'service_id', 'start_time' => 'start_time' ]; @@ -1183,6 +1195,10 @@ public static function fastlyFormats() 'ngwaf_requests_timeout_count' => 'setNgwafRequestsTimeoutCount', 'ngwaf_requests_challenged_count' => 'setNgwafRequestsChallengedCount', 'api_discovery_requests_count' => 'setApiDiscoveryRequestsCount', + 'imgopto_compute_requests' => 'setImgoptoComputeRequests', + 'dns_billable_responses_count' => 'setDnsBillableResponsesCount', + 'dns_nonbillable_responses_count' => 'setDnsNonbillableResponsesCount', + 'upgrade' => 'setUpgrade', 'service_id' => 'setServiceId', 'start_time' => 'setStartTime' ]; @@ -1462,6 +1478,10 @@ public static function fastlyFormats() 'ngwaf_requests_timeout_count' => 'getNgwafRequestsTimeoutCount', 'ngwaf_requests_challenged_count' => 'getNgwafRequestsChallengedCount', 'api_discovery_requests_count' => 'getApiDiscoveryRequestsCount', + 'imgopto_compute_requests' => 'getImgoptoComputeRequests', + 'dns_billable_responses_count' => 'getDnsBillableResponsesCount', + 'dns_nonbillable_responses_count' => 'getDnsNonbillableResponsesCount', + 'upgrade' => 'getUpgrade', 'service_id' => 'getServiceId', 'start_time' => 'getStartTime' ]; @@ -1792,6 +1812,10 @@ public function __construct(array $data = null) $this->container['ngwaf_requests_timeout_count'] = $data['ngwaf_requests_timeout_count'] ?? null; $this->container['ngwaf_requests_challenged_count'] = $data['ngwaf_requests_challenged_count'] ?? null; $this->container['api_discovery_requests_count'] = $data['api_discovery_requests_count'] ?? null; + $this->container['imgopto_compute_requests'] = $data['imgopto_compute_requests'] ?? null; + $this->container['dns_billable_responses_count'] = $data['dns_billable_responses_count'] ?? null; + $this->container['dns_nonbillable_responses_count'] = $data['dns_nonbillable_responses_count'] ?? null; + $this->container['upgrade'] = $data['upgrade'] ?? null; $this->container['service_id'] = $data['service_id'] ?? null; $this->container['start_time'] = $data['start_time'] ?? null; } @@ -8280,6 +8304,102 @@ public function setApiDiscoveryRequestsCount($api_discovery_requests_count) return $this; } + /** + * Gets imgopto_compute_requests + * + * @return int|null + */ + public function getImgoptoComputeRequests() + { + return $this->container['imgopto_compute_requests']; + } + + /** + * Sets imgopto_compute_requests + * + * @param int|null $imgopto_compute_requests The number of Image Optimizer requests made from Compute services. + * + * @return self + */ + public function setImgoptoComputeRequests($imgopto_compute_requests) + { + $this->container['imgopto_compute_requests'] = $imgopto_compute_requests; + + return $this; + } + + /** + * Gets dns_billable_responses_count + * + * @return int|null + */ + public function getDnsBillableResponsesCount() + { + return $this->container['dns_billable_responses_count']; + } + + /** + * Sets dns_billable_responses_count + * + * @param int|null $dns_billable_responses_count Number of billable DNS responses (e.g., A, CNAME). + * + * @return self + */ + public function setDnsBillableResponsesCount($dns_billable_responses_count) + { + $this->container['dns_billable_responses_count'] = $dns_billable_responses_count; + + return $this; + } + + /** + * Gets dns_nonbillable_responses_count + * + * @return int|null + */ + public function getDnsNonbillableResponsesCount() + { + return $this->container['dns_nonbillable_responses_count']; + } + + /** + * Sets dns_nonbillable_responses_count + * + * @param int|null $dns_nonbillable_responses_count Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN). + * + * @return self + */ + public function setDnsNonbillableResponsesCount($dns_nonbillable_responses_count) + { + $this->container['dns_nonbillable_responses_count'] = $dns_nonbillable_responses_count; + + return $this; + } + + /** + * Gets upgrade + * + * @return int|null + */ + public function getUpgrade() + { + return $this->container['upgrade']; + } + + /** + * Sets upgrade + * + * @param int|null $upgrade Number of requests that resulted in a WebSocket upgrade. + * + * @return self + */ + public function setUpgrade($upgrade) + { + $this->container['upgrade'] = $upgrade; + + return $this; + } + /** * Gets service_id * diff --git a/lib/Model/Status.php b/lib/Model/Status.php new file mode 100644 index 00000000..848167aa --- /dev/null +++ b/lib/Model/Status.php @@ -0,0 +1,465 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Status implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'status'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'scope' => 'string', + 'domain' => 'string', + 'zone' => 'string', + 'status' => 'string', + 'tags' => 'string', + 'offers' => '\Fastly\Model\Offer[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'scope' => null, + 'domain' => null, + 'zone' => null, + 'status' => null, + 'tags' => null, + 'offers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope' => 'scope', + 'domain' => 'domain', + 'zone' => 'zone', + 'status' => 'status', + 'tags' => 'tags', + 'offers' => 'offers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope' => 'setScope', + 'domain' => 'setDomain', + 'zone' => 'setZone', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'offers' => 'setOffers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope' => 'getScope', + 'domain' => 'getDomain', + 'zone' => 'getZone', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'offers' => 'getOffers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scope'] = $data['scope'] ?? null; + $this->container['domain'] = $data['domain'] ?? null; + $this->container['zone'] = $data['zone'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['tags'] = $data['tags'] ?? null; + $this->container['offers'] = $data['offers'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope + * + * @return string|null + */ + public function getScope() + { + return $this->container['scope']; + } + + /** + * Sets scope + * + * @param string|null $scope The scope provided in the status request. + * + * @return self + */ + public function setScope($scope) + { + $this->container['scope'] = $scope; + + return $this; + } + + /** + * Gets domain + * + * @return string|null + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string|null $domain The domain provided in the status request. + * + * @return self + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets zone + * + * @return string|null + */ + public function getZone() + { + return $this->container['zone']; + } + + /** + * Sets zone + * + * @param string|null $zone The zone of the domain provided of the status request. + * + * @return self + */ + public function setZone($zone) + { + $this->container['zone'] = $zone; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status A space-delimited string of the varying statuses associated with the domain provided. + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets tags + * + * @return string|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string|null $tags A space-delimited string of the varying tags associated with the domain provided. + * + * @return self + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets offers + * + * @return \Fastly\Model\Offer[]|null + */ + public function getOffers() + { + return $this->container['offers']; + } + + /** + * Sets offers + * + * @param \Fastly\Model\Offer[]|null $offers offers + * + * @return self + */ + public function setOffers($offers) + { + $this->container['offers'] = $offers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/StatusAllOf.php b/lib/Model/StatusAllOf.php new file mode 100644 index 00000000..b7896118 --- /dev/null +++ b/lib/Model/StatusAllOf.php @@ -0,0 +1,464 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class StatusAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'status_allOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'scope' => 'string', + 'domain' => 'string', + 'zone' => 'string', + 'status' => 'string', + 'tags' => 'string', + 'offers' => '\Fastly\Model\Offer[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'scope' => null, + 'domain' => null, + 'zone' => null, + 'status' => null, + 'tags' => null, + 'offers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scope' => 'scope', + 'domain' => 'domain', + 'zone' => 'zone', + 'status' => 'status', + 'tags' => 'tags', + 'offers' => 'offers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scope' => 'setScope', + 'domain' => 'setDomain', + 'zone' => 'setZone', + 'status' => 'setStatus', + 'tags' => 'setTags', + 'offers' => 'setOffers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scope' => 'getScope', + 'domain' => 'getDomain', + 'zone' => 'getZone', + 'status' => 'getStatus', + 'tags' => 'getTags', + 'offers' => 'getOffers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scope'] = $data['scope'] ?? null; + $this->container['domain'] = $data['domain'] ?? null; + $this->container['zone'] = $data['zone'] ?? null; + $this->container['status'] = $data['status'] ?? null; + $this->container['tags'] = $data['tags'] ?? null; + $this->container['offers'] = $data['offers'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scope + * + * @return string|null + */ + public function getScope() + { + return $this->container['scope']; + } + + /** + * Sets scope + * + * @param string|null $scope The scope provided in the status request. + * + * @return self + */ + public function setScope($scope) + { + $this->container['scope'] = $scope; + + return $this; + } + + /** + * Gets domain + * + * @return string|null + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string|null $domain The domain provided in the status request. + * + * @return self + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets zone + * + * @return string|null + */ + public function getZone() + { + return $this->container['zone']; + } + + /** + * Sets zone + * + * @param string|null $zone The zone of the domain provided of the status request. + * + * @return self + */ + public function setZone($zone) + { + $this->container['zone'] = $zone; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status A space-delimited string of the varying statuses associated with the domain provided. + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets tags + * + * @return string|null + */ + public function getTags() + { + return $this->container['tags']; + } + + /** + * Sets tags + * + * @param string|null $tags A space-delimited string of the varying tags associated with the domain provided. + * + * @return self + */ + public function setTags($tags) + { + $this->container['tags'] = $tags; + + return $this; + } + + /** + * Gets offers + * + * @return \Fastly\Model\Offer[]|null + */ + public function getOffers() + { + return $this->container['offers']; + } + + /** + * Sets offers + * + * @param \Fastly\Model\Offer[]|null $offers offers + * + * @return self + */ + public function setOffers($offers) + { + $this->container['offers'] = $offers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Suggestion.php b/lib/Model/Suggestion.php new file mode 100644 index 00000000..2d6b21cd --- /dev/null +++ b/lib/Model/Suggestion.php @@ -0,0 +1,405 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Suggestion implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'suggestion'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'domain' => 'string', + 'subdomain' => 'string', + 'zone' => 'string', + 'path' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'domain' => null, + 'subdomain' => null, + 'zone' => null, + 'path' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain', + 'subdomain' => 'subdomain', + 'zone' => 'zone', + 'path' => 'path' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain', + 'subdomain' => 'setSubdomain', + 'zone' => 'setZone', + 'path' => 'setPath' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain', + 'subdomain' => 'getSubdomain', + 'zone' => 'getZone', + 'path' => 'getPath' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = $data['domain'] ?? null; + $this->container['subdomain'] = $data['subdomain'] ?? null; + $this->container['zone'] = $data['zone'] ?? null; + $this->container['path'] = $data['path'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string|null + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string|null $domain The suggested domain, consisting of a subdomain and zone. + * + * @return self + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets subdomain + * + * @return string|null + */ + public function getSubdomain() + { + return $this->container['subdomain']; + } + + /** + * Sets subdomain + * + * @param string|null $subdomain The subdomain of the suggested domain. + * + * @return self + */ + public function setSubdomain($subdomain) + { + $this->container['subdomain'] = $subdomain; + + return $this; + } + + /** + * Gets zone + * + * @return string|null + */ + public function getZone() + { + return $this->container['zone']; + } + + /** + * Sets zone + * + * @param string|null $zone The zone of the suggested domain. + * + * @return self + */ + public function setZone($zone) + { + $this->container['zone'] = $zone; + + return $this; + } + + /** + * Gets path + * + * @return string|null + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string|null $path If present, the path is to be appended to the domain to complete the suggestion. + * + * @return self + */ + public function setPath($path) + { + $this->container['path'] = $path; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SuggestionAllOf.php b/lib/Model/SuggestionAllOf.php new file mode 100644 index 00000000..57bed7e7 --- /dev/null +++ b/lib/Model/SuggestionAllOf.php @@ -0,0 +1,404 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class SuggestionAllOf implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $fastlyModelName = 'suggestion_allOf'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $fastlyTypes = [ + 'domain' => 'string', + 'subdomain' => 'string', + 'zone' => 'string', + 'path' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $fastlyFormats = [ + 'domain' => null, + 'subdomain' => null, + 'zone' => null, + 'path' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyTypes() + { + return self::$fastlyTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function fastlyFormats() + { + return self::$fastlyFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'domain' => 'domain', + 'subdomain' => 'subdomain', + 'zone' => 'zone', + 'path' => 'path' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'domain' => 'setDomain', + 'subdomain' => 'setSubdomain', + 'zone' => 'setZone', + 'path' => 'setPath' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'domain' => 'getDomain', + 'subdomain' => 'getSubdomain', + 'zone' => 'getZone', + 'path' => 'getPath' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$fastlyModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['domain'] = $data['domain'] ?? null; + $this->container['subdomain'] = $data['subdomain'] ?? null; + $this->container['zone'] = $data['zone'] ?? null; + $this->container['path'] = $data['path'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets domain + * + * @return string|null + */ + public function getDomain() + { + return $this->container['domain']; + } + + /** + * Sets domain + * + * @param string|null $domain The suggested domain, consisting of a subdomain and zone. + * + * @return self + */ + public function setDomain($domain) + { + $this->container['domain'] = $domain; + + return $this; + } + + /** + * Gets subdomain + * + * @return string|null + */ + public function getSubdomain() + { + return $this->container['subdomain']; + } + + /** + * Sets subdomain + * + * @param string|null $subdomain The subdomain of the suggested domain. + * + * @return self + */ + public function setSubdomain($subdomain) + { + $this->container['subdomain'] = $subdomain; + + return $this; + } + + /** + * Gets zone + * + * @return string|null + */ + public function getZone() + { + return $this->container['zone']; + } + + /** + * Sets zone + * + * @param string|null $zone The zone of the suggested domain. + * + * @return self + */ + public function setZone($zone) + { + $this->container['zone'] = $zone; + + return $this; + } + + /** + * Gets path + * + * @return string|null + */ + public function getPath() + { + return $this->container['path']; + } + + /** + * Sets path + * + * @param string|null $path If present, the path is to be appended to the domain to complete the suggestion. + * + * @return self + */ + public function setPath($path) + { + $this->container['path'] = $path; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/sig.json b/sig.json index a960467b..bed90238 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "6ebb4bfe", "D": "db064767"} +{"G": "bc5e590d", "D": "0d6bf445"}